HMI_Logo HMI Ring Diagrams
DRMS Segment Information

DRMS Data Segment Types

DRMS currently recognizes 6 basic protocols for data segments, the bulk (typically image) data associated with individual data records in a data series (see the JSD wiki page): The TAS (tiled-array storage) protocol is not used in the Ring Diagrams pipeline and will not be discussed here.

The generic protocol may be used for any form of data; it refers to a file of unspecified structure. There is obviously no API support for it in terms of being able to manipulate the data contents. It requires special knowledge to be interpreted. It is appropriate for plain ASCII text, and is used for example for the log files from runs of mtrack and the results of ringfit. Data segments of generic protocol may only be exported as-is, that is, simply copied from SUMS to the export directory.

The fits protocol stores the data in a plain FITS file with no extensions and the minimal number of keywords necessary to describe the structure and format of the data cube. A typical header of a FITS segment for a tracked cube produced by mtrack, would look like this if viewed directly:

SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                   16 / number of bits per data pixel
NAXIS   =                    3 / number of data axes
NAXIS1  =                  128 / length of data axis 1
NAXIS2  =                  128 / length of data axis 2
NAXIS3  =                  512 / length of data axis 3
EXTEND  =                    T / FITS dataset may contain extensions
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
BLANK   =               -32768
BZERO   =                  0.0
BSCALE  =                  1.0
END

 =-=-= End of header. 13 cards (1 FITS records) =-=-=
It is important to note that none of the ancillary data needed to identify or analyze a data segment is present in the FITS header. The ancillary data are stored in the DRMS database, and are available when the segment is accessed through the DRMS API. Although a FITS segment, like any other, can be exported as-is, it would be useless for much except viewing with a tool like ds9. When exported as fits, all of the regular keywords from the DRMS (not including DRMS-specific ones such as recnum and sunum) would be included in the header, with appropriate values for the particular record (converted as necessary to conform with the FITS standard). The DRMS keywords are inserted between the after the COMMENT and before the BLANK header record (if any). For example, an exported FITS file of a segment from a data series with keywords CarrTime, MidTime, LatHG, LonHG, and TIME_STEP might look like the following:
SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                   16 / number of bits per data pixel
NAXIS   =                    3 / number of data axes
NAXIS1  =                  128 / length of data axis 1
NAXIS2  =                  128 / length of data axis 2
NAXIS3  =                 1664 / length of data axis 3
EXTEND  =                    T / FITS dataset may contain extensions
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
CARRTIME= '1988:150.0'
MIDTIME = '2002.04.14_22:53:30_TAI'
LATHG   =                -45.0
LONHG   =                172.5
TIME_STE=                   60
BLANK   =               -32768
BZERO   =                 0.05
BSCALE  =                0.125
END

 =-=-= End of header. 13 cards (1 FITS records) =-=-=

The fits (compress) protocol stores the segments in binary tables using lossless compression based on first differencing plus Rice/Golomb entropy coding. It is only appropriate for fixed point (positive BITPIX) data. A FITS compressed file would look like this:

SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                   16 / number of bits per data pixel
NAXIS   =                    0 / number of data axes
EXTEND  =                    T / FITS dataset may contain extensions
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
END

 =-=-= End of header. 7 cards (1 FITS records) =-=-=

 =-=-= Skipped 0 bytes of data (0r0 FITS records) =-=-=

XTENSION= 'BINTABLE'           / binary table extension
BITPIX  =                    8 / 8-bit bytes
NAXIS   =                    2 / 2-dimensional binary table
NAXIS1  =                    8 / width of table in bytes
NAXIS2  =               212992 / number of rows in table
PCOUNT  =             34529384 / size of special data area
GCOUNT  =                    1 / one data group (required keyword)
TFIELDS =                    1 / number of fields in each row
TTYPE1  = 'COMPRESSED_DATA'    / label for field   1
TFORM1  = '1PB(171)'           / data format of field: variable length array
ZIMAGE  =                    T / extension contains compressed image
ZBITPIX =                   16 / data type of original image
ZNAXIS  =                    3 / dimension of original image
ZNAXIS1 =                  128 / length of original image axis
ZNAXIS2 =                  128 / length of original image axis
ZNAXIS3 =                 1664 / length of original image axis
ZTILE1  =                  128 / size of tiles to be compressed
ZTILE2  =                    1 / size of tiles to be compressed
ZTILE3  =                    1 / size of tiles to be compressed
ZCMPTYPE= 'RICE_1  '           / compression algorithm
ZNAME1  = 'BLOCKSIZE'          / compression block size
ZVAL1   =                   32 / pixels per block
ZNAME2  = 'BYTEPIX '           / bytes per pixel (1, 2, 4, or 8)
ZVAL2   =                    2 / bytes per pixel (1, 2, 4, or 8)
BLANK   =               -32768
BZERO   =                 0.05
BSCALE  =                0.125
END

 =-=-= End of header. 26 cards (1 FITS records) =-=-=
Again, these are what the FITS headers look like if you access them directly on a SUMS disk or export them as-is. If the data segments are exported as FITS, the keywords in the DRMS for the relevant record will be appended to the header after the ZVAL2 and before the BLANK records in the XTENSION header. In the current DRMS release, when a data segment is exported as FITS, the exported FITS file must follow the compression scheme of the original segment. (That restriction may be changed in later releases.)
Valid HTML 4.01 Transitional HMI Ring Diagrams 28 Jul 2009, 14:49-0700