Archive | January 2009

Convert images to a document (Ubuntu)

I’m currently working on refurbishing the University of Birmingham Astronomical Society’s Grubb telescope which dates back to 1882. Anyway, I’m not here to write about this, I essentially have a big bunch of pictures that I took when we took it apart and now I’m putting it back together I thought it would be rather useful to put the images together in order in one document. Of course, there are a number of ways I could do this – but I wanted a nice and quick solution, and I didn’t want to just print out the lot. I’m a Ubuntu user and as such I have a myriad of useful Linux tools all ready at the command-line and a nice a quick solution was todo the following:
Firstly make the images a bit smaller, they were all 2048 x something and that is just going to end with a large document so using mogrify I resized them:

mogrify -resize 800 *.jpg

This took 30 seconds or so, I had 60 images and so is easily scalable up to larger documents. Once complete I just used another ImageMagick tool, convert:

convert *.jpg output.pdf

This simply takes all the jpegs and adds them into a pdf, in alphabetical order. Excellent, job done. I can now print out the document using evince to get as many pages as I like out onto an A4 sheet… (I wonder how much grease and muck will get over the print out when we get around to putting all the bits together… I’ll let you know).

I was asked, “is this real?”

In the Shadow of Saturn; Credit: Cassini Imaging Team, SSI, JPL, ESA, NASA
Indeed, it is though it is a combination of images. The idea of mosaicking, or composite making is used all the time in astronomy. Essentially its normally better to take two 5 minute exposures of some object than one 10 minute (for a number of reasons, that I can go into if we want).. but its scientifically fine todo. I do mosaicking all the time, with the radio telescopes I use (the GMRT in particular) we take images of a couple of degrees of the sky which means the sky is not flat, and so to produce the image by combining the power from each antenna we have to deal with the fact that they sky is not flat… this causes some awful mathematics, so to avoid this we cut the data up into blocks, make the images separately and at the end stitch them back together.

Getting Spore to work…

Nope this is not going to be a long post on how to get Spore to work on Ubuntu, that might come later, I don’t really have time at the moment for that – though I do enjoy the challenge I fancied the challenge of the game first this time. To be honest I wish I had gone to the effort of trying to figure out how to install it in Ubuntu as I probably spent about the same amount of time as I did in bloody Vista. I’m not a Vista fan but I have it on my machine for this exact reason – to play games I can’t be bothered to mess about installing. Not that installing all games is particularly hard in Ubuntu, most in fact are rather trivial, but the newer games with sophisticated uses of graphics can be tricky.
Anyway, I was happy installing it, everything was going well. Then I got an error message saying that it is unable to install the graphics package. Hmm, so I tried retry… nothing. So I thought maybe this isn’t too crucial (with the thought at the back of my head going “its bound to be”). So I continued on, I had another message like this… can’t think what it was of now. Argh! So I navigated to the directory (sorry folder for you windows people) and noticed that the graphics package file and a bunch of others appeared to be zero file size… not a good thing. So I though, hmm maybe the disk needs remounting (i.e. taking the disc out and putting it back in). That resulted in no net gain.. still not able to read the files. So here I am thinking I got a duff disc. After a short rant and rave at the computer my lovely girlfriend reminded me that she kept the receipt (’twas a Christmas present) – so I always had the option of taking it back. Me being, well me, I persisted. Still nothing, so I though about copying over the files to the hard disk to see if I could install without the disc – this does not always work though. Of course, I still had the problem with my computer not seeing the files. So out pops my Power Book G4 (and good old MacOSX), of course Spore can be played on this system – but my laptop is not fancy enough for this. To my pleasure a quick look at the commandline told me that indeed the files weren’t blank.. and quick copy over onto the local hard drive and a copy onto my Ipod to swap onto Vista on my desktop (normally I’d just have mounted the mac as an external drive over the network but alas I can’t do that with Vista). All the files appeared. I followed the normally install procedure – all went smoothly. Annoying registration filled in and job done. Spore on my machine! Woop!
Seriously though, what the heck happened? I expect that something with the DVD must have been incompatible with my hardware or Vista. A bit of searching around (i.e. using google with the error message) suggests that I’m not the only one to have seen this issue! Oh well, at least it all works now. As for the game itself, WOW, its been a while since I was quite taken a back like this with a game… I should really stop writing this and get back to conquering the Universe.. or go and revolve… I’m not sure biggrin.gif
Oh and if you are wondering how you get this to work on Ubuntu… well there are a few guides out there: and look pretty interesting.