DCR FITS Notes
These are notes to help in the transition between the old VxWorks DCR and the new Linux DCR. Part of the transition involves updading the DCR FITS files. There are three issues to address in this transition:
- The DCR does not write its own FITS files.
- The DcrServer currently uses a Solaris only FITS library called TABFITS.
- DCR FITS files are not standard.
The DCR does not write its own FITS files
The DCR relies on a DcrServer process on a Solaris machine (vortex) to write the files. The DCR manager communicates via RPC with this server. The FITS writing capability is to be integrated into the new Linux DCR. This involves the creation of a new DcrFits class, based on the M&C FitsIO class, that will be integrated into the DCR process.
The DCR uses TABFITS, a Solaris only library
The new Linux DCR will use instead the standard M&C approach, which is to use the M&C FitsIO class, itself based on the CFITSIO library.
DCR FITS files are not standard.
DCR's non-standard nomenclature
The DCR uses terms to describe the parts of a measurement that are at odds with the terms used in other GBT backends. These diagrams show the differences:
Primary vs. standard Primary FITS headers
The DCR Primary Header does not follow the M&C standard. It includes some keywords included in the standard, some that map to the standard but are not the same as the standard, and also includes its own DCR specific keywords. The following examples help illustrate this.
The DCR FITS main header looks like this:
SIMPLE = T / File conforms to FITS standards.
BITPIX = 8 /
NAXIS = 0 / No image data array present.
EXTEND = T / Standard table extensions follow.
SCAN = 34 / Scan number
SCANID = 'unknown ' / Scan ID
PROJECT = 'TREG ' / Project ID
OBJECT = '1800+7828' / Source
UTDATE = 53453 / MJD of start time
UTCSTART= 3.343600000000E+04 / Start time
BACKEND = 'DCR ' / Digital Continuum Receiver
FITSVER = '0.0 ' / FITS definition version for this device
CYCLETIM= 1.000000000000E-01 / Cycle time in seconds
CYCLES = 1 / Cycles per Integration
DURATION= 1.000000000000E-01 / Integration time
NPHASES = 2 / Number of Phases
INPBNK = 'A ' / IF bank A or B
NRCVRS = 2 / Number of IFs
ADVSIG1 = 'CAL ' / Adv Timing signal one
ADVSIG2 = 'SIGREF ' / Adv Timing signal two
ADVTIME = 2.000000000000E-06 / Time advance in seconds
COMMENT Green Bank Telescope Project
END
A compliant FITS Primary Header looks like this (from Device and Log FITS Files for the GBT):
SIMPLE = T / file does conform to FITS standard
BITPIX = 8 / number of bits per data pixel
NAXIS = 0 / number of data axes
EXTEND = T / FITS dataset may contain extensions
ORIGIN = 'NRAO Green Bank' /
INSTRUME= 'Spectrometer' / device or program of origin
GBTMCVER= '3.3.0 ' / telescope control software release
FITSVER = '2.1 ' / FITS definition version for this device
DATEBLD = '2004-12-03T00:26:21' / time program was linked
SIMULATE= 0 / Is the instrument in simulate mode?
DATE-OBS= '2001-11-17T15:54:13' / Manager parameter startTime
TIMESYS = 'UTC ' / time scale specification for DATE-OBS
TELESCOP= 'NRAO_GBT' / Green Bank Telescope (Robert C. Byrd 100m)
OBJECT = '1950+34 ' / Manager parameter source
PROJID = 'test ' / Manager parameter projectId
OBSID = 'map ' / Manager parameter scanId
SCAN = 543 / Manager parameter scanNumber
:
:
(other application-specific keywords)
:
:
END
The difference between the two headers are as follows:
Standard DCR
ORIGIN N/A (data put into a comment)
INSTRUME BACKEND
GBTMCVER N/A
DATEBLD N/A
SIMULATE N/A
DATE-OBS UTDATE and UTCSTART
TIMESYS N/A (encoded in above keywords)
TELESCOP N/A (data part of a comment)
PROJID PROJECT
OBSID N/A
DCR specific keywords:
SCANID There doesn't seem to be a standard counterpart
Does the DCR need 'SCANID'?
CYCLETIM= 1.000000000000E-01 / Cycle time in seconds
CYCLES = 1 / Cycles per Integration
DURATION= 1.000000000000E-01 / Integration time
NPHASES = 2 / Number of Phases
INPBNK = 'A ' / IF bank A or B
NRCVRS = 2 / Number of IFs
ADVSIG1 = 'CAL ' / Adv Timing signal one
ADVSIG2 = 'SIGREF ' / Adv Timing signal two
ADVTIME = 2.000000000000E-06 / Time advance in seconds
DCR STATE vs standard STATE table headers
A standard STATE table looks like this:
XTENSION= 'BINTABLE' / binary table extension
BITPIX = 8 / 8-bit bytes
NAXIS = 2 / 2-dimensional binary table
NAXIS1 = 20 / width of table in bytes
NAXIS2 = 4 / number of rows in table
PCOUNT = 0 / size of special data area
GCOUNT = 1 / one data group (required keyword)
TFIELDS = 4 / number of fields in each row
TTYPE1 = 'BLANKTIM' / label for field 1
TFORM1 = '1D ' / data format of field: 8-byte DOUBLE
TUNIT1 = 'SECONDS ' / physical unit of field
TTYPE2 = 'PHSESTRT' / label for field 3
TFORM2 = '1D ' / data format of field: 8-byte DOUBLE
TUNIT2 = 'NONE ' / physical unit of field
TTYPE3 = 'SIGREF ' / label for field 4
TFORM3 = '1J ' / data format of field: 2-byte INTEGER
TUNIT3 = 'T/F ' / physical unit of field
TTYPE4 = 'CAL ' / label for field 5
TFORM4 = '1J ' / data format of field: 2-byte INTEGER
TUNIT4 = 'T/F ' / physical unit of field
NUMPHASE= 2 / Number of Phases if only Internal Switch Sig
SWPERIOD= 5.466E+00 / Switching period
MASTER = 'Spectrometer' / Switching Signals Master
EXTNAME = 'STATE ' / name of this binary table extension
END
The DCR's STATE table header looks like this:
XTENSION= 'BINTABLE' / FITS binary table.
BITPIX = 8 / Binary data.
NAXIS = 2 / Table is a Matrix.
NAXIS1 = 23 / Width of table in bytes.
NAXIS2 = 2 / Number of entries (rows) in Table.
PCOUNT = 0 / Pointer Count
GCOUNT = 1 / Only one group.
TFIELDS = 9 / Number of fields in each row.
MASTER = 'DCR ' / switching signals master
SCAN = 1 / Scan number
UTDATE = 53440 / MJD of start time
UTCSTART= 5.866900000000E+04 / Start time
TTYPE1 = 'BLANKTIM' /
TUNIT1 = 's ' /
TFORM1 = '1D ' /
TTYPE2 = 'PHASETIM' /
TUNIT2 = 's ' /
TFORM2 = '1D ' /
TTYPE3 = 'SIGREF ' /
TFORM3 = '1B ' /
TTYPE4 = 'CAL ' /
TFORM4 = '1B ' /
TTYPE5 = 'SWSIG1 ' /
TFORM5 = '1B ' /
TTYPE6 = 'SWSIG2 ' /
TFORM6 = '1B ' /
TTYPE7 = 'SWSIG3 ' /
TFORM7 = '1B ' /
TTYPE8 = 'SWSIG4 ' /
TFORM8 = '1B ' /
TTYPE9 = 'SWSIG5 ' /
TFORM9 = '1B ' /
EXTNAME = 'STATE ' / extension name
END
As can be seen, it is fairly close to the standard. There are a few differences:
-
TUNIT1 is set to s rather than SECONDS
-
TTYPE2 is set to PHASETIM rather than PHSESTRT
-
TUNIT2 is set to s rather than NONE
-
TFORM3 is set to 1B rather than 1J
- There is no
TUNIT3
-
TFORM4 is set to 1B rather than 1J
- There is no
TUNIT4
- There are
SCAN, UTDATE and UTCSTART keywords.
- There are no
NUMPHASE and SWPERIOD
DCR RECEIVER table
XTENSION= 'BINTABLE' / FITS binary table.
BITPIX = 8 / Binary data.
NAXIS = 2 / Table is a Matrix.
NAXIS1 = 3 / Width of table in bytes.
NAXIS2 = 2 / Number of entries (rows) in Table.
PCOUNT = 0 / Pointer Count
GCOUNT = 1 / Only one group.
TFIELDS = 2 / Number of fields in each row.
SCAN = 8 / Scan number
UTDATE = 53454 / MJD of start time
UTCSTART= 8.389600000000E+04 / start time in sec since midnight
TTYPE1 = 'CHANNELID' /
TFORM1 = '1I ' /
TTYPE2 = 'TESTDATA' /
TFORM2 = '1B ' /
EXTNAME = 'RECEIVER ' / extension name
END
DCR DATA table
The DCR's current DATA table:
XTENSION= 'BINTABLE' / FITS binary table.
BITPIX = 8 / Binary data.
NAXIS = 2 / Table is a Matrix.
NAXIS1 = 30 / Width of table in bytes.
NAXIS2 = 10 / Number of entries (rows) in Table.
PCOUNT = 0 / Pointer Count
GCOUNT = 1 / Only one group.
TFIELDS = 4 / Number of fields in each row.
SCAN = 34 / Scan number
UTDATE = 53453 / MJD start of integration
UTCSTART= 3.343600000000E+04 / start time seconds
BACKEND = 'DCR ' / Digital Continuum Receiver
CTYPE1 = 'STATE ' / First data axis is State
CTYPE2 = 'RECEIVER' / Second data axis is Receiver
TTYPE1 = 'IFFLAG ' /
TUNIT1 = 'CODE ' /
TFORM1 = '1I ' /
TTYPE2 = 'SUBSCAN ' /
TUNIT2 = 'CODE ' /
TFORM2 = '1J ' /
TTYPE3 = 'TIMETAG ' /
TUNIT3 = 'DMJD ' /
TFORM3 = '1D ' /
TTYPE4 = 'DATA ' /
TUNIT4 = 'COUNTS ' /
TFORM4 = '4J ' /
TDIM4 = '(2,2) ' / data dimension of the field
EXTNAME = 'DATA ' / extension name
END
The Spectrometer's DATA table looks like this:
XTENSION= 'BINTABLE' / binary table extension
BITPIX = 8 / 8-bit bytes
NAXIS = 2 / 2-dimensional binary table
NAXIS1 = 32792 / width of table in bytes
NAXIS2 = 12 / number of rows in table
PCOUNT = 0 / size of special data area
GCOUNT = 1 / one data group (required keyword)
TFIELDS = 3 / number of fields in each row
TTYPE1 = 'DMJD ' / label for field 1
TFORM1 = '1D ' / data format of field: 8-byte DOUBLE
TUNIT1 = 'd ' / physical unit of field
TTYPE2 = 'INTEGRAT' / label for field 2
TFORM2 = '4E ' / data format of field: 4-byte REAL
TUNIT2 = 'sec ' / physical unit of field
TTYPE3 = 'DATA ' / label for field 3
TFORM3 = '8192E ' / data format of field: 4-byte REAL
TUNIT3 = 'correl ' / physical unit of field
EXTNAME = 'DATA ' / name of this binary table extension
TDIM2 = '(2,2) ' / size of the multidimensional array
TDESC2 = 'SAMPLER,ACT_STATE' / definition of axes
TDIM3 = '(2048,2,2)' / size of the multidimensional array
TDESC3 = 'LAG,SAMPLER,ACT_STATE' / definition of axes
CRPIX1 = 1E+00 / Reference Pixel of Lag data
CRVAL1 = 0E+00 / Reference Value of Ref. Pixel
CDELT1 = 6E-10 / Time offset between Lags
HBTLNGTH= 1.31072000E-03 / Length of a memory cycle (heartbeat) in seconds
HBTPERSW= 764 / Number of heartbeats per switching period
SWPERINT= 10 / Number of switching periods per integration
UTCSTART= 4.6498000000000000E+04 / Actual start time in seconds since midnight
UTDSTART= 53448 / Actual start time in MJD
END
CFITSIO Features and Quirks
-- RamonCreager - 31 Mar 2005
Revision r1.8 - 22 Apr 2008 - 17:54 GMT - AmyShelton Parents: TWikiUsers > RamonCreager
|
Content copyright © 1999-2007 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
|
| |