E File naming and data structures

 E.1 Naming Conventions
 E.2 Structure of RO files
 E.3 Structure of demodulated files

Unless instructed otherwise in the observation definition file (ODF) the SCUBA software writes a demodulated data file (essentially the raw data) and a reduced observation (RO) file to disk.

E.1 Naming Conventions

SCUBA data files have the following naming convention: string_obs type_run number.sdf. Where string is either the UT date of the observation in YYYYMMDD format or the PATT ID for the observation.

Therefore the first data from 23rd June 1997 will be in files

  % ls
  19970623_dem_0001.sdf
  19970623_red_0001.sdf

for the demodulated and reduced data respectively.

The RO file contains the reduced data calculated by the telescope during the observation and supplies a first look at the data. At present the on-line system does not produce calibrated publishable quality images – the data should be re-processed using the demodulated data and Surf.

E.2 Structure of RO files

Since SCUBA can produce data from more than one sub-instrument simultaneously and yet only one file is wanted for each observation, the RO files are in fact HDS container files containing NDFs. In general there is one NDF for each sub-instrument used plus one NDF containing all the observation parameters (it is a blank NDF containing a FITS extension).

For example, a map observation with the LONG and SHORT wave array would produce an RO file with the following structure:

  % hdstrace m97az98_red_0001
  M_970308_50  <SCUDR_MAP>
  
      LONG  <NDF>
          ....image from long-wave array
  
      SHORT <NDF>
          ....image from short-wave array
  
      HEADER <NDF>
          ....Observation parameters in FITS extension

The image from the long wave array would be displayed in Kappa with:

  % display clear axes m97az98_red_0001.long

and the FITS information would be displayed with:

  % fitslist m97az98_red_0001.header

In addition to one NDF per sub-instrument, there is also one NDF per measurement. For example, the RO file from a FOCUS observation would contain an NDF for each FOCUS position names MEAS_1, MEAS_2 etc. – this is the case for FOCUS and ALIGN observations. Skydip data is slightly different since the names of the NDFs are of the form SUB_WAVELENGTH (i.e. SHORT_450 and LONG_850).

If an observation is only using a particular bolometer (eg a FLATFIELD or PHASE observation) there will be an NDF for the bolometer (eg H7) rather than for the array as a whole.

E.3 Structure of demodulated files

Demodulated data files are much more complicated as they have to contain a full description of the state of SCUBA for each observation. Here is an example trace (the map of 3C279 used in the example):

  % hdstrace apr8_dem_0059
  
  STRUCT  < >
  
     MORE           <EXT>           {structure}
        FIGARO         <FIGARO_EXT>    {structure}
           {structure is empty}
  
        SCUCD          <SCUCD_ST>      {structure}
           JIGL_X(64)     <_REAL>         5.3457,0,-5.3457,-8.033999,
                                          ... 0,-5.3457,-8.033999,-2.6883,2.6883
           JIGL_Y(64)     <_REAL>         12.36,12.36,12.36,10.815,10.815,
                                          ... -9.27,-10.815,-10.815,-10.815
           DEC1           <_REAL>         0
           DEC2           <_REAL>         0
           LST_STRT(2,4,3,1)  <_DOUBLE>   3.23079147492436,3.2322998582771,
                                          ... 3.26511400298336,3.26350802081885
           RA1            <_REAL>         0
           RA2            <_REAL>         0
  
        SCUBA          <SCUBA_ST>      {structure}
           BOL_CALB(16,9)  <_REAL>        0.858,0.9311,0.9499,1.002,0.9585,
                                          ... 1.213,0.928,1.304,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        <_INTEGER>      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(62,2,4,3,1)  <_INTEGER>   20,19,18,18,18,18,18,15,14,13,
                                            ... 14,13,14,16,22,23,31,41,0,0,0,0
           NPIX(62,2,4,3,1)  <_INTEGER>   2,5,12,13,28,29,29,32,33,34,34,35,
                                          ... 37,36,34,32,30,24,23,14,3,0,0,0,0
           POINTER(62,2,4,3,1)  <_INTEGER>   2,4,9,21,34,62,91,120,152,185,
                                             ... 52804,52807,52807,52807,52807
  
        FITS(164)      <_CHAR*80>      ’ACCEPT  = ’not used’           / ac...’
                                       ... ’WAVE_5  =                 ...’,’END’
  
     DATA_ARRAY(5,128,384)  <_REAL>   0.011504,0.000014,0.029308,0.000015,0,
                                      ... 0.006727,0.000003,0.022551,0.000003,0
                                          ... 0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1
  
  End of Trace.

From this we can see that there is a 3 dimensional data array and 4 NDF extensions. Each will be described in turn:

DATA_ARRAY

The data array contains three dimensions. The first dimension is a vector of size 5 and relates to the chop data, the chop error, the calibrator data the calibrator error and the quality respectively. The second dimension is the bolometers and the third is the number of measurements (ie number of jiggle positions × number of integrations × 2 (number of nods)). These data can be displayed to examine each component in turn (for example checking whether the OFF position contains a source) by using NDF sections.

FIGARO extension

The Figaro extension is not used by the Surf package.

SCUCD extension

The SCUCD extension contains information on the position of the telescope for each sample along with the local sidereal time of each sample.

SCUBA extension

The SCUBA extension contains the flatfield information (position of the bolometers, sub-intrument of bolometers, quality of bolometers and A-to-D card). There are also arrays to aid in the location of each jiggle in the data array (DEM_PNTR).

FITS extension

The FITS Extension is described in the next appendix.

In addition a new extension is created by the Surf package itself. This extension (called REDS for historical reasons) contains beam weights for chopping, and pointing corrections. In general this extension is created for PHOTOMetry observations and by the change_pointing task.

A more detailed description of the file format can be found in Starlink System Note 72.