Converting from WSA MEFs to Starlink SDFs

Converting from WSA MEFs to Starlink SDFs

MEF files

Downloaded image files from the WSA are currently Rice-compressed Multiextension FITS files, in which four extensions correspond to the four WFCAM detectors. The file name format is typically w<date>_<num>_sf_st.fit. This page shows how to (i) reverse the Rice compression to get an uncompressed MEF, and (ii) how to then convert into Starlink SDF files.

Disk space

First, make sure you have enough disk space (because a single 5-point jitter with 2×2 microstepping will, when uncompressed, weigh in at more than 130 Mbyte per camera).

Converting

Get and install the imcopy programme referred to on the WSA site.

The conversion from compressed MEF into SDFs for the individual cameras is a two-step process. Undo the Rice compression and extract the individual camera images as follows:

imcopy   w<date>_<num>_sf_st.fit    temp.fit

then run up the Starlink conversion routines and use fits2ndf to effect the conversion:

convert
fits2ndf in=’temp.fit[1]’ out=’w’
fits2ndf in=’temp.fit[2]’ out=’x’ 

and so on. 

Starlink files w.sdf, x.sdf, etc. are then the individual camera mosaics.