HTML automatically generated with rman
Table of Contents


vmsfix - attempt to fix up mangled VMS FITS files


vmsfix in=infile out=outfile [parameter=value]


vmsfix can fix up funny ‘‘FITS’’ files, e.g. the ones written with the VMS copy command and winding up on a Unix machine.

For example, the Unix command dd(1)

   % dd if=/dev/rmt5 of=temp bs=1024 
can be used to extract the mangled FITS files from tape, which is then followed by a conversion to true FITS using vmsfix:
   % vmsfix in=temp out=1.fits
(Note: zodiac(1L) can process both DECORDER=T and F files - see the swap keyword below).


The following parameters are recognized in any order if the keyword is also given:
input file, in funny VMS fits format [no default].
output file, more proper FITS format without the VMS headers and trailers. [No default].
If set to true, swaps the DECORDERed bytes, corrects fits SIMPLE keyword to T and DECORDER keyword to F. This is needed for display with programs like ds(1L) or if true FITS files are needed. If zodiac processes the outfile, swap=f can be used though, as long as DECORDER is specified correctly. Note: DECORDER is not a standard FITS keyword, and its use is not recommended. [Default: t].
Extra offset into the FITS data block. The first offset-pixels are skipped in order to get the bias strip lined up on the left part of the image. At this stage it is not understood why this is needed, merely introduced as a kludge. It may also results into a few bad pixels near the end of the image file, the last row(s). Perhaps the default is NAXIS1/2+1? [Default: 521]


Can only handle two-dimensional (NAXIS=2) and BITPIX=16 image FITS files.

The input file is not truely 28800 blocked in the FITS sense. The header appears in the first 28800 bytes, together with the first part of the data. The data in the second and subsequent blocks is indeed in chunks of 28800 bytes, preceded by a 1024 byte VMS header (denoting the 28800 size of the block to come), and (since apparently written in VMS 30 blocks of 1024 blocks) trailed by a small 896 byte block garbage to be skipped too.

The very first block of 1024 characters starting with (0xFF,0xFF) is optional, followed by a 1024 VMS block size designator. The program detect such not understood anomalies, and reports how many bytes needed to be skipped to get at the FITS header.

See Also

scanfits(1NEMO) , fits(5NEMO)


Peter Teuben


~/usr/pjt/clib    vmsfix.c

Update History

9-jun-91    V1.0: kludged created for Zodiac             PJT
11-jun-91    V1.2: finally got the real story, apart from offset=    PJT

Table of Contents