3 Aborted data files

When an observation completes normally (either because the specified number of measurements has been taken or a TERMINATE command has been issued) the size of the final dimension of the data array and the contents and shape of the DEM_PNTR array agree. In some cases an observation must be aborted suddenly using the ABORT command. Aborted observation files do not always have the correct shape for DEM_PNTR (e.g. the number of integrations specified by the second dimension of the array does not agree with the number that were actually observed). Surf overcomes this problem by looking in the STATE FITS keyword; if it contains the string “ABORTING” the exposure, integration and measurement values are read from the FITS keywords LAST_EXP, LAST_INT and LAST_MEAS respectively.