2 SURF File Format

 2.1 Raw data format
 2.2 SURF Format
 2.3 Extensions

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.

2.1 Raw data format

SCUBA raw data (i.e. data in the format expected by the Surf task reduce_switch) has the following general layout:

  STRUCT  <NDF>
  
     MORE           <EXT>           {structure}
        FIGARO         <FIGARO_EXT>    {structure}
  
        SCUCD          <SCUCD_ST>      {structure}
  
        SCUBA          <SCUBA_ST>      {structure}
  
        FITS(171)      <_CHAR*80>      ’ACCEPT  = ’not used’           / ac...’
                                       ... ’WAVE_5  =                 ...’,’END’
  
     DATA_ARRAY(5,130,900)  <_REAL>   0.0102353,1.9114159E-6,0.0184784,
                                      ... 1.7097691E-5,0.01525085,1.841503E-5,0

It is a very simple NDF format with a single DATA_ARRAY and four extensions. The extensions are described in section 2.3. The DATA_ARRAY is three dimensional with the following meanings:
(1)
The size of the first dimension depends on the observing mode. For jiggle and noise observations it has size 5 corresponding to the demodulated data, variance on demodulated data, internal calibrator signal, variance on calibrator signal and data quality. For SCAN/MAP observations it has size 4 corresponding to the demodulated data, variance on demodulated data, internal calibrator signal and data quality (i.e. the calibrator variance is not stored for scan maps). The data quality is converted from a REAL number to a standard UBYTE quality (appendix 4): if the quality is odd, this indicates the flatfield was set to zero so bit 1 is turned on (this is also done using the flatfield task), if the quality is greater than the value specified via the 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).
(2)
The second dimension corresponds to the number of bolometers observed. This should match the size of the BOL_CHAN and BOL_ADC arrays in the SCUBA extension.
(3)
The third dimension is the time axis and is equal to the total number of samples (of length 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)

2.2 SURF Format

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:

  O10  <NDF>
  
     DATA_ARRAY(37,32)  <_REAL>     -0.003304771,0.0002364833,0.00320935,
                                    ... 0.0003040197,0.001364953,-0.007496601
     MORE           <EXT>           {structure}
        FIGARO         <FIGARO_EXT>    {structure}
           {structure is empty}
  
        SCUCD          <SCUCD_ST>      {structure}
           JIGL_X(16)     <_REAL>         5.3766,10.6914,10.6914,5.3766,0,
                                          ... -10.6914,-5.3766,0,5.3766,-5.3766
           JIGL_Y(16)     <_REAL>         -3.09,0,6.18,9.27,12.36,9.27,6.18,
                                          ... 6.18,0,-3.09,-6.18,-9.27,-9.27
           DEC1           <_REAL>         0
           DEC2           <_REAL>         0
           LST_STRT(2,1,2,1)  <_DOUBLE>   3.9425429572598,3.9440140603798,
                                          3.9469952223685,3.9454089275179
           RA1            <_REAL>         0
           RA2            <_REAL>         0
  
        SCUBA          <SCUBA_ST>      {structure}
           BOL_CALB(16,9)  <_REAL>        1.286,0.9311,0.9499,1.002,0.9585,
                                          ... 1.054,1.065,1.045,1,1,1,1,1,1,0
           BOL_DU3(16,9)  <_REAL>         57.08,45.9,36.15,24.64,14.55,3.62,
                                          ... -15.78,9.047,-54.65,0,0,0,0,0,0
           BOL_DU4(16,9)  <_REAL>         -28.14,-35.91,-41.46,-49.62,
                                          ... 63.89,77.76,71.16,0,0,0,0,0,0
           BOL_QUAL(16,9)  <_INTEGER>     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                          ... 0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1
           BOL_TYPE(16,9)  <_CHAR*20>     ’SHORT’,’SHORT’,’SHORT’,’SHORT’,
                                          ... ’P...’,’P1350_DC’,’P1100_DC’,’BAD’
           BOL_ADC(37)    <_INTEGER>      7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,
                                          ... 8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9
           BOL_CHAN(37)   <_INTEGER>      1,2,3,4,7,8,9,10,11,13,14,15,16,1,
                                          ... 12,13,14,15,16,1,2,3,4,5,6,7,8,9
           FLAT_ADC       <_INTEGER>      0
           FLAT_CHN       <_INTEGER>      0
           FLAT_IND       <_INTEGER>      0
           PHOT_BB        <_INTEGER>      0
           ISTART         <_INTEGER>      0
           NPIX           <_INTEGER>      0
           POINTER        <_INTEGER>      0
           DEM_PNTR(1,2,1)  <_INTEGER>    1,17
  
        FITS(171)      <_CHAR*80>      ’ACCEPT  = ’PROMPT  ’           / ac...’
                                       ... ’WAVE_5  =                 ...’,’END’
        REDS           <SURF_EXTENSION>   {structure}
           BEAM_WT(3)     <_REAL>         0,1,0
  
     HISTORY        <HISTORY>       {structure}
        CREATED        <_CHAR*24>      ’1999-AUG-11 17:04:57.000’
        CURRENT_RECORD  <_INTEGER>     1
        RECORDS(10)    <HIST_REC>      {array of structures}
  
        Contents of RECORDS(1)
           DATE           <_CHAR*24>      ’1999-AUG-11 17:04:57.000’
           COMMAND        <_CHAR*29>      ’REDUCE_SWITCH   (SURF V1.4-3)’
           USER           <_CHAR*4>       ’timj’
           HOST           <_CHAR*6>       ’lapaki’
           DATASET        <_CHAR*33>      ’/local/jcmt/scratch/timj/orac/o10’
           TEXT(3)        <_CHAR*72>      ’Parameters: IN=@10 MSG_FILTER=’N...’
                                          ... ’Software: /star/bin/surf/redu...’
  
     QUALITY        <QUALITY>       {structure}
        QUALITY(37,32)  <_UBYTE>       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                       ... 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
        BADBITS        <_UBYTE>        7
  
     VARIANCE(37,32)  <_REAL>       1.0950339E-6,7.1230471E-7,6.6492021E-7,
                                    ... 4.2760187E-9,7.4043317E-5,4.8094225E-6
     AXIS(2)        <AXIS>          {array of structures}
  
     Contents of AXIS(1)
        DATA_ARRAY(37)  <_REAL>        1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
                                       ... 26,27,28,29,30,31,32,33,34,35,36,37
        LABEL          <_CHAR*9>       ’Bolometer’
  
     LABEL          <_CHAR*8>       ’Raw data’
     TITLE          <_CHAR*30>      ’mars’
     UNITS          <_CHAR*5>       ’Volts’
  
  End of Trace.

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:

  O107  <NDF>
  
     MORE           <EXT>           {structure}
        FIGARO         <FIGARO_EXT>    {structure}
           {structure is empty}
  
        SCUCD          <SCUCD_ST>      {structure}
           JIGL_X(9)      <_REAL>         0,2,2,0,-2,-2,-2,0,2
           JIGL_Y(9)      <_REAL>         0,0,2,2,2,0,-2,-2,-2
           DEC1           <_REAL>         0
           DEC2           <_REAL>         0
           LST_STRT(2,1,8,1)  <_DOUBLE>   1.8834042737017,1.8844116777459,
                                          ... 1.8981978240679,1.8971856029149
           RA1            <_REAL>         0
           RA2            <_REAL>         0
  
        SCUBA          <SCUBA_ST>      {structure}
           BOL_CALB(16,9)  <_REAL>        1.286,0.9311,0.9499,1.002,0.9585,
                                          ... 1.054,1.065,1.045,1,1,1,1,1,1,0
           BOL_DU3(16,9)  <_REAL>         57.08,45.9,36.15,24.64,14.55,3.62,
                                          ... -15.78,9.047,-54.65,0,0,0,0,0,0
           BOL_DU4(16,9)  <_REAL>         -28.14,-35.91,-41.46,-49.62,
                                          ... 63.89,77.76,71.16,0,0,0,0,0,0
           BOL_QUAL(16,9)  <_INTEGER>     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                          ... 0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1
           BOL_TYPE(16,9)  <_CHAR*20>     ’SHORT’,’SHORT’,’SHORT’,’SHORT’,
                                          ... ’P...’,’P1350_DC’,’P1100_DC’,’BAD’
           BOL_ADC(130)   <_INTEGER>      1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
                                          ... 8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9
           BOL_CHAN(130)  <_INTEGER>      1,2,3,4,5,6,7,8,9,10,11,12,13,14,
                                          ... 12,13,14,15,16,1,2,3,4,5,6,7,8,9
           FLAT_ADC       <_INTEGER>      0
           FLAT_CHN       <_INTEGER>      0
           FLAT_IND       <_INTEGER>      0
           PHOT_BB(3,2)   <_INTEGER>      0,112,0,0,46,0
           ISTART         <_INTEGER>      0
           NPIX           <_INTEGER>      0
           POINTER        <_INTEGER>      0
           DEM_PNTR(1,8,1)  <_INTEGER>    1,10,19,28,37,46,55,64
  
        FITS(171)      <_CHAR*80>      ’ACCEPT  = ’not used’           / ac...’
                                       ... ’WAVE_5  =                 ...’,’END’
        REDS           <SURF_EXTENSION>   {structure}
           BEAM_WT(3)     <_REAL>         0.5,1,0.5
  
     HISTORY        <HISTORY>       {structure}
        CREATED        <_CHAR*24>      ’1999-AUG-11 17:08:24.000’
        CURRENT_RECORD  <_INTEGER>     1
        RECORDS(10)    <HIST_REC>      {array of structures}
  
        Contents of RECORDS(1)
           DATE           <_CHAR*24>      ’1999-AUG-11 17:08:24.000’
           COMMAND        <_CHAR*29>      ’REDUCE_SWITCH   (SURF V1.4-3)’
           USER           <_CHAR*4>       ’timj’
           HOST           <_CHAR*6>       ’lapaki’
           DATASET        <_CHAR*34>      ’/local/jcmt/scratch/timj/orac/o107’
           TEXT(3)        <_CHAR*72>      ’Parameters: IN=@107 MSG_FILTER=’...’
                                          ... ’Software: /star/bin/surf/redu...’
  
     DATA_ARRAY(130,72,3)  <_REAL>   -0.0002527004,-0.0006291242,
                                     ... 1.1537035E-5,0.001769435,0.001728294
     QUALITY        <QUALITY>       {structure}
        QUALITY(130,72,3)  <_UBYTE>    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                       ... 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
        BADBITS        <_UBYTE>        7
  
     VARIANCE(130,72,3)  <_REAL>    3.6919182E-6,3.6207405E-6,4.2371025E-6,
                                    ... 1.3244949E-8,0.0002660675,2.1535034E-5
     AXIS(3)        <AXIS>          {array of structures}
  
     Contents of AXIS(1)
        DATA_ARRAY(130)  <_REAL>       1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
                                       ... 122,123,124,125,126,127,128,129,130
        LABEL          <_CHAR*9>       ’Bolometer’
  
     LABEL          <_CHAR*8>       ’Raw data’
     TITLE          <_CHAR*30>      ’hltau’
     UNITS          <_CHAR*5>       ’Volts’
  
  End of Trace.

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.

2.3 Extensions

The information describing the observation can be found in the NDF extensions. Surf expects to find the following extensions in data files:

2.3.1 FITS

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)
Table 1: FITS keywords required by Surf for Jiggle mapping

2.3.2 SCUBA

The SCUBA extension contains information on the instrument and the structure of the data array. It has the following format (output of hdstrace):

  SCUBA          <SCUBA_ST>      {structure}
     BOL_CALB(16,9)  <_REAL>        1.286,0.9311,0.9499,1.002,0.9585,
                                    ... 1.054,1.065,1.045,1,1,1,1,1,1,0
     BOL_DU3(16,9)  <_REAL>         57.08,45.9,36.15,24.64,14.55,3.62,
                                    ... -15.78,9.047,-54.65,0,0,0,0,0,0
     BOL_DU4(16,9)  <_REAL>         -28.14,-35.91,-41.46,-49.62,
                                    ... 63.89,77.76,71.16,0,0,0,0,0,0
     BOL_QUAL(16,9)  <_INTEGER>     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                    ... 0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1
     BOL_TYPE(16,9)  <_CHAR*20>     ’SHORT’,’SHORT’,’SHORT’,’SHORT’,
                                    ... ’P...’,’P1350_DC’,’P1100_DC’,’BAD’
     BOL_ADC(128)   <_INTEGER>      1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
                                    ... 8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9
     BOL_CHAN(128)  <_INTEGER>      1,2,3,4,5,6,7,8,9,10,11,12,13,14,
                                    ... 12,13,14,15,16,1,2,3,4,5,6,7,8,9
     FLAT_ADC       <_INTEGER>      0
     FLAT_CHN       <_INTEGER>      0
     FLAT_IND       <_INTEGER>      0
     PHOT_BB(3,2)   <_INTEGER>      0,112,0,0,46,0
     DEM_PNTR(2,4,3,1)  <_INTEGER>   1,17,49,33,65,81,113,97,129,145,
                                     ... 257,273,305,289,321,337,369,353
     ISTART         <_INTEGER>      0
     NPIX           <_INTEGER>      0
     POINTER        <_INTEGER>      0

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 16 × 9) 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:

BOL_CALB

These are the actual flatfield values and contain the response of each pixel relative to a reference pixel (usually the centre pixel on each array, H7 and C14). This correction is applied to the data using the flatfield task (specifically the sculib_flatfield_data routine):
Vflatfielded(B) = Voriginal(B) ×BOL_CALB(B) (1)

where B is the selected bolometer.

BOL_DU3

These are the X coordinates of every bolometer. For SCUBA, these are arcsec X (U3) offsets (i.e. dU3) from the left-hand Nasmyth centre.
BOL_DU4

These are the Y coordinate of every bolometer. For SCUBA, these are arcsec Y (U4) offsets (i.e. dU4) from the left-hand Nasmyth centre.
BOL_QUAL

This is an array of quality flags. A 0 indicates that the bolometer is ‘good’, a 1 indicates that the bolometer is ‘bad’. This array is used during flatfielding (sculib_flatfield_data)to set bit 1 in the NDF quality array.
BOL_TYPE

This array contains a textual description of the sub-instrument to which each bolometer belongs. This information is used by the extinction task to select the bolometers from the specified sub-instrument.
BOL_ADC

This array contains the A/D card numbers corresponding to each of the bolometers that were used for the observation. The order and size should match the size of the second dimension of the main data array for raw SCUBA data and the first dimension for data that has been processed by reduce_switch. The extinction task modifies this array to reflect the sub-instrument selection.
BOL_CHAN

This array contains the A/D channel numbers corresponding to each of the bolometers that were used for the observation. The order and size should match the size of the second dimension of the main data array for raw SCUBA data and the first dimension for data that has been processed by reduce_switch. The extinction task modifies this array to reflect the sub-instrument selection.
FLAT_ADC

Not used by Surf.
FLAT_CHN

Not used by Surf.
FLAT_IND

Not used by Surf.
PHOT_BB

This is only used for PHOTOM (and POLPHOT) observations. The first dimension corresponds to the number of beam positions (3 for 2 position chopping with nodding) and the second dimension corresponds to the number of sub-instruments used for the observation. The array contains the bolometer number (using the same indexing scheme as for the BOL_CHAN and BOL_ADC arrays) that is on source for each of the beam positions. For standard single bolometer photometry only the middle beam is on source and in the example shown only H7 and C14 are used for the photometry. The scuphot task uses this array to decide which bolometers to extract from the full dataset. The extinction task modifies this array to reflect the sub-instrument selection.

This information is also available in string form in the PHOT_BBF FITS keyword. For non-PHOTOM based observations this structure is 0.

DEM_PNTR

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.

ISTART

Not used by Surf.
NPIX

Not used by Surf.
POINTER

Not used by Surf.
2.3.3 SCUCD

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:

  STRUCT.MORE.SCUCD  <SCUCD_ST>
  
     JIGL_X(64)     <_REAL>         -2.6883,-5.3457,-8.033999,-13.3797,
                                    ... 5.3457,2.6883,0,2.6883,0,2.6883,0,0
     JIGL_Y(64)     <_REAL>         1.545,3.09,1.545,1.545,3.09,4.635,6.18,
                                    ... -9.27,-7.725,-6.18,-4.635,-3.09,0
     DEC1           <_REAL>         0
     DEC2           <_REAL>         0
     LST_STRT(2,4,3,1)  <_DOUBLE>   5.6288711444511,5.630383297715,
                                    ... 5.6639924748021,5.6623806283313
     RA1            <_REAL>         0
     RA2            <_REAL>         0

and for a SCAN observation:

  STRUCT.MORE.SCUCD  <SCUCD_ST>
  
     JIGL_X         <_REAL>         0
     JIGL_Y         <_REAL>         0
     DEC1(1,5,1,1)  <_REAL>         -17.06608,-17.04154,-17.10884,-17.07168,
                                    -17.11085
     DEC2(1,5,1,1)  <_REAL>         -17.03781,-17.09083,-17.04711,-17.11225,
                                    -17.09126
     LST_STRT(1,5,1,1)  <_DOUBLE>   5.521871430823,5.5231108938446,
                                    ... 5.5266851885263,5.5281428875176
     RA1(1,5,1,1)   <_REAL>         21.16225,21.16618,21.16226,21.1673,
                                    21.16577
     RA2(1,5,1,1)   <_REAL>         21.16466,21.16197,21.16755,21.1638,
                                    21.16747
     WPLATE         <_REAL>         0

The full description of these entries follows:

JIGL_X and JIGL_Y

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.

LST_STRT

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.

RA1, DEC1, RA2 and DEC2

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.

WPLATE

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.

2.3.4 REDS

The REDS1 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:

BEAM_WT

The relative weight of the beams. Only used for PHOTOM observations. This is created by reduce_switch.
SKY

An NDF containing the estimate of the sky fluctuations. This is usually created by calcsky and is used by remsky to remove the sky fluctuations. The size of the NDF should match the size of the time axis in the main data array.
BOLWT

Relative weight of each bolometer. Created by setbolwt and used by rebin.

1The name REDS is historical, at some time in the distant past the SCUBA data reduction software was called Reds, standing for ‘REDuction Scuba’