Renaming photos to give attribution

At ASA Convention, a number of us took many photographs.  Late on the last night, I helped compile the highlights into a souvenir data DVD.  Using the nifty little exiv2 utility, I was able to adjust the image timestamps and retrospectively synchronise the clocks in every camera.  This makes for very enjoyable photo browsing, as you can view chronologically regardless of which camera was used.

Unfortunately I was too rushed to place attribution in the filenames, and so it is not obvious who took each photo.  Luckily we all used different camera models, and that information is still present in the exif metadata.  I used this to split the photos into directories and embed the photographer in both metadata and filename.

I was shooting on my Nikon D200, and so was able to separate my photos by:

for ii in *.jpg; do if grep -q "NIKON D200" $ii ; then mv $ii lachlan/ ; fi ; done

This says: for each jpg file, check if it contains “NIKON D200″ in the exif metadata and if it does then move it to the subdirectory lachlan/

All you need to do is find the camera model string to search for (my friends with Canons had things like “Canon EOS 30D”).  Now I’m going to append photographer names to the filenames, and then return them to their original chronological directories.

[For Facebook Notes readers: this post is redirected from my personal website lachlan.rogers.name]

Posted in Hacks and Tricks | Tagged , | Leave a comment

Producing handout with LaTeX Beamer

I jotted this down a year ago when I needed to produce a set of handout notes for a 3rd year physics lecture I took. Just last week, after taking a similar set of lectures, I wanted to find it but couldn’t. Murphy’s Law has come into effect, and my jotted note has turned up now that my need for it has passed.

The Beamer class for LaTeX is a great way to produce very nice presentation slides with useful features such as automatic progress markers and internal hyperlinks. Being LaTeX, it is also possible to completely change the output formatting by simply altering certain document settings. This allows me to produce slides that have black backgrounds for better projection onto a screen, and then change a single line (specifying the colour theme) to get a white-background version optimised for printing on paper.

To make it even more efficient to print, I used the following command to fit 3 slides to an A4 page:

pdfnup --frame false --nup 1x3 --paper a4paper --orient auto --pages all --trim "0 0 0 0" --delta "1cm 1cm" --offset "0 0" --scale 0.91 --turn true --noautoscale false --openright false --column false --columnstrict false --tidy true --outfile main3up.pdf main.pdf

Posted in GNU/Linux, Hacks and Tricks | Tagged , | Leave a comment

Into the BOINC top 25%

Since beginning my participation in BOINC volunteer computing back in August, I’ve had processes running on my computer most of the time that it’s been sitting idle. It seems that I’ve been accumulating credit at a faster rate than many others, as my “rank” has steadily increased. As of today, I have accumulated more credit than 75% of all BOINC users - which places me in the top quarter!

Boinc Stats - over 75%

Unlike the “live” stats image back in my first boinc post, this one is static as a celebration of this milestone. If you’re interested, you can read a much more comprehensive summary of my activity over at BoincStats.

Posted in Projects, Tech | Leave a comment

We’re back, and better than before

After a very frustrating few months with my webserver not coping at all, I finally replaced it with a decent machine. Now we have much more processor speed, and more than 10 times the RAM.

Already this page is definitely faster, and I hope that it will be able to operate more consistently from this point. I think I have managed to import essentially all the content that previously populated this blog, but if you find any glaring omissions feel free to let me know.

Posted in News, Tech | Leave a comment

Converting video files for playback on Android Google Phone

A few months ago I purchased a “Google Phone”: a HTC Magic running the Linux-based Android operating system. I am incredibly pleased with this device.

Today I wanted to convert some video that I recorded on a Nikon Coolpix camera into a format that would play nicely on my Android phone. The resolution needed to be scaled down for the small screen, and I knew that h264 was the best video codec. After some searching online, and a bit of experimenting, I found that this worked wonderfully:

ffmpeg -i input.avi -aspect 3:2 -s 400x300 -vcodec libx264 -b 480k -r 30 -acodec libfaac -ac 1 -ab 32k -padtop 10 -padbottom 10 -padleft 40 -padright 40 -sameq -pass 1 output.mp4

Read More »

Posted in Hacks and Tricks | Tagged | 1 Comment

Helping to solve the world’s problems

About a fortnight ago Clansi drew my attention to a Sydney Morning Herald article about volunteer computing with BOINC. The Berkeley Open Infrastructure for Network Computing (BOINC) allows research teams to set up projects where anyone can get their computer to help with number-crunching. One of the most famous projects is SETI@Home (Search for Extra-Terrestrial Intelligence).

The BOINC client gets computational jobs to do from the project server, and works on them when it notices that you are not using your computer. Participants all over the world create an giant distributed “super-computer”, and idle computers do something useful.

I decided to try it out, and installed the client on my laptop about a week ago. I’ve been very impressed with the way that it does its stuff in the background, and have not had it interfere with any of my computer usage. It’s even smart enough to know not to run when I’m operating on battery power!

I’m participating in the Spinhenge@home project, which is researching “nano-magnetic molecules”. This field is somewhat related to my own research.

Here is a snapshot of my statistics so far:

My BOINC statistics

Posted in Commentary, Projects, Tech | Leave a comment

Making this website survive with low memory

Although I’ve recently upgraded the machine that I use as a webserver, it is still quite an obsolete machine. I’ve been having lots of trouble with the MySQL database (backend for this website) dying, and I’m quite sure it is a memory problem.

A quick web search led me to this good summary of low-memory configuration options for MySQL and Apache. I’ve tried some of the suggestions in my.cnf, and we’ll see if it makes a difference.

Posted in Tech | Leave a comment

Warwick Castle

Many years ago my parents visited Warwick Castle during a holiday in the UK. Being quite young and obsessed with knights and castles, I was absolutely fascinated by their stories of the visit. So coming over to a conference at the University of Warwick, the first thing that I added to my sight-seeing list was this nearby castle. Read More »

Posted in News | Tagged , | 6 Comments

Pleasant surprises all the way to Warwick

I am at the University of Warwick, in my residence room, trying not to go to sleep just yet. I can fight the jet-lag a bit longer (and thus hopefully win sooner), so let me tell you about a number of pleasant surprises that spiced up my trip from Canberra over the last 45 hours.

I took the coach from Canberra to Charles Kingsford Smith airport in Sydney (the fare of merely $15 was quite pleasant in its own right), and arrived with plenty of time to spare. I went up to the “Viewing Deck” and was excited to see a Qantas Airbus A380 for my first time. An hour or so later, as I was walking down the terminal to find my gate, I saw a Singapore Airlines A380 taxi in to the terminal. I was disappointed to have missed its landing (unless it had simply been parked somewhere), but these giant planes are still new enough for a sighting to be interesting.

My flight to Hong Kong was smooth and uneventful except for the bad local weather that delayed our landing by 20 minutes. I was on an Airbus A330, and thoughts of the recent Air France tragedy made me somewhat somber as we flew a holding pattern through the clouds. I was glad for the unremarkableness of our flight.

Most of my (shortened) transit time in Hong Kong was taken up with walking the length of the terminal back to gate 2. This might perhaps be an exaggeration, but it certainly is an enormous terminal building! My flight to London Heathrow was aboard a Boeing 747, and I was lucky enough to be sitting in the first row behind a bulkhead. The extra leg room was very pleasant indeed.

I switched on my mobile phone after landing, and was delighted to get a call from Clansi within minutes of stepping off the plane. It’s my first use of international roaming, and having it work so well is very convenient.

After meeting my supervisor (who was on a different flight that came in to a different terminal at Heathrow), I was very surprised to bump in to a friend from Sydney. Grenville Kent was just as startled to see me, and we had a brief chat about the (separate) conferences that we are here for. This chance encounter was so amazingly unlikely that it gave me quite a buzz.

But the greatest serendipity happened at lunch today. On the way from Heathrow to Warwick we stopped in at Oxford to visit some colleagues and have a look in their laboratory. Having had very early breakfasts on our planes, we decided to find some lunch. A number of restaurants and cafes failed to capture our attention, and so we headed back towards the “Lamb and Flag” (which we had passed earlier in our wanderings) for a pub lunch. On the way, however, we saw the “Eagle and Child” and were enticed by their fish-and-chips deal.

This turned out to be the very same Eagle and Child that C. S. Lewis and J. R. R. Tolkien enjoyed often with “The Inklings”! I was so glad that we stumbled upon it. Retrospectively, there are probably few things in Oxford that I would have been more interested in seeing.

Qantas A380 in SydneyThe Eagle and ChildInside The Eagle and ChildmenuOn a wall near the bar, there is a note to the landlord written in 1949 by the Inklings.

Posted in News | Tagged , | 1 Comment

Photos from the Reef

I’ve finally had the chance to tweak and upload some photos of my recent trip to the Great Barrier Reef. There was quite significant tweaking required for the underwater photos, to try and correct for the blue colour cast. Read More »

Posted in News | Tagged , | 4 Comments