Using Arroyo to Make Cool Movies
The Arroyo tutorial says that you can make movies using dwf2ppm and
ImageMagick--which is true, but I at least needed a little more direction
than that. Here's what I figured out, in a bit more detail.
Installing the Necessary Software
You'll need ImageMagick, the MPEG video player of your choice (e.g.
xanim), and an mpeg encoder. For some reason, there does not appear to
be a Debian package for mpeg2encode, which is the encoder that
ImageMagick wants to use. You can get it from here
(look for the mpeg2vidcodec package). It compiled out-of-the-box for
me. However, it lacks a "make install" command, so you'll have to
manually copy mpeg2encode
into /usr/local/bin.
(Lame!)
Making Images from Fits Files
I'll use the output files from simple_simulation for my demonstration
here. The first step is converting from FITS to PPM with the dwf2ppm tool from Arroyo. dwf2ppm -h will give you a help
screen with the options. A typical invocation might be
dwf2ppm -m -2 -M 20 -p pupil*fits
This uses a linear scale from -2 to 20 to convert the phase (-p) in a
series of pupil fits files.
If you don't specify a fixed scale on the command line, it will
autoscale for each individual image, resulting in the scale fluctuating
irregularly during your movie.
Hollywood Special Effects on the Cheap (or, how to make mpeg movies)
dwf2ppm creates a new .ppm
file for each .fits file in its argument list. If you've properly
installed mpeg2encode, then you can now just run
convert -delay 20 pupil*ppm pupil.mpeg
in order to convert your ppm files into an MPEG movie.
You can combine multiple images side-by-side using the "montage"
command from imageMagick:
montage -geometry 250x250+10+10 -label "Pupil Phase" pupil_wf_0.0000.ppm -label "PSF" image_wf_0.0000.ppm im0.ppm
Then repeat that for all the other image pairs, and pass the resulting
images to convert. With a little bit of <insert your favorite
scripting language here>, you can put together some relatively fancy
movies in short order.