Surf uses that standard Starlink NDF (SUN/33) file format. This is a hierarchical format based on HDS (SUN/92) and has native support for variances, quality flags, non-linear axes and arbritrary extensions.
SCUBA raw data (i.e. data in the format expected by the Surf task reduce_switch) has the following general layout:
DATA_ARRAY
and four extensions. The extensions are
described in section 2.3. The DATA_ARRAY
is three dimensional with the following meanings:
SPIKE_LEVEL
parameter (i.e. there were more spikes in the individual sample than the specified
threshold) bit 2 is turned on. For SKYDIP observations it has a size of SCUBA__N_TEMPS
(see Appendix C, usually 3) corresponding to the different temperatures measured
(AMBIENT, SKY and COLD).
BOL_CHAN
and BOL_ADC
arrays in the SCUBA
extension.
EXP_TIME
). This dimension must be greater than any value stored in the DEM_PNTR
array.
For a JIGGLE observation the size can be calculated (assuming the observation was not
aborted early)
The reduce_switch task converts the raw SCUBA format into a more NDF-like format with proper variance and quality arrays (extracted by reduce_switch from the SCUBA data array), axes, history reporting, a title and units.
Here is an example of the reduce_switch output for a Mars pointing observation:
The data arrays are now 2 dimensional, corresponding to the bolometer number and time axis. The
axis information is written so that the integration number is reflected on the Y axis. Additionally, a
new extension, REDS
, is created to hold the relative beam weights; for maps these are always set to
0,1,0.
A photometry observation is slightly different from a map observation in that the output data array is now 3 dimensional rather than 2:
The 3rd dimension corresponds to beam position. In most cases only beam 2 is used (the middle
beam) but for two or three bolometer chopping the 1st and 3rd beams will be accessed. In general, the
1st and 3rd beams are simply scaled versions of the middle beam; the relative weighting of the beams
is stored in the newly created BEAM_WT
array in the REDS
extension. In the above example, the middle
beam is -0.5 times the left or right beams.
The information describing the observation can be found in the NDF extensions. Surf expects to find the following extensions in data files:
The FITS extension is an array of 80 character strings stored in a format identical to a standard FITS header. This contains general information about the observation but no array information. Listings of full SCUBA FITS headers can be found in Appendix D. Surf only requires a subset of the full SCUBA headers. For a jiggle map these are listed in table 1.
OBJECT | Name of object |
RUN | Run number of observation |
MODE | Type of observation (MAP, PHOTOM, SKYDIP etc) |
SAM_MODE | Sampling method (JIGGLE or RASTER) |
SAM_CRDS | Coordinate frame of jiggle or scan |
SAM_PA | Scan PA (not required for jiggle) |
LAT | Latitude of object (eg Declination) |
LONG | Longitude of object (eg Right Ascension) |
CENT_CRD | Coordinate frame of LONG/LAT (RB,RJ,GA etc) |
UTDATE | Date of observation in YYYY:MM:DD format |
UTSTART | UT time of start of observation (HH:MM:SS) |
STSTART | Local sidereal time of start of observation (HH:MM:SS) |
STEND | LST of end of observation |
EXP_TIME | Exposure time (seconds) of each individual sample |
MAP_X | Tangent plane X offset from tracking centre |
MAP_Y | Tangent plane Y offset from tracking centre |
N_BOLS | Number of bolometers selected (should match data array) |
STATE | State at end of observation (ABORT indicates early abort) |
VERSION | Version of real-time software (see SURFLIB_PROCESS_BOLS) |
JIGL_CNT | Number of offsets in jiggle pattern |
J_PER_S | Number of jiggles per switch |
J_REPEAT | No. of jiggle pattern repeats in switch |
CNTR_DU3 | Nasmyth dU3 coord of instrument centre |
CNTR_DU4 | Nasmyth dU4 coord of instrument centre |
LAT-OBS | Latitude of observatory (degrees) |
LONG-OBS | East longitude of observatory (degrees) |
TELESCOP | Telescope name |
INSTRUME | Instrument name |
CHOP_THR | Chopper throw (arcsec) |
CHOP_PA | Chopper PA 0=in lat, 90=in long |
CHOP_FRQ | Chopper frequency (Hz) |
CHOP_CRD | Coordinate frame of chop |
CHOP_FUN | Chopper waveform (SQUARE, TRIPOS) |
N_SUBS | Number of sub-instruments |
SUB_1 | Name of sub-instrument 1 (or ’not used’) |
SUB_2 | Name of sub-instrument 2 (or ’not used’) |
SUB_3 | Name of sub-instrument 3 (or ’not used’) |
SUB_4 | Name of sub-instrument 4 (or ’not used’) |
SUB_5 | Name of sub-instrument 5 (or ’not used’) |
FILT_1 | Filter name for sub-instrument 1 (or ’not used’) |
FILT_2 | Filter name for sub-instrument 2 (or ’not used’) |
FILT_3 | Filter name for sub-instrument 3 (or ’not used’) |
FILT_4 | Filter name for sub-instrument 4 (or ’not used’) |
FILT_5 | Filter name for sub-instrument 5 (or ’not used’) |
WAVE_1 | Wavelength of sub-instrument 1 (microns) |
WAVE_2 | Wavelength of sub-instrument 2 (microns) |
WAVE_3 | Wavelength of sub-instrument 3 (microns) |
WAVE_4 | Wavelength of sub-instrument 4 (microns) |
WAVE_5 | Wavelength of sub-instrument 5 (microns) |
The SCUBA
extension contains information on the instrument and the structure of the data array. It has
the following format (output of hdstrace):
The first 5 entries are simply the flatfield information (see Appendix E for an example flatfield file). The shape of the arrays (in this case ) corresponds to the number of channels on each A/D card and the number of A/D cards. These dimensions must match the values of the constants SCUBA__NUM_ADC and SCUBA__NUM_CHAN (Appendix C).
The full description of these entries follows:
sculib_flatfield_data
routine): (1) |
where is the selected bolometer.
sculib_flatfield_data
)to set bit 1 in
the NDF quality array.
This information is also available in string form in the PHOT_BBF
FITS keyword. For
non-PHOTOM based observations this structure is 0.
This array is used to convert from measurement, integration, exposure and switch number to
sample number (i.e. the final dimension in the data array). The routines SCULIB_FIND_SWITCH
and SCULIB_FIND_INT
are provided to simplify this (they also return the position of the end
of the switch or integration). It has dimensions of N_SWITCHES, N_EXPOSURES,
N_INTEGRATIONS, and N_MEASUREMENTS.
The SCUCD
extension contains information on telescope movements. It is slightly different for JIGGLE
(MAP and PHOTOM) and SCAN observations. For a JIGGLE observation it has the following
format:
and for a SCAN observation:
The full description of these entries follows:
These are the X and Y coordinates of the jiggle pattern in arcsecond offsets. The
coordinate frame is given in the SAM_CRDS
FITS keyword. They are only used for JIGGLE
observations.
This is the local sidereal time of the start of every switch expressed as decimal
radians. It has dimensions of N_SWITCHES, N_EXPOSURES, N_INTEGRATIONS,
and N_MEASUREMENTS. The current epoch of observation (Modified Julian Date) is
calculated from the UTSTART and UTDATE FITS keywords in SCULIB_GET_MJD
.
This is the apparent RA and Dec of the start (RA1, DEC1) and end (RA2,
DEC2) of the scans in radians. The dimensions are N_SWITCHES, N_EXPOSURES,
N_INTEGRATIONS, and N_MEASUREMENTS. The current epoch of observation
(Modified Julian Date) is calculated from the UTSTART and UTDATE FITS keywords in
SCULIB_GET_MJD
.
For polarimetry observations (POLPHOT or POLPMAP) this array contains the
waveplate angle for each measurement (where a measurement is defined as a move of
the waveplate). It is used by the SURFLIB_FILL_WPLATE
routine.
The REDS
1
extension is created by SURF as a general purpose repository of information that should be passed
between SURF tasks.
It can contain the following entries:
1The name REDS
is historical, at some time in the distant past the SCUBA data reduction software was called Reds,
standing for ‘REDuction Scuba’