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> 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).


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>

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

fits2ndf in=’[1]’ out=’w’
fits2ndf in=’[2]’ out=’x’ 

and so on. 

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