//
// LDASTools frameCPP - PDF-derived structure definitions
//
// Copyright (C) 2025 California Institute of Technology
//
// AUTO-GENERATED FILE - DO NOT EDIT
// Generated by generate_pdf_definitions.py
//

#include "PDFDefinitions.hh"

namespace FrameCPP {
namespace PDFDefinitions {

// Definitions for Version 3
static void addDefinitionsV3(DefinitionMap& defs) {
    // FrAdcData
    defs[3]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name"},
            {"comment", "STRING", "Comment"},
            {"crate", "INT_4U", "Crate number containing ADC"},
            {"channel", "INT_4U", "Channel number"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Volts @ ADC_counts = 0) page 14 of 26"},
            {"slope", "REAL_4", "ADC calibration: input units/count"},
            {"units", "STRING", "ADC calibration: input units for slope"},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples / s."},
            {"timeOffsetS", "INT_4U", "For triggered data lasting less than one frame, integer seconds start time relative to frame start"},
            {"timeOffsetN", "INT_4U", "For triggered data lasting less than one frame, integer residual nanoseconds start time relative to frame start"},
            {"fShift", "REAL_8", "Frequency shift if signal has been heterodyned before ADC: fShift = (f_heterodyne - fNyquist@sampleRate)"},
            {"overRange", "INT_2U", "Data valid flag: overRange = 0 -> ADC data valid; overRange!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list."},
        }
    };
    // FrDetector
    defs[3]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name (e.g., VIRGO; GEO; TAMA; LIGO_1, _2, _3; 40m; PNI; simulated pseudo data - model version etc.)"},
            {"longitudeD", "INT_2S", "Detector vertex longitude, geographical coordinates: Integer degrees; DDD>0 => E of Greenwich"},
            {"longitudeM", "INT_2S", "Detector vertex longitude, geographical coordinates: Integer minutes; 60 > MM >= 0"},
            {"longitudeS", "REAL_4", "Detector vertex longitude, geographical coordinates: Decimal seconds; 60.0 > SS >= 0"},
            {"latitudeD", "INT_2S", "Detector vertex latitude, geographical coordinates: Integer degrees; DDD>0 => N of Equator"},
            {"latitudeM", "INT_2S", "Detector vertex latitude, geographical coordinates: Integer minutes; 60 > MM >= 0 page 15 of 26"},
            {"latitudeS", "REAL_4", "Detector vertex latitude, geographical coordinates: Decimal seconds; 60.0 > SS >= 0"},
            {"elevation", "REAL_4", "Vertex elevation, meters. relative to WGS84 ellipsoid."},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians CCW from East."},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians CCW from East."},
            {"armLength", "REAL_4", "Length of interferometer arm, measured between arm cavity mirror surfaces, in meters"},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure for additional detector data."},
        }
    };
    // FrEndOfFile
    defs[3]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_4U", "Total number of bytes in this file (0 if NOT computed)"},
            {"chkFlag", "INT_4U", "Flag for checksum (1 = calculated; 0 = not calculated)"},
            {"chkSum", "INT_4U", "File checksum value, calculated exclusive of chkFlaG and chkSum. Figure 3 presents a byte-level picture of how structures are linked to compose a frame. page 23 of 26"},
        }
    };
    // FrEndOfFrame
    defs[3]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4U", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header run number datum"},
        }
    };
    // FrHistory
    defs[3]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record."},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list."},
        }
    };
    // FrMsg
    defs[3]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined)"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list. page 16 of 26"},
        }
    };
    // FrProcData
    defs[3]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples / s."},
            {"timeOffsetS", "INT_4U", "For triggered data lasting less than one frame, integer seconds start time relative to frame start"},
            {"timeOffsetN", "INT_4U", "For triggered data lasting less than one frame, integer residual nanoseconds start time relative to frame start"},
            {"fShift", "REAL_8", "Frequency shift if signal has been heterodyned before ADC: fShift = (f_heterodyne - fNyquist@sampleRate)"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next ADC structure in the linked list."},
        }
    };
    // FrRawData
    defs[3]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list."},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list."},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures. page 17 of 26"},
        }
    };
    // FrSerData
    defs[3]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_4", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures."},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list. page 19 of 26"},
        }
    };
    // FrSimData
    defs[3]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_4", "Simulated data sample rate, samples / s."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of simulated data."},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for seed MC input data for simulation."},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list."},
        }
    };
    // FrStatData
    defs[3]["FrStatData"] = {
        "FrStatData",
        "",
        {
            {"name", "STRING", "Static data name"},
            {"comment", "STRING", "Comment"},
            {"timeStart", "INT_4U", "Start time of static data validity, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"timeEnd", "INT_4U", "End time of static data validity (if unknown, set to 0), GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"version", "INT_4U", "Version number for this static structure. i.e, the number of times plus one for which this particular static data structure has been calculated or defined."},
            {"detector", "PTR_STRUCT(FrDetector *)", "Identifier for the detector this static data is associated with."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of data. a. A file may not contain any FrStatData structure; however, if at least one FrStatData structure exists in a frame, then the first one will appear immediately after its associated detector structure. Subsequent instances of FrStatData are not linked; each one must be identified at read time. It is possible for a frame to contain more than one structure requiring different FrStatData struc- tures. For example FrDetector for raw data may require static data associated with instrumental parameters; FrProcData for processed data may require static data associated with the filtering or other analysis parameters; FrSimData for simulated data may require static data to define pre- cisely the input parameters to the simulation. For this reason, there is included in the FrStatData definition a PTR_STRUCT object which provides information on the antecedent detector struc- ture with which any one FrStatData structure is associated. Footnote a, Table17, applies to each detector structure separately. page 20 of 26"},
        }
    };
    // FrSummary
    defs[3]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment."},
            {"test", "STRING", "Statistical test(s) used on raw data"},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors"},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary."},
        }
    };
    // FrTrigData
    defs[3]["FrTrigData"] = {
        "FrTrigData",
        "",
        {
            {"name", "STRING", "Name of trigger."},
            {"comment", "STRING", "Descriptor of trigger."},
            {"inputs", "STRING", "Input channels and filter parameters to trigger process."},
            {"GTimeS", "INT_4U", "Event occurrence time, Integer seconds since beginning of frame."},
            {"GTimeN", "INT_4U", "Event occurrence time residual, integer nanoseconds."},
            {"bvalue", "INT_4U", "Boolean (T = 1, F = 0) value returned by trigger."},
            {"rvalue", "REAL_4", "Continuous value returned by trigger"},
            {"probability", "REAL_4", "Likelihood estimate of event, if available (probability = -1 if cannot be estimated)"},
            {"statistics", "STRING", "Statistical description of event, if relevant or available."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional trigger results."},
            {"next", "PTR_STRUCT(FrTrigData *)", "Identifier for another trigger. page 22 of 26"},
        }
    };
    // FrVect
    defs[3]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name"},
            {"compress", "INT_2U", "Compression algorithm numbera"},
            {"type", "INT_2U", "Vector classb (see footnote at end of this table)"},
            {"nData", "INT_4U", "Number of sample elements in data series"},
            {"nBytes", "INT_4U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "*INT_4U", "nDim INT_4U elements whose values are dimension lengths"},
            {"dx", "*REAL_8", "nDim REAL_8 elements whose values are scale factors for each coordinate;"},
            {"unitX", "*STRING", "nDim strings containing scale factors in ASCII; “unit per step size along each coordinate”"},
            {"unitY", "STRING", "String describing how to interpret the value of each element"},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data. a. The following are supported compression algorithms: {type#:description}; (0: uncompressed raw values); (1:gzip);(2:differential values);(3:gzip, differential values);(4 - 256: unimple- mented); (257:gzip, byte-swapped);(258:differential values, byte-swapped);(259:gzip, differential values, byte-swapped); (260 - 65535: unimplemented). Every compression scheme has a corresponding entry for the case in which the compressing machine used a byte-swapped convention relative to the uncompressing machine. b. The following valid vector data types are defined: {type#: name: description}; (0:FR_VECT_C:CHAR); (1:FR_VECT_2S:INT_2S); (2:FR_VECT_8R:REAL_8); (3:FR_VECT_4R:REAL_4); (4; FR_VECT_4S:INT_4S); (5:FR_VECT_8S:INT_8S); (6:FR_VECT_8C:COMPLEX_8); (7:FR_VECT_C16:COMPLEX_16); (8:FR_VECT_S:STRING); (9:FR_VECT_2U: INT_2U); (10:FR_VECT_4U: INT_4U); (11:FR_VECT_8U: INT_8U); (12:FR_VECT_1U: CHAR_U); (13 - 255: unimplemented) For multi-dimensional arrays, elements are stored by rows following the C convention. page 21 of 26"},
        }
    };
    // FrameH
    defs[3]["FrameH"] = {
        "FrameH",
        "",
        {
            {"name", "STRING", "Name of project or other experiment description (e.g., GEO; LIGO; VIRGO; TAMA;...)"},
            {"run", "INT_4U", "Run number"},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run"},
            {"GTimeS", "INT_4U", "Frame start time, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"ULeapS", "INT_2U", "The integer number of leap seconds between GPS/TAI and UTC in the epoch when the frame is written: ULeapS = Int[TAI - UTC]."},
            {"localTime", "INT_4S", "Local seasonal time - UTC in seconds [integer multiple of 1800s]."},
            {"dt", "REAL_8", "Frame length in seconds"},
            {"type", "PTR_STRUCT(FrVect *)", "Identifier for array used to store general info like the trigger type. Detailed description will Be Determinedlater. page 13 of 26"},
            {"user", "PTR_STRUCT(FrVect *)", "Identifier for array for user-provided information. Use is generic."},
            {"detectSim", "PTR_STRUCT(FrDetector *)", "Identifier for array storing model or simulation parameter data definition"},
            {"detectProc", "PTR_STRUCT(FrDetector *)", "Identifier for data used in generating post-processed outputs (typically for off line processing)"},
            {"history", "PTR_STRUCT(FrHistory *)", "Identifier for first history of post-processing with which frame may have been generated."},
            {"rawData", "PTR_STRUCT(FrRawData *)", "Identifier for the raw data structure"},
            {"procData", "PTR_STRUCT(FrProcData *)", "Identifier for the first post-processed data"},
            {"strain", "PTR_STRUCT(FrProcData *)", "Identifier for the post-processed strain data (best estimate)"},
            {"simData", "PTR_STRUCT(FrSimData *)", "Identifier for the first simulated data buffers"},
            {"trigData", "PTR_STRUCT(FrTrigData *)", "Identifier for the first trigger data structure"},
            {"summaryData", "PTR_STRUCT(FrSummary *)", "Identifier for the first statistical summary data"},
            {"auxData", "PTR_STRUCT(FrVect *)", "Identifier for the first auxiliary data"},
        }
    };
}

// Definitions for Version 4
static void addDefinitionsV4(DefinitionMap& defs) {
    // FrAdcData
    defs[4]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name -- must be unique with the frame"},
            {"comment", "STRING", "Comment"},
            {"channelGroup", "INT_4U", "Channel grouping number containing ADCb"},
            {"channelNumber", "INT_4U", "Channel numberb"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Units @ ADC_counts = 0)"},
            {"slope", "REAL_4", "ADC calibration: input units/ct"},
            {"units", "STRING", "ADC calibration: input units for slope. If dimensionless, then units == <NONE>, in CAPITALS (without <...>)."},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffsetS", "INT_4S", "Offset of 1st sample relative to the integer seconds frame start time"},
            {"timeOffsetN", "INT_4U", "Offset of 1st sample relative to timeOffsetS in integer residual nanoseconds"},
            {"fShift", "REAL_8", "Frequency shift if signal has been heterodyned before ADC: fShift = (f_heterodyne - fNyquist@sampleRate)"},
            {"dataValid", "INT_2U", "Data valid flag: dataValid = 0 -> ADC data valid; dataValid!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list. a. Whenever physical units are used, these shall be given as combinations of SI units; ADC counts shall be denoted “ct”. b. These two variables are determined by site and must be unique over all detectors c. Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset. page 20 of 37"},
        }
    };
    // FrDetector
    defs[4]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name (e.g., VIRGO; GEO; TAMA; LIGO_1, _2, _3; 40m; PNI; simulated pseudo data - model version etc.)"},
            {"longitudeD", "INT_2S", "Detector vertex longitude, geographical coordinates: Integer degrees; DDD>0 => E of Greenwich"},
            {"longitudeM", "INT_2S", "Detector vertex longitude, geographical coordinates: Integer minutes; 60 > MM >= 0"},
            {"longitudeS", "REAL_4", "Detector vertex longitude, geographical coordinates: Decimal seconds; 60.0 > SS >= 0"},
            {"latitudeD", "INT_2S", "Detector vertex latitude, geographical coordinates: Integer degrees; DDD>0 => N of Equator"},
            {"latitudeM", "INT_2S", "Detector vertex latitude, geographical coordinates: Integer minutes; 60 > MM >= 0"},
            {"latitudeS", "REAL_4", "Detector vertex latitude, geographical coordinates: Decimal seconds; 60.0 > SS >= 0"},
            {"elevation", "REAL_4", "Vertex elevation, meters. relative to WGS84 ellipsoid."},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians CCW from East."},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians CCW from East."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure for additional detector data."},
            {"moreTable", "PTR_STRUCT(FrTable *)", "Identifier for user-provided (presently undefined) table structure for additional detector data. a. All geographical coordinates are defined with respect to the Earth ellipsoidal model WGS84. b. References to interferometer arm length have been dropped to facilitate use of this structure for both 2km and 4km LIGO interferometers, as well as permitting bar detector data to be captured. This then means that GW channel calibrations must be in dimensionless units of strain. page 21 of 37"},
        }
    };
    // FrEndOfFile
    defs[4]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_4U", "Total number of bytes in this file (0 if NOT computed)"},
            {"chkFlag", "INT_4U", "Flag for checksum (1 = calculated; 0 = not calculated)"},
            {"chkSum", "INT_4U", "File checksum value, calculated exclusive of chkFlaG and chkSum."},
            {"seekTOC", "INT_4U", "Bytes to back up to the beginning of the table of contents structure. If seekTOC == 0, then there is no TOC for this file."},
        }
    };
    // FrEndOfFrame
    defs[4]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4S", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header run number datum"},
        }
    };
    // FrHistory
    defs[4]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record."},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list. page 22 of 37"},
        }
    };
    // FrMsg
    defs[4]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined)"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list."},
        }
    };
    // FrProcData
    defs[4]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffsetS", "INT_4U", "For triggered data lasting less than one frame, integer seconds start time relative to frame start"},
            {"timeOffsetN", "INT_4U", "For triggered data lasting less than one frame, integer residual nanoseconds start time relative to frame start"},
            {"fShift", "REAL_8", "Frequency shift if signal has been heterodyned before ADC: fShift = (f_heterodyne - fNyquist@sampleRate)"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure."},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next FrProcData structure in the linked list. page 23 of 37"},
        }
    };
    // FrRawData
    defs[4]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list."},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list."},
            {"firstTable", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list."},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures."},
        }
    };
    // FrSerData
    defs[4]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_4", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for the user-defined table structure."},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list. page 24 of 37"},
        }
    };
    // FrSimData
    defs[4]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_4", "Simulated data sample rate, samples / s."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of simulated data."},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for input parameters for simulation."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table data structure."},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list."},
        }
    };
    // FrSimEvent
    defs[4]["FrSimEvent"] = {
        "FrSimEvent",
        "",
        {
            {"name", "STRING", "Name of event."},
            {"comment", "STRING", "Descriptor of event."},
            {"inputs", "STRING", "Input channels and filter parameters to event process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of event."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to maximum of event."},
            {"timeBefore", "REAL_4", "Signal duration before GTimeS"},
            {"timeAfter", "REAL_4", "Signal duration after GTimeS"},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by event"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional event results."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional event information."},
            {"next", "PTR_STRUCT(FrSimEvent *)", "Identifier for another event. page 25 of 37"},
        }
    };
    // FrStatData
    defs[4]["FrStatData"] = {
        "FrStatData",
        "",
        {
            {"name", "STRING", "Static data nameb"},
            {"comment", "STRING", "Comment"},
            {"representation", "STRING", "Type of static data being represented. e.g., calibration, swept sine, pole-zero, FIR or IIR coefficients, ..."},
            {"timeStart", "INT_4U", "Start time of static data validity, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"timeEnd", "INT_4U", "End time of static data validity (if unknown, set to 0), GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"version", "INT_4U", "Version number for this static structure. i.e, the counter begins at 0 and is incremented by 1 thereafter. Updated statics for the same time window (e.g., modified calibration data) will be identified by unique version numbers."},
            {"detector", "PTR_STRUCT(FrDetector *)", "Identifier for the detector this static data is associated with."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of data."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list. a. A file is not required to contain any FrStatData structure; however, if at least one FrStatData structure exists in a frame, then the first one will appear immediately after its associated detector structure. Subsequent instances of FrStatData are not linked; each one must be identified at read time. b. Note that the combined list of FrStatData elements {name,timeStart, timeEnd,version} must be unique. To access FrStatData of a given name for a given epoch, one selects the block(s) with the desired name and with a time range spanning the epoch of interest, one then selects that block with the latest timeStart, and finally one takes the FrStatData with the highest version number. It is possible for a frame to contain more than one structure requiring different FrStatData struc- tures. For example FrDetector for raw data may require static data associated with instrumental parameters; FrProcData for processed data may require static data associated with the filtering or other analysis parameters; FrSimData for simulated data may require static data to define pre- cisely the input parameters to the simulation. For this reason, there is included in the FrStatData definition a PTR_STRUCT object which provides information on the antecedent detector struc- ture with which any one FrStatData structure is associated. Footnote a, Table 20, applies to each detector structure separately. page 26 of 37"},
        }
    };
    // FrSummary
    defs[4]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment."},
            {"test", "STRING", "Statistical test(s) used on raw data"},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional summary information."},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary."},
        }
    };
    // FrTOC
    defs[4]["FrTOC"] = {
        "FrTOC",
        "",
        {
            {"ULeapS", "INT_2S", "From the first FrameH in the file."},
            {"localTime", "INT_4S", "From the first FrameH in the file."},
            {"nFrame", "INT_4U", "Number of frames in this file"},
            {"GTimeS", "*INT_4U", "Array of integer GPS frame times (size of nFrame)"},
            {"GTimeN", "*INT_4U", "Array of integer GPS residual nanoseconds for the frame (size of nFrame)"},
            {"dt", "*REAL_8", "Array of frame durations in seconds (size of nFrame)"},
            {"runs", "*INT_4S", "Array of run numbers (size of nFrame)."},
            {"frame", "*INT_4U", "Array of frame numbers (size of nFrame)."},
            {"positionH", "*INT_8U", "Array of FrameH positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstADC", "*INT_8U", "Array of first FrADCData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstSer", "*INT_8U", "Array of first FrSerData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstTable", "*INT_8U", "Array of first FrTable positions, in bytes, from beginning of file (size of nFrame). frame."},
            {"nFirstMsg", "*INT_8U", "Array of first FrMsg positions, in bytes, from beginning of file (size of nFrame)."},
            {"nSH", "INT_4U", "Number of FrSH structures in the file."},
            {"SHid", "*INT_2U", "Array of FrSH IDs (size of nSH)."},
            {"SHname", "*STRING", "Array of FrSH names (size of nSH)."},
            {"nStatType", "INT_4U", "Number of static data block types in the file. Each is identified by a unique name If nStat == 232-1, then “no data available in FrTOC” For each FrStatData:"},
            {"nameStat", "STRING", "FrStatData name"},
            {"detector", "STRING", "Detector name"},
            {"nStatInstance", "INT_4U", "Number of instance for this FrStatData"},
            {"tStart", "*INT_4U", "Array of GPS integer start times, in seconds (size of nStatInstance)"},
            {"tEnd", "*INT_4U", "Array of GPS integer end times, in seconds (size of nStatInstance)"},
            {"version", "*INT_4U", "Array of version time (size of nStatInstance)"},
            {"positionStat", "*INT_8U", "Array of FrStatData positions from beginning of file (size of nStatInstance) For FrAdcData: page 28 of 37"},
            {"nADC", "INT_4U", "Number of unique FrAdcData names in file. If nADC == 232-1, then “no data available in FrTOC”"},
            {"name", "*STRING", "Array of FrAdcData names (size of nADC)"},
            {"channelID", "*INT_4U", "Array of ADC channel IDs (size of nADC)"},
            {"groupID", "*INT_4U", "Array of ADC group IDs (size of nADC)"},
            {"positionADC", "*INT_8U", "Array of lists of FrAdcData offset positions, in bytes, from beginning of file (size of nFrame*nADC) Ordering of entries:row/column major ordering, i.e., all positions for one ADC appear sequentially. For FrProcData:"},
            {"nProc", "INT_4U", "Number of unique FrProcData names in file. If nProc == 232-1, then “no data available in FrTOC”"},
            {"nameProc", "*STRING", "Array of FrProcData names (size of nProc)"},
            {"positionProc", "*INT_8U", "Array of FrProcData positions, in bytes, from beginning of file (size of nFrame*nProc) For FrSimData:"},
            {"nSim", "INT_4U", "Number of unique FrSimData names in file. If nSim == 232-1, then “no data available in FrTOC”"},
            {"nameSim", "*STRING", "Array of FrSimData names (size of nSim)"},
            {"positionSim", "*INT_8U", "Array of FrSimData positions, in bytes, from beginning of file (size of nFrame*nSim) For FrSerData:"},
            {"nSer", "INT_4U", "Number of unique FrSerData names in file. If nSer == 232-1, then “no data available in FrTOC”"},
            {"nameSer", "*STRING", "Array of FrSerData names (size of nSer)"},
            {"positionSer", "*INT_8U", "Array of FrSerData positions, in bytes, from beginning of file (size of nFrame*nSer) For FrSummary:"},
            {"nSummary", "INT_4U", "Number of unique FrSummary names in file. If nSummary == 232-1, then “no data available in FrTOC”"},
            {"nameSum", "*STRING", "Array of FrSummary names (size of nSummary)"},
            {"positionSum", "*INT_8U", "Array of FrSummary positions, in bytes, from beginning of file (size of nFrame*nSummary) For FrTrigData:"},
            {"nTrig", "INT_4U", "Number of FrTrigData in file. If nTrig == 232-1, then “no data available in FrTOC”"},
            {"nameTrig", "*STRING", "Array of FrTrigData names (size of nTrig) page 29 of 37"},
            {"GTimeSTrig", "*INT_4U", "GPS time in integer seconds (size of nTrig)"},
            {"GTimeNTrig", "*INT_4U", "Residual GPS time in integer nanoseconds (size of nTrig)"},
            {"positionTrig", "*INT_8U", "Array of FrTrigData positions, in bytes, from beginning of file (size of nTrig) For FrSimEvent:"},
            {"nSimEvt", "INT_4U", "Number of FrSimEvent in file. If nSimEvt == 232-1, then “no data available in FrTOC”"},
            {"nameSimEvt", "*STRING", "Array of FrSimEvent names (size of nSimEvt)"},
            {"GTimeSSim", "*INT_4U", "GPS time in integer seconds (size of nSimEvt)"},
            {"GTimeNSim", "*INT_4U", "Residual GPS time in integer nanoseconds (size of nSimEvt)"},
            {"positionSimEvt", "*INT_8U", "Array of FrSimEvent positions, in bytes, from beginning of file (size of nSim- Evt)"},
        }
    };
    // FrTable
    defs[4]["FrTable"] = {
        "FrTable",
        "",
        {
            {"name", "STRING", "Name of this table -- not required to be unique within a frame."},
            {"comment", "STRING", "Comment"},
            {"nColumn", "INT_2U", "Number of columns in table"},
            {"nRow", "INT_4U", "Number of rows in table. The frame API must ensure that all columns have this length."},
            {"columnName", "*STRING", "Names of the columns. The frame API must then copy these names into each FrVect structure included in this FrTable"},
            {"column", "PTR_STRUCT(FrVect *)", "First column of table (may be names of rows)"},
            {"next", "PTR_STRUCT(FrTable *)", "Next table in linked list"},
        }
    };
    // FrTrigData
    defs[4]["FrTrigData"] = {
        "FrTrigData",
        "",
        {
            {"name", "STRING", "Name of trigger."},
            {"comment", "STRING", "Descriptor of trigger."},
            {"inputs", "STRING", "Input channels and filter parameters to trigger process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of trigger."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to refer- ence value of trigger, as defined by trigger algorithm."},
            {"timeBefore", "REAL_4", "Signal duration before (GTimeS.GTimeN)"},
            {"timeAfter", "REAL_4", "Signal duration after (GTimeS.GTimeN)"},
            {"triggerStatus", "INT_4U", "Defined by trigger."},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by trigger"},
            {"probability", "REAL_4", "Likelihood estimate of event, if available (probability = -1 if cannot be estimated)"},
            {"statistics", "STRING", "Statistical description of event, if relevant or available."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional trigger results."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional trigger information."},
            {"next", "PTR_STRUCT(FrTrigData *)", "Identifier for another trigger. page 30 of 37"},
        }
    };
    // FrVect
    defs[4]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name -- not required to be unique"},
            {"compress", "INT_2U", "Compression algorithm numbera"},
            {"type", "INT_2U", "Vector classb"},
            {"nData", "INT_4U", "Number of sample elements in data series"},
            {"nBytes", "INT_4U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "*INT_4U", "nDim INT_4U elements whose values are dimension lengths"},
            {"dx", "*REAL_8", "nDim REAL_8 elements whose values are scale factors for each coordinate;"},
            {"startX", "*REAL_8", "Origin for each data set"},
            {"unitX", "*STRING", "nDim strings containing scale factors in ASCII; “unit per step size along each coordinate”. If dimensionless, then unitX == <NONE>, in CAPITALS (without <...>)."},
            {"unitY", "STRING", "String describing how to interpret the value of each element. If dimensionless, then unitY == <NONE>, in CAPITALS (without <...>)."},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data. a. See Appendix B. b. See Appendix B. For multi-dimensional arrays, elements are stored by rows following the C convention. Figure 3 presents a byte-level picture of how structures are linked to compose a frame. page 31 of 37"},
        }
    };
    // FrameH
    defs[4]["FrameH"] = {
        "FrameH",
        "",
        {
            {"name", "STRING", "Name of project or other experiment description (e.g., GEO; LIGO; VIRGO; TAMA;...)"},
            {"run", "INT_4S", "Run number (number < 0 reserved for simulated data); monotonic for experimental runs."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run, re-starting from 0 with each new run."},
            {"dataQuality", "INT_4U", "A logical 32-bit word to denote top level quality of data. Lowest order bits are reserved one each for various GW detectors: “1” means data for that detector is present in frame and VALID at a top level (as a minimum, locked data and valid time stamp).a"},
            {"GTimeS", "INT_4U", "Frame start time, GPS time in integer seconds since GPS standard epoch, valid for approximately 143 years from time origin."},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"ULeapS", "INT_2U", "The integer number of leap seconds between GPS/TAI and UTC in the epoch when the frame is written: ULeapS = Int[TAI - UTC]. e.g., ULeapS was 32 at end of 1999/07 page 18 of 37"},
            {"localTime", "INT_4S", "Local seasonal time - UTC in seconds."},
            {"dt", "REAL_8", "Frame length in seconds"},
            {"type", "PTR_STRUCT(FrVect *)", "Identifier for array used to store general info like the trigger type. Detailed description will Be Determined later."},
            {"user", "PTR_STRUCT(FrVect *)", "Identifier for array for user-provided information. Use is generic."},
            {"detectSim", "PTR_STRUCT(FrDetector *)", "Identifier for array storing model or simulation parameter data definition"},
            {"detectProc", "PTR_STRUCT(FrDetector *)", "Identifier for data used in generating post-processed outputs (typically for off line processing)"},
            {"history", "PTR_STRUCT(FrHistory *)", "Identifier for first history of post-processing with which frame may have been generated."},
            {"rawData", "PTR_STRUCT(FrRawData *)", "Identifier for the raw data structure"},
            {"procData", "PTR_STRUCT(FrProcData *)", "Identifier for the first post-processed data"},
            {"strain", "PTR_STRUCT(FrProcData *)", "Identifier for the post-processed strain data (best estimate)"},
            {"simData", "PTR_STRUCT(FrSimData *)", "Identifier for the first simulated data buffers"},
            {"trigData", "PTR_STRUCT(FrTrigData *)", "Identifier for the first trigger data structure"},
            {"simEvent", "PTR_STRUCT(FrSimEvent *)", "Identifier for the first simulated event data structure"},
            {"summaryData", "PTR_STRUCT(FrSummary *)", "Identifier for the first statistical summary data"},
            {"auxData", "PTR_STRUCT(FrVect *)", "Identifier for the first auxiliary data"},
            {"auxTable", "PTR_STRUCT(FrTable *)", "Identifier for the first auxiliary table data a. See Appendix A for bit assignments. page 19 of 37"},
        }
    };
}

// Definitions for Version 5
static void addDefinitionsV5(DefinitionMap& defs) {
    // FrAdcData
    defs[5]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name -- must be unique with the frame"},
            {"comment", "STRING", "Comment"},
            {"channelGroup", "INT_4U", "Channel grouping number containing ADC9"},
            {"channelNumber", "INT_4U", "Channel number9"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Units @ ADC_counts = 0)"},
            {"slope", "REAL_4", "ADC calibration: input units/ct"},
            {"units", "STRING", "ADC calibration: input units for slope. If dimensionless, then units == <NONE>, in CAPITALS (without <...>)."},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length10"},
            {"fShift", "REAL_8", "fShift is the frequency (in Hz) in the original data that corresponds to 0 Hz in the heterodyned series.11"},
            {"phase", "REAL_4", "Phase (in radian) of heterodyning signal at start of dataset11"},
            {"dataValid", "INT_2U", "Data valid flag: dataValid = 0 -> ADC data valid; dataValid!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list. 8 Whenever physical units are used, these shall be given as combinations of SI units; ADC counts shall be denoted ‘ct’. 9 These two variables are determined by site and must be unique over all detectors 10 Time offsets always added together (to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset . Note that all quantities are ALWAYS positive. 11 In the heterodyning process the real time series is multiplied by cos[2pfShift(t-t)+phase] to get the real part 0 and by –sin[2pfShift(t-t)+phase] (note the minus sign) to get the imaginary part of the resulting complex time 0 series. The time origin t is the beginning of the frame 0 page 14 of 40"},
        }
    };
    // FrDetector
    defs[5]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name as described in APPENDIX D (e.g., Virgo; GEO_600; TAMA_300; LHO_2k; LLO_4k; 40m; PNI; simulated pseudo data - model version etc.)"},
            {"prefix", "CHAR[2]", "Channel prefix for this detector as described in APPENDIX D."},
            {"longitude", "REAL_8", "Detector vertex longitude, geographical coordinates: radians; Value> 0 => E of Greenwich (-p<Longitude <= +p)"},
            {"latitude", "REAL_8", "Detector vertex latitude, geographical coordinates: radians; Value > 0 => N of Equator ( -p/2<Latitude <= +p/2)"},
            {"elevation", "REAL_4", "Vertex elevation, meters. relative to WGS84 ellipsoid."},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians East of North (0<= ArmXazimuth < 2p)"},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians East of North (0<= ArmYazimuth < 2p)"},
            {"armXaltitude", "REAL_4", "Altitude (pitch) angle of X arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) -p/2< ArmXaltitude <= +p/2."},
            {"armYaltitude", "REAL_4", "Altitude (pitch) angle of Y arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) -p/2< ArmYaltitude <= +p/2."},
            {"armXmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the X cavity (meters) (should be zero for bars)"},
            {"armYmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the Y cavity (meters) (should be zero for bars)"},
            {"localTime", "INT_4S", "Local seasonal time – UTC in seconds. If localTime%1800 != 0 then localTime is undefined."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure for additional detector data.."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for user-provided (presently undefined) table structure for additional detector data. Column 1: String containing QA word definitions; Column 2: Value of QA words 0 = “Data QA not evaluated for these data”. 1 = “Data should not be used for source searches”, i.e. BAD data. 2 = “Data not ‘perfect’, but suitable for long time stretch searches”. 3 = “Data ‘perfect’ – suitable for burst searches”."},
            {"next", "PTR_STRUCT(FrDetector *)", "Identifier for next detector structure in the linked list 12 All geographical coordinates are defined with respect to the Earth ellipsoidal model WGS84. page 15 of 40"},
        }
    };
    // FrEndOfFile
    defs[5]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_8U", "Total number of bytes in this file (0 if NOT computed)"},
            {"chkType", "INT_4U", "Checksum schemes: 0 = none, 1 = CRC, >2 presently unused"},
            {"chkSum", "INT_4U", "File checksum. 13"},
            {"seekTOC", "INT_8U", "Bytes to back up to the beginning of the table of contents structure. If seekTOC == 0, then there is no TOC for this file. The CRC should be POSIX.2 checksum as referred to in section 4.9 of P1003.2/D11.2, (for example: http://ftp.optiva.ee/pub/misc/posix_drafts/p1003.2/d11.2/4.9)."},
        }
    };
    // FrEndOfFrame
    defs[5]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4S", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header run number datum"},
            {"chkType", "INT_4U", "Same definition as in FrEndOfFile"},
            {"chkSum", "INT_4U", "Frame checksum.14 . 13 This checksum is calculated over the contents of each file, starting with the file header (FrHeader) and ending with the FrEndOfFile structure with the value chkSum = 0. Whenever a file checksum is not calculated, the default value is chkSum =0. 14 This checksum is calculated over the contents of each frame, starting with the FrameH structure and ending with the FrEndOfFrame structure with the value chkSum = 0. Whenever a frame checksum is not calculated, the default value is chkSum =0. page 16 of 40"},
        }
    };
    // FrHistory
    defs[5]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record. Note: when an FrHistory is linked to an FrProcData, its name variable must be the FrProcData channel name"},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch.7"},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list."},
        }
    };
    // FrMsg
    defs[5]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined); default = 0."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to this FrMsg"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list. page 18 of 40"},
        }
    };
    // FrProcData
    defs[5]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment"},
            {"type", "INT_2U", "Type of data object: 0 Unknown/user defined; 1! Time Series; 2! Frequency series; 3 Other 1D Series data; 4! Time-Frequency; 5! Wavelets; 6! Multi-dimensional"},
            {"subType", "INT_2U", "Subtype for f-Series (TBD for other types) 0 Unknown/user defined; 1 DFT; 2 Amplitude Spectral Density; 3 Power spectral density; 4 Cross spectral density; 5 Coherence; 6 Transfer function"},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length. 15"},
            {"tRange", "REAL_8", "Duration of sampled data (tStop-tStart)16"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.11,16,17 In multidimensional objects this applies to the first frequency dimension"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset (radians, 0 if unknown)11"},
            {"fRange", "REAL_8", "Frequency range (=fMax-fMin, 0 if unknown)16"},
            {"BW", "REAL_8", "Resolution bandwidth (Sum{w[i]2}/N where w[i] is the i{th} window coefficient (0 if unknown)"},
            {"nAuxParam", "INT_2U", "Number of auxiliary parameters"},
            {"auxParam", "REAL_8[nAuxParam]", "! Array of auxiliary parameters (size of nAuxParam)."},
            {"auxParamNames", "STRING[nAuxParam]", "Array of auxiliary parameter names (size of nAuxParam). 18"},
            {"data", "PTR_STRUCT(FrVect *)", "Data vector. The data vector for single dimensional types (t-Series and f- Series) must have a singe dimension."},
            {"aux", "PTR_STRUCT(FrVect *)", "Auxiliary data; use is generic. 15 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS. If FrVect contains a t-series, then time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS + startX[0]. Note that all quantities are ALWAYS positive. 16 tRange, fShift, fRange are redundant with the axis information in the data Vector in some cases. If a redundancy exists, the data must be identical to that in the FrVect for the earliest time and/or lowest frequency dimension (e.g. for a t-Series tRange = dx[0]*nx[0]). If a discrepancy exists then the FrVect values take precedence 17 If FrVect contains a f-series then the frequency offsets fShift and startX[0] are added together to obtain the frequency in the original data, original_frequency_of_1st_sample = fShift + startX[0], while startX[0] gives the offset in frequency in the heterodyned data of the 1st sample 18 auxParamNames may contain only the following ASCII characters: \"a-z\" , \"A-Z\" , \"0-9\" , \"_\" , \"-\" , \":\" , \"#\" , \"$\" , \"@\", and must begin with an ALPHA character (a-z, A-Z). page 19 of 40"},
            {"table", "PTR_STRUCT(FrTable *)", "Parameter table"},
            {"history", "PTR_STRUCT(FrHistory *)", "Channel history . 19"},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next FrProcData structure in the linked list. 19 The first FrHistory should describe the processing used to build this FrProcData channel. Its name variable should be the FrProcData name. If the channel(s) used to produce this FrProcData have prior FrHistory structures, then in order to not lose this history, these structures should be copied and added to the FrHistory linked list. page 20 of 40"},
        }
    };
    // FrRawData
    defs[5]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list."},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list."},
            {"firstTable", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list."},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures."},
        }
    };
    // FrSerData
    defs[5]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch.7"},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_4", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for the user-defined table structure."},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list. page 21 of 40"},
        }
    };
    // FrSimData
    defs[5]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_4", "Simulated data sample rate, samples / s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds). Must be positive and smaller than the frame length. 20"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.11"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset.11"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of simulated data."},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for input parameters for simulation."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table data structure."},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list. 20 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset. Note that all quantities are ALWAYS positive page 22 of 40"},
        }
    };
    // FrSimEvent
    defs[5]["FrSimEvent"] = {
        "FrSimEvent",
        "",
        {
            {"name", "STRING", "Name of event."},
            {"comment", "STRING", "Descriptor of event."},
            {"inputs", "STRING", "Input channels and filter parameters to event process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of event."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to maximum of event."},
            {"timeBefore", "REAL_4", "Signal duration before GTimeS"},
            {"timeAfter", "REAL_4", "Signal duration after GTimeS"},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by event"},
            {"nParam", "INT_2U", "Number of additional event parameters."},
            {"parameters", "REAL_4[nParam]", "Array of additional event parameters (size of nParam)."},
            {"parameterNames", "STRING[nParam]", "Array of parameter names (size of nParam)."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional event results."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional event information."},
            {"next", "PTR_STRUCT(FrSimEvent *)", "Identifier for another event. page 23 of 40"},
        }
    };
    // FrStatData
    defs[5]["FrStatData"] = {
        "FrStatData",
        "",
        {
            {"name", "STRING", "Static data name22"},
            {"comment", "STRING", "Comment"},
            {"representation", "STRING", "Type of static data being represented. e.g., calibration, swept sine, pole-zero, FIR or IIR coefficients..."},
            {"timeStart", "INT_4U", "Start time of static data validity, GPS time in integer seconds since GPS standard epoch.7"},
            {"timeEnd", "INT_4U", "End time of static data validity (if unknown, set to 0), GPS time in integer seconds since GPS standard epoch.7"},
            {"version", "INT_4U", "Version number for this static structure. i.e, the counter begins at 0 and is incremented by 1 thereafter. Updated statics for the same time window (e.g., modified calibration data) will be identified by unique version numbers."},
            {"detector", "PTR_STRUCT(FrDetector *)", "Identifier for the detector this static data is associated with."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of data."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list. It is possible for a frame to contain more than one structure requiring different FrStatData structures. For example FrDetector for raw data may require static data associated with instrumental parameters; FrProcData for processed data may require static data associated with the filtering or other analysis parameters; FrSimData for simulated data may require static data to define precisely the input parameters to the simulation. For this reason, there is included in the FrStatData definition a PTR_STRUCT object which provides information on the antecedent detector structure with which any one FrStatData structure is associated. Footnote 21, Table 20, applies to each detector structure separately. 21 A file is not required to contain any FrStatData structure; however, if at least one FrStatData structure exists in a frame, then the first one will appear immediately after its associated detector structure. Subsequent instances of FrStatData are not linked; each one must be identified at read time. 22 Note that the combined list of FrStatData elements {name,timeStart, timeEnd,version} must be unique. To access FrStatData of a given name for a given epoch, one selects the block(s) with the desired name and with a time range spanning the epoch of interest, one then selects that block with the latest timeStart, and finally one takes the FrStatData with the highest version number. page 24 of 40"},
        }
    };
    // FrSummary
    defs[5]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment."},
            {"test", "STRING", "Statistical test(s) used on raw data"},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding for this FrSummary"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional summary information."},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary."},
        }
    };
    // FrTOC
    defs[5]["FrTOC"] = {
        "FrTOC",
        "",
        {
            {"ULeapS", "INT_2S", "From the first FrameH in the file."},
            {"nFrame", "INT_4U", "Number of frames in this file"},
            {"dataQuality", "*INT_4U", "Array of integer QA words from each FrameH (size of nFrame)"},
            {"GTimeS", "*INT_4U", "Array of integer GPS frame times (size of nFrame)"},
            {"GTimeN", "*INT_4U", "Array of integer GPS residual nanoseconds for the frame (size of nFrame)"},
            {"dt", "*REAL_8", "Array of frame durations in seconds (size of nFrame)"},
            {"runs", "*INT_4S", "Array of run numbers (size of nFrame)."},
            {"frame", "*INT_4U", "Array of frame numbers (size of nFrame)."},
            {"positionH", "*INT_8U", "Array of FrameH positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstADC", "*INT_8U", "Array of first FrADCData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstSer", "*INT_8U", "Array of first FrSerData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstTable", "*INT_8U", "Array of first FrTable positions, in bytes, from beginning of file (size of nFrame). frame."},
            {"nFirstMsg", "*INT_8U", "Array of first FrMsg positions, in bytes, from beginning of file (size of nFrame)."},
            {"nSH", "INT_4U", "Number of FrSH structures in the file."},
            {"SHid", "*INT_2U", "Array of FrSH IDs (size of nSH)."},
            {"SHname", "*STRING", "Array of FrSH names (size of nSH)."},
            {"nDetector", "INT_4U", "Number of distinct types of FrDetector in the file.23"},
            {"nameDetector", "*STRING", "Array of FrDetector names (size of nDetector). They appear alphabetically."},
            {"positionDetector", "*INT_8U", "Array of FrDetector positions from the beginning of file (size of nDetector). We capture only the first occurrence for each type of FrDetector.24 23 e.g., a file composed of 10 frames, each of which has data from 3 interferometers contains 30 FrDetector structures grouped into 3 types!: nDetector=3. 24 In the large majority of cases, all FrDetector structures corresponding to one detector will be copies of each other and it is sufficient to point to the first one!; this means that files containing multiple frames from the same detector operating in a different mode (e.g., rotations of ALLEGRO) will not have direct access via the FrTOC to all the FrDetector structures. page 26 of 40"},
            {"nStatType", "INT_4U", "Number of static data block types in the file. Each is identified by a unique name If nStat == 232-1, then “no data available in FrTOC” For each FrStatData:"},
            {"nameStat", "STRING", "FrStatData name"},
            {"detector", "STRING", "Detector name"},
            {"nStatInstance", "INT_4U", "Number of instance for this FrStatData"},
            {"tStart", "*INT_4U", "Array of GPS integer start times, in seconds (size of nStatInstance)"},
            {"tEnd", "*INT_4U", "Array of GPS integer end times, in seconds (size of nStatInstance)"},
            {"version", "*INT_4U", "Array of version time (size of nStatInstance)"},
            {"positionStat", "*INT_8U", "Array of FrStatData positions from beginning of file (size of nStatInstance) For FrAdcData:"},
            {"nADC", "INT_4U", "Number of unique FrAdcData names in file. If nADC == 232-1, then “no data available in FrTOC”"},
            {"name", "*STRING", "Array of FrAdcData names (size of nADC)"},
            {"channelID", "*INT_4U", "Array of ADC channel IDs (size of nADC)"},
            {"groupID", "*INT_4U", "Array of ADC group IDs (size of nADC)"},
            {"positionADC", "*INT_8U", "Array of lists of FrAdcData offset positions, in bytes, from beginning of file (size of nFrame*nADC) Ordering of entries:row/column major ordering, i.e., all positions for one ADC appear sequentially. For FrProcData:"},
            {"nProc", "INT_4U", "Number of unique FrProcData names in file. If nProc == 232-1, then “no data available in FrTOC”"},
            {"nameProc", "*STRING", "Array of FrProcData names (size of nProc)"},
            {"positionProc", "*INT_8U", "Array of FrProcData positions, in bytes, from beginning of file (size of nFrame*nProc) For FrSimData:"},
            {"nSim", "INT_4U", "Number of unique FrSimData names in file. If nSim == 232-1, then “no data available in FrTOC”"},
            {"nameSim", "*STRING", "Array of FrSimData names (size of nSim)"},
            {"positionSim", "*INT_8U", "Array of FrSimData positions, in bytes, from beginning of file (size of nFrame*nSim) For FrSerData:"},
            {"nSer", "INT_4U", "Number of unique FrSerData names in file. If nSer == 232-1, then “no data available in FrTOC”"},
            {"nameSer", "*STRING", "Array of FrSerData names (size of nSer)"},
            {"positionSer", "*INT_8U", "Array of FrSerData positions, in bytes, from beginning of file (size of nFrame*nSer) For FrSummary:"},
            {"nSummary", "INT_4U", "Number of unique FrSummary names in file. If nSummary == 232-1, then “no data available in FrTOC”"},
            {"nameSum", "*STRING", "Array of FrSummary names (size of nSummary) page 27 of 40"},
            {"positionSum", "*INT_8U", "Array of FrSummary positions, in bytes, from beginning of file (size of nFrame*nSummary) For FrEvent:"},
            {"nEventType", "INT_4U", "Number of type of FrEvent in the file"},
            {"nameEvent", "*STRING", "Array of FrEvent names (size of nEventType) They appear alphabetically."},
            {"nEvent", "*INT_4U", "Number of FrEvent for each type of FrEvent (size of nEventType) If nEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"GTimeSEvent", "*INT_4U", "GPS time in integer seconds (size of nEvent[0]+nEvent[1]+…+nEvent[nEventType])"},
            {"GTimeNEvent", "*INT_4U", "Residual GPS time in integer nanoseconds (same size as GTimeSEvent )"},
            {"amplitudeEvent", "*REAL_4", "Event amplitude (same size as GTimeSEvent)"},
            {"positionEvent", "*INT_8U", "Array of FrEvent positions, in bytes, from beginning of file (same size as GTimeSEvent ) For FrSimEvent:"},
            {"nSimEventType", "INT_4U", "Number of type of FrSimEvent in the file"},
            {"nameSimEvent", "*STRING", "Array of FrSimEvent names (size of nSimEventType) They appear alphabetically."},
            {"nSimEvent", "*INT_4U", "Number of FrSimEvent for each type of FrSimEvent (size of nSimEventType) If nSimEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"GTimeSSim", "*INT_4U", "GPS time in integer seconds (size of nSimEvent[0]+nSimEvent[1]+…+nSimEvent[nSimEventType] )"},
            {"GTimeNSim", "*INT_4U", "Residual GPS time in integer nanoseconds (same size as GtimeSSim)"},
            {"amplitudeSimEvent", "*REAL_4", "Event amplitude (same size as GTimeSSim)"},
            {"positionSimEvent", "*INT_8U", "Array of FrSimEvent positions, in bytes, from beginning of file (same size as GtimeSSim ) Index entries of a table of contents are ordered alphabetically by channel names. This ordering is determined by the byte value of the corresponding ASCII character set with 1st byte being the most significant (rules of the strcmp C function). This is a case sensitive order. Frames, FrEvent and FrSimEvent are ordered according their time in the TOC even if they are not ordered in the file. page 28 of 40"},
        }
    };
    // FrTable
    defs[5]["FrTable"] = {
        "FrTable",
        "",
        {
            {"name", "STRING", "Name of this table -- not required to be unique within a frame."},
            {"comment", "STRING", "Comment"},
            {"nColumn", "INT_2U", "Number of columns in table"},
            {"nRow", "INT_4U", "Number of rows in table. The frame API must ensure that all columns have this length."},
            {"columnName", "STRING[nColumn]", "Names of the columns. The frame API must then copy these names into each FrVect structure included in this FrTable"},
            {"column", "PTR_STRUCT(FrVect *)", "First column of table (may be names of rows)"},
            {"next", "PTR_STRUCT(FrTable *)", "Next table in linked list page 25 of 40"},
        }
    };
    // FrVect
    defs[5]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name -- not required to be unique"},
            {"compress", "INT_2U", "Compression algorithm number25"},
            {"type", "INT_2U", "Vector class26"},
            {"nData", "INT_8U", "Number of sample elements in data series"},
            {"nBytes", "INT_8U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "INT_8U[nDim]", "dimension lengths"},
            {"dx", "REAL_8[nDim]", "sample spacing along each coordinate;"},
            {"startX", "REAL_8[nDim]", "Origin for each data set"},
            {"unitX", "STRING[nDim]", "scale factors in ASCII; “unit per step size along each coordinate”. If dimensionless, then unitX == <NONE>, in CAPITALS (without <...>)."},
            {"unitY", "STRING", "String describing how to interpret the value of each element. If dimensionless, then unitY == <NONE>, in CAPITALS (without <...>)."},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data. For multi-dimensional arrays, elements are stored by rows following the C convention. 25 See APPENDIX B 26 See APPENDIX C. 27 See APPENDIX C. page 29 of 40"},
        }
    };
}

// Definitions for Version 6
static void addDefinitionsV6(DefinitionMap& defs) {
    // FrAdcData
    defs[6]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name -- must be unique with the frame"},
            {"comment", "STRING", "Comment"},
            {"channelGroup", "INT_4U", "Channel grouping number containing ADC9"},
            {"channelNumber", "INT_4U", "Channel number9"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Units @ ADC_counts = 0)"},
            {"slope", "REAL_4", "ADC calibration: input units/ct"},
            {"units", "STRING", "ADC calibration: input units for slope. If dimensionless, then units == <NONE>, in CAPITALS (without <...>)."},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length10"},
            {"fShift", "REAL_8", "fShift is the frequency (in Hz) in the original data that corresponds to 0 Hz in the heterodyned series.11"},
            {"phase", "REAL_4", "Phase (in radian) of heterodyning signal at start of dataset11"},
            {"dataValid", "INT_2U", "Data valid flag: dataValid = 0 -> ADC data valid; dataValid!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list. 8 Whenever physical units are used, these shall be given as combinations of SI units; ADC counts shall be denoted ‘ct’. 9 These two variables are determined by site and must be unique over all detectors 10 Time offsets always added together (to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset . Note that all quantities are ALWAYS positive. 11 In the heterodyning process the real time series is multiplied by cos[2pfShift(t-t)+phase] to get the real part 0 and by –sin[2pfShift(t-t)+phase] (note the minus sign) to get the imaginary part of the resulting complex time 0 series. The time origin t is the beginning of the frame 0 page 14 of 41"},
        }
    };
    // FrDetector
    defs[6]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name as described in APPENDIX D (e.g., Virgo; GEO_600; TAMA_300; LHO_2k; LLO_4k; 40m; PNI; simulated pseudo data - model version etc.)"},
            {"prefix", "CHAR[2]", "Channel prefix for this detector as described in APPENDIX D."},
            {"longitude", "REAL_8", "Detector vertex longitude, geographical coordinates: radians; Value> 0 => E of Greenwich (-p<Longitude <= +p)"},
            {"latitude", "REAL_8", "Detector vertex latitude, geographical coordinates: radians; Value > 0 => N of Equator ( -p/2<Latitude <= +p/2)"},
            {"elevation", "REAL_4", "Vertex elevation, meters. relative to WGS84 ellipsoid."},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians East of North (0<= ArmXazimuth < 2p)"},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians East of North (0<= ArmYazimuth < 2p)"},
            {"armXaltitude", "REAL_4", "Altitude (pitch) angle of X arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) -p/2< ArmXaltitude <= +p/2."},
            {"armYaltitude", "REAL_4", "Altitude (pitch) angle of Y arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) -p/2< ArmYaltitude <= +p/2."},
            {"armXmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the X cavity (meters) (should be zero for bars)"},
            {"armYmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the Y cavity (meters) (should be zero for bars)"},
            {"localTime", "INT_4S", "Local seasonal time – UTC in seconds. If localTime%1800 != 0 then localTime is undefined."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure for additional detector data.."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for user-provided (presently undefined) table structure for additional detector data. Column 1: String containing QA word definitions; Column 2: Value of QA words 0 = “Data QA not evaluated for these data”. 1 = “Data should not be used for source searches”, i.e. BAD data. 2 = “Data not ‘perfect’, but suitable for long time stretch searches”. 3 = “Data ‘perfect’ – suitable for burst searches”."},
            {"next", "PTR_STRUCT(FrDetector *)", "Identifier for next detector structure in the linked list 12 All geographical coordinates are defined with respect to the Earth ellipsoidal model WGS84. page 15 of 41"},
        }
    };
    // FrEndOfFile
    defs[6]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_8U", "Total number of bytes in this file (0 if NOT computed)"},
            {"chkType", "INT_4U", "Checksum schemes: 0 = none, 1 = CRC, >2 presently unused"},
            {"chkSum", "INT_4U", "File checksum. 13"},
            {"seekTOC", "INT_8U", "Bytes to back up to the beginning of the table of contents structure. If seekTOC == 0, then there is no TOC for this file. The CRC should be POSIX.2 checksum as referred to in section 4.9 of P1003.2/D11.2, (for example: http://ftp.optiva.ee/pub/misc/posix_drafts/p1003.2/d11.2/4.9)."},
        }
    };
    // FrEndOfFrame
    defs[6]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4S", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header run number datum"},
            {"chkType", "INT_4U", "Same definition as in FrEndOfFile"},
            {"chkSum", "INT_4U", "Frame checksum.14 . 13 This checksum is calculated over the contents of each file, starting with the file header (FrHeader) and ending with the FrEndOfFile structure with the value chkSum = 0. Whenever a file checksum is not calculated, the default value is chkSum =0. 14 This checksum is calculated over the contents of each frame, starting with the FrameH structure and ending with the FrEndOfFrame structure with the value chkSum = 0. Whenever a frame checksum is not calculated, the default value is chkSum =0. page 16 of 41"},
        }
    };
    // FrHistory
    defs[6]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record. Note: when an FrHistory is linked to an FrProcData, its name variable must be the FrProcData channel name"},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch.7"},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list."},
        }
    };
    // FrMsg
    defs[6]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined); default = 0."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to this FrMsg"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list. page 18 of 41"},
        }
    };
    // FrProcData
    defs[6]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment"},
            {"type", "INT_2U", "Type of data object: 0 Unknown/user defined; 1! Time Series; 2! Frequency series; 3 Other 1D Series data; 4! Time-Frequency; 5! Wavelets; 6! Multi-dimensional"},
            {"subType", "INT_2U", "Subtype for f-Series (TBD for other types) 0 Unknown/user defined; 1 DFT; 2 Amplitude Spectral Density; 3 Power spectral density; 4 Cross spectral density; 5 Coherence; 6 Transfer function"},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length. 15"},
            {"tRange", "REAL_8", "Duration of sampled data (tStop-tStart)16"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.11,16,17 In multidimensional objects this applies to the first frequency dimension"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset (radians, 0 if unknown)11"},
            {"fRange", "REAL_8", "Frequency range (=fMax-fMin, 0 if unknown)16"},
            {"BW", "REAL_8", "Resolution bandwidth (Sum{w[i]2}/N where w[i] is the i{th} window coefficient (0 if unknown)"},
            {"nAuxParam", "INT_2U", "Number of auxiliary parameters"},
            {"auxParam", "REAL_8[nAuxParam]", "! Array of auxiliary parameters (size of nAuxParam)."},
            {"auxParamNames", "STRING[nAuxParam]", "Array of auxiliary parameter names (size of nAuxParam). 18"},
            {"data", "PTR_STRUCT(FrVect *)", "Data vector. The data vector for single dimensional types (t-Series and f- Series) must have a singe dimension."},
            {"aux", "PTR_STRUCT(FrVect *)", "Auxiliary data; use is generic. 15 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS. If FrVect contains a t-series, then time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS + startX[0]. Note that all quantities are ALWAYS positive. 16 tRange, fShift, fRange are redundant with the axis information in the data Vector in some cases. If a redundancy exists, the data must be identical to that in the FrVect for the earliest time and/or lowest frequency dimension (e.g. for a t-Series tRange = dx[0]*nx[0]). If a discrepancy exists then the FrVect values take precedence 17 If FrVect contains a f-series then the frequency offsets fShift and startX[0] are added together to obtain the frequency in the original data, original_frequency_of_1st_sample = fShift + startX[0], while startX[0] gives the offset in frequency in the heterodyned data of the 1st sample 18 auxParamNames may contain only the following ASCII characters: \"a-z\" , \"A-Z\" , \"0-9\" , \"_\" , \"-\" , \":\" , \"#\" , \"$\" , \"@\", and must begin with an ALPHA character (a-z, A-Z). page 19 of 41"},
            {"table", "PTR_STRUCT(FrTable *)", "Parameter table"},
            {"history", "PTR_STRUCT(FrHistory *)", "Channel history . 19"},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next FrProcData structure in the linked list. 19 The first FrHistory should describe the processing used to build this FrProcData channel. Its name variable should be the FrProcData name. If the channel(s) used to produce this FrProcData have prior FrHistory structures, then in order to not lose this history, these structures should be copied and added to the FrHistory linked list. page 20 of 41"},
        }
    };
    // FrRawData
    defs[6]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list."},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list."},
            {"firstTable", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list."},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures."},
        }
    };
    // FrSerData
    defs[6]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch.7"},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_4", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for the user-defined table structure."},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list. page 21 of 41"},
        }
    };
    // FrSimData
    defs[6]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_4", "Simulated data sample rate, samples / s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds). Must be positive and smaller than the frame length. 20"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.11"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset.11"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of simulated data."},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for input parameters for simulation."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table data structure."},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list. 20 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset. Note that all quantities are ALWAYS positive page 22 of 41"},
        }
    };
    // FrSimEvent
    defs[6]["FrSimEvent"] = {
        "FrSimEvent",
        "",
        {
            {"name", "STRING", "Name of event."},
            {"comment", "STRING", "Descriptor of event."},
            {"inputs", "STRING", "Input channels and filter parameters to event process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of event."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to maximum of event."},
            {"timeBefore", "REAL_4", "Signal duration before GTimeS"},
            {"timeAfter", "REAL_4", "Signal duration after GTimeS"},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by event"},
            {"nParam", "INT_2U", "Number of additional event parameters."},
            {"parameters", "REAL_4[nParam]", "Array of additional event parameters (size of nParam)."},
            {"parameterNames", "STRING[nParam]", "Array of parameter names (size of nParam)."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional event results."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional event information."},
            {"next", "PTR_STRUCT(FrSimEvent *)", "Identifier for another event. page 23 of 41"},
        }
    };
    // FrStatData
    defs[6]["FrStatData"] = {
        "FrStatData",
        "",
        {
            {"name", "STRING", "Static data name22"},
            {"comment", "STRING", "Comment"},
            {"representation", "STRING", "Type of static data being represented. e.g., calibration, swept sine, pole-zero, FIR or IIR coefficients..."},
            {"timeStart", "INT_4U", "Start time of static data validity, GPS time in integer seconds since GPS standard epoch.7"},
            {"timeEnd", "INT_4U", "End time of static data validity (if unknown, set to 0), GPS time in integer seconds since GPS standard epoch.7"},
            {"version", "INT_4U", "Version number for this static structure. i.e, the counter begins at 0 and is incremented by 1 thereafter. Updated statics for the same time window (e.g., modified calibration data) will be identified by unique version numbers."},
            {"detector", "PTR_STRUCT(FrDetector *)", "Identifier for the detector this static data is associated with."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of data."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list. It is possible for a frame to contain more than one structure requiring different FrStatData structures. For example FrDetector for raw data may require static data associated with instrumental parameters; FrProcData for processed data may require static data associated with the filtering or other analysis parameters; FrSimData for simulated data may require static data to define precisely the input parameters to the simulation. For this reason, there is included in the FrStatData definition a PTR_STRUCT object which provides information on the antecedent detector structure with which any one FrStatData structure is associated. Footnote 21, Table 20, applies to each detector structure separately. 21 A file is not required to contain any FrStatData structure; however, if at least one FrStatData structure exists in a frame, then the first one will appear immediately after its associated detector structure. Subsequent instances of FrStatData are not linked; each one must be identified at read time. 22 Note that the combined list of FrStatData elements {name,timeStart, timeEnd,version} must be unique. To access FrStatData of a given name for a given epoch, one selects the block(s) with the desired name and with a time range spanning the epoch of interest, one then selects that block with the latest timeStart, and finally one takes the FrStatData with the highest version number. page 24 of 41"},
        }
    };
    // FrSummary
    defs[6]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment."},
            {"test", "STRING", "Statistical test(s) used on raw data"},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding for this FrSummary"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional summary information."},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary."},
        }
    };
    // FrTOC
    defs[6]["FrTOC"] = {
        "FrTOC",
        "",
        {
            {"ULeapS", "INT_2S", "From the first FrameH in the file."},
            {"nFrame", "INT_4U", "Number of frames in this file"},
            {"dataQuality", "*INT_4U", "Array of integer QA words from each FrameH (size of nFrame)"},
            {"GTimeS", "*INT_4U", "Array of integer GPS frame times (size of nFrame)"},
            {"GTimeN", "*INT_4U", "Array of integer GPS residual nanoseconds for the frame (size of nFrame)"},
            {"dt", "*REAL_8", "Array of frame durations in seconds (size of nFrame)"},
            {"runs", "*INT_4S", "Array of run numbers (size of nFrame)."},
            {"frame", "*INT_4U", "Array of frame numbers (size of nFrame)."},
            {"positionH", "*INT_8U", "Array of FrameH positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstADC", "*INT_8U", "Array of first FrADCData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstSer", "*INT_8U", "Array of first FrSerData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstTable", "*INT_8U", "Array of first FrTable positions, in bytes, from beginning of file (size of nFrame). frame."},
            {"nFirstMsg", "*INT_8U", "Array of first FrMsg positions, in bytes, from beginning of file (size of nFrame)."},
            {"nSH", "INT_4U", "Number of FrSH structures in the file."},
            {"SHid", "*INT_2U", "Array of FrSH IDs (size of nSH)."},
            {"SHname", "*STRING", "Array of FrSH names (size of nSH)."},
            {"nDetector", "INT_4U", "Number of distinct types of FrDetector in the file.23"},
            {"nameDetector", "*STRING", "Array of FrDetector names (size of nDetector). They appear alphabetically."},
            {"positionDetector", "*INT_8U", "Array of FrDetector positions from the beginning of file (size of nDetector). We capture only the first occurrence for each type of FrDetector.24 23 e.g., a file composed of 10 frames, each of which has data from 3 interferometers contains 30 FrDetector structures grouped into 3 types!: nDetector=3. 24 In the large majority of cases, all FrDetector structures corresponding to one detector will be copies of each other and it is sufficient to point to the first one!; this means that files containing multiple frames from the same detector operating in a different mode (e.g., rotations of ALLEGRO) will not have direct access via the FrTOC to all the FrDetector structures. page 26 of 41"},
            {"nStatType", "INT_4U", "Number of static data block types in the file. Each is identified by a unique name If nStat == 232-1, then “no data available in FrTOC” For each FrStatData:"},
            {"nameStat", "STRING", "FrStatData name"},
            {"detector", "STRING", "Detector name"},
            {"nStatInstance", "INT_4U", "Number of instance for this FrStatData"},
            {"tStart", "*INT_4U", "Array of GPS integer start times, in seconds (size of nStatInstance)"},
            {"tEnd", "*INT_4U", "Array of GPS integer end times, in seconds (size of nStatInstance)"},
            {"version", "*INT_4U", "Array of version time (size of nStatInstance)"},
            {"positionStat", "*INT_8U", "Array of FrStatData positions from beginning of file (size of nStatInstance) For FrAdcData:"},
            {"nADC", "INT_4U", "Number of unique FrAdcData names in file. If nADC == 232-1, then “no data available in FrTOC”"},
            {"name", "*STRING", "Array of FrAdcData names (size of nADC)"},
            {"channelID", "*INT_4U", "Array of ADC channel IDs (size of nADC)"},
            {"groupID", "*INT_4U", "Array of ADC group IDs (size of nADC)"},
            {"positionADC", "*INT_8U", "Array of lists of FrAdcData offset positions, in bytes, from beginning of file (size of nFrame*nADC) Ordering of entries:row/column major ordering, i.e., all positions for one ADC appear sequentially. For FrProcData:"},
            {"nProc", "INT_4U", "Number of unique FrProcData names in file. If nProc == 232-1, then “no data available in FrTOC”"},
            {"nameProc", "*STRING", "Array of FrProcData names (size of nProc)"},
            {"positionProc", "*INT_8U", "Array of FrProcData positions, in bytes, from beginning of file (size of nFrame*nProc) For FrSimData:"},
            {"nSim", "INT_4U", "Number of unique FrSimData names in file. If nSim == 232-1, then “no data available in FrTOC”"},
            {"nameSim", "*STRING", "Array of FrSimData names (size of nSim)"},
            {"positionSim", "*INT_8U", "Array of FrSimData positions, in bytes, from beginning of file (size of nFrame*nSim) For FrSerData:"},
            {"nSer", "INT_4U", "Number of unique FrSerData names in file. If nSer == 232-1, then “no data available in FrTOC”"},
            {"nameSer", "*STRING", "Array of FrSerData names (size of nSer)"},
            {"positionSer", "*INT_8U", "Array of FrSerData positions, in bytes, from beginning of file (size of nFrame*nSer) For FrSummary:"},
            {"nSummary", "INT_4U", "Number of unique FrSummary names in file. If nSummary == 232-1, then “no data available in FrTOC”"},
            {"nameSum", "*STRING", "Array of FrSummary names (size of nSummary) page 27 of 41"},
            {"positionSum", "*INT_8U", "Array of FrSummary positions, in bytes, from beginning of file (size of nFrame*nSummary) For FrEvent:"},
            {"nEventType", "INT_4U", "Number of type of FrEvent in the file"},
            {"nameEvent", "*STRING", "Array of FrEvent names (size of nEventType) They appear alphabetically."},
            {"nEvent", "*INT_4U", "Number of FrEvent for each type of FrEvent (size of nEventType) If nEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"GTimeSEvent", "*INT_4U", "GPS time in integer seconds (size of nEvent[0]+nEvent[1]+…+nEvent[nEventType])"},
            {"GTimeNEvent", "*INT_4U", "Residual GPS time in integer nanoseconds (same size as GTimeSEvent )"},
            {"amplitudeEvent", "*REAL_4", "Event amplitude (same size as GTimeSEvent)"},
            {"positionEvent", "*INT_8U", "Array of FrEvent positions, in bytes, from beginning of file (same size as GTimeSEvent ) For FrSimEvent:"},
            {"nSimEventType", "INT_4U", "Number of type of FrSimEvent in the file"},
            {"nameSimEvent", "*STRING", "Array of FrSimEvent names (size of nSimEventType) They appear alphabetically."},
            {"nSimEvent", "*INT_4U", "Number of FrSimEvent for each type of FrSimEvent (size of nSimEventType) If nSimEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"GTimeSSim", "*INT_4U", "GPS time in integer seconds (size of nSimEvent[0]+nSimEvent[1]+…+nSimEvent[nSimEventType] )"},
            {"GTimeNSim", "*INT_4U", "Residual GPS time in integer nanoseconds (same size as GtimeSSim)"},
            {"amplitudeSimEvent", "*REAL_4", "Event amplitude (same size as GTimeSSim)"},
            {"positionSimEvent", "*INT_8U", "Array of FrSimEvent positions, in bytes, from beginning of file (same size as GtimeSSim ) Index entries of a table of contents are ordered alphabetically by channel names. This ordering is determined by the byte value of the corresponding ASCII character set with 1st byte being the most significant (rules of the strcmp C function). This is a case sensitive order. Frames, FrEvent and FrSimEvent are ordered according their time in the TOC even if they are not ordered in the file. page 28 of 41"},
        }
    };
    // FrTable
    defs[6]["FrTable"] = {
        "FrTable",
        "",
        {
            {"name", "STRING", "Name of this table -- not required to be unique within a frame."},
            {"comment", "STRING", "Comment"},
            {"nColumn", "INT_2U", "Number of columns in table"},
            {"nRow", "INT_4U", "Number of rows in table. The frame API must ensure that all columns have this length."},
            {"columnName", "STRING[nColumn]", "Names of the columns. The frame API must then copy these names into each FrVect structure included in this FrTable"},
            {"column", "PTR_STRUCT(FrVect *)", "First column of table (may be names of rows)"},
            {"next", "PTR_STRUCT(FrTable *)", "Next table in linked list page 25 of 41"},
        }
    };
    // FrVect
    defs[6]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name -- not required to be unique"},
            {"compress", "INT_2U", "Compression algorithm number25"},
            {"type", "INT_2U", "Vector class26"},
            {"nData", "INT_8U", "Number of sample elements in data series"},
            {"nBytes", "INT_8U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "INT_8U[nDim]", "dimension lengths"},
            {"dx", "REAL_8[nDim]", "sample spacing along each coordinate;"},
            {"startX", "REAL_8[nDim]", "Origin for each data set"},
            {"unitX", "STRING[nDim]", "scale factors in ASCII; “unit per step size along each coordinate”. If dimensionless, then unitX == <NONE>, in CAPITALS (without <...>)."},
            {"unitY", "STRING", "String describing how to interpret the value of each element. If dimensionless, then unitY == <NONE>, in CAPITALS (without <...>)."},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data. For multi-dimensional arrays, elements are stored by rows following the C convention. 25 See APPENDIX B 26 See APPENDIX C. 27 See APPENDIX C. page 29 of 41"},
        }
    };
}

// Definitions for Version 7
static void addDefinitionsV7(DefinitionMap& defs) {
    // FrAdcData
    defs[7]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name -- must be unique with the frame"},
            {"comment", "STRING", "Comment"},
            {"channelGroup", "INT_4U", "Channel grouping number containing ADC9"},
            {"channelNumber", "INT_4U", "Channel number9"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Units @ ADC_counts = 0)"},
            {"slope", "REAL_4", "ADC calibration: input units/ct"},
            {"units", "STRING", "ADC calibration: input units for slope. If dimensionless, then units == <NONE>, in CAPITALS (without <...>)."},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length10"},
            {"fShift", "REAL_8", "fShift is the frequency (in Hz) in the original data that corresponds to 0 Hz in the heterodyned series.11"},
            {"phase", "REAL_4", "Phase (in radian) of heterodyning signal at start of dataset11"},
            {"dataValid", "INT_2U", "Data valid flag: dataValid = 0 -> ADC data valid; dataValid!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list. 8 Whenever physical units are used, these shall be given as combinations of SI units; ADC counts shall be denoted ‘ct’. 9 These two variables are determined by site and must be unique over all detectors 10 Time offsets always added together (to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset . Note that all quantities are ALWAYS positive. 11 In the heterodyning process the real time series is multiplied by cos[2πfShift(t-t )+phase] to get the real part 0 and by –sin[2πfShift(t-t )+phase] (note the minus sign) to get the imaginary part of the resulting complex time 0 series. The time origin t is the beginning of the frame 0 page 14 of 41"},
        }
    };
    // FrDetector
    defs[7]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name as described in APPENDIX D (e.g., Virgo; GEO_600; TAMA_300; LHO_2k; LLO_4k; 40m; PNI; simulated pseudo data - model version etc.)"},
            {"prefix", "CHAR[2]", "Channel prefix for this detector as described in APPENDIX D."},
            {"longitude", "REAL_8", "Detector vertex longitude, geographical coordinates: radians; Value> 0 => E of Greenwich (-π<Longitude <= +π)"},
            {"latitude", "REAL_8", "Detector vertex latitude, geographical coordinates: radians; Value > 0 => N of Equator ( −π/2<Latitude <= +π/2)"},
            {"elevation", "REAL_4", "Vertex elevation, meters. relative to WGS84 ellipsoid."},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians East of North (0<= ArmXazimuth < 2π)"},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians East of North (0<= ArmYazimuth < 2π)"},
            {"armXaltitude", "REAL_4", "Altitude (pitch) angle of X arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) −π/2< ArmXaltitude <= +π/2."},
            {"armYaltitude", "REAL_4", "Altitude (pitch) angle of Y arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) −π/2< ArmYaltitude <= +π/2."},
            {"armXmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the X cavity (meters) (should be zero for bars)"},
            {"armYmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the Y cavity (meters) (should be zero for bars)"},
            {"localTime", "INT_4S", "Local seasonal time – UTC in seconds. If localTime%1800 != 0 then localTime is undefined."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure for additional detector data.."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for user-provided (presently undefined) table structure for additional detector data. Column 1: String containing QA word definitions; Column 2: Value of QA words 0 = “Data QA not evaluated for these data”. 1 = “Data should not be used for source searches”, i.e. BAD data. 2 = “Data not ‘perfect’, but suitable for long time stretch searches”. 3 = “Data ‘perfect’ – suitable for burst searches”."},
            {"next", "PTR_STRUCT(FrDetector *)", "Identifier for next detector structure in the linked list 12 All geographical coordinates are defined with respect to the Earth ellipsoidal model WGS84. page 15 of 41"},
        }
    };
    // FrEndOfFile
    defs[7]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_8U", "Total number of bytes in this file (0 if NOT computed)"},
            {"chkType", "INT_4U", "Checksum schemes: 0 = none, 1 = CRC, >2 presently unused"},
            {"chkSum", "INT_4U", "File checksum. 13"},
            {"seekTOC", "INT_8U", "Bytes to back up to the beginning of the table of contents structure. If seekTOC == 0, then there is no TOC for this file. The CRC should be POSIX.2 checksum as referred to in section 4.9 of P1003.2/D11.2, (for example: http://ftp.optiva.ee/pub/misc/posix_drafts/p1003.2/d11.2/4.9)."},
        }
    };
    // FrEndOfFrame
    defs[7]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4S", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header run number datum"},
            {"chkType", "INT_4U", "Same definition as in FrEndOfFile"},
            {"chkSum", "INT_4U", "Frame checksum.14 . 13 This checksum is calculated over the contents of each file, starting with the file header (FrHeader) and ending with the FrEndOfFile structure with the value chkSum = 0. Whenever a file checksum is not calculated, the default value is chkSum =0. 14 This checksum is calculated over the contents of each frame, starting with the FrameH structure and ending with the FrEndOfFrame structure with the value chkSum = 0. Whenever a frame checksum is not calculated, the default value is chkSum =0. page 16 of 41"},
        }
    };
    // FrHistory
    defs[7]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record. Note: when an FrHistory is linked to an FrProcData, its name variable must be the FrProcData channel name"},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch.7"},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list."},
        }
    };
    // FrMsg
    defs[7]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined); default = 0."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to this FrMsg"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list. page 18 of 41"},
        }
    };
    // FrProcData
    defs[7]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment"},
            {"type", "INT_2U", "Type of data object: 0 Unknown/user defined; 1 Time Series; 2 Frequency series; 3 Other 1D Series data; 4 Time-Frequency; 5 Wavelets; 6 Multi-dimensional"},
            {"subType", "INT_2U", "Subtype for f-Series (TBD for other types) 0 Unknown/user defined; 1 DFT; 2 Amplitude Spectral Density; 3 Power spectral density; 4 Cross spectral density; 5 Coherence; 6 Transfer function"},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length. 15"},
            {"tRange", "REAL_8", "Duration of sampled data (tStop-tStart)16"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.11,16,17 In multidimensional objects this applies to the first frequency dimension"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset (radians, 0 if unknown)11"},
            {"fRange", "REAL_8", "Frequency range (=fMax-fMin, 0 if unknown)16"},
            {"BW", "REAL_8", "Resolution bandwidth (Sum{w[i]2}/N where w[i] is the i{th} window coefficient (0 if unknown)"},
            {"nAuxParam", "INT_2U", "Number of auxiliary parameters"},
            {"auxParam", "REAL_8[nAuxParam]", "Array of auxiliary parameters (size of nAuxParam)."},
            {"auxParamNames", "STRING[nAuxParam]", "Array of auxiliary parameter names (size of nAuxParam). 18"},
            {"data", "PTR_STRUCT(FrVect *)", "Data vector. The data vector for single dimensional types (t-Series and f- Series) must have a singe dimension."},
            {"aux", "PTR_STRUCT(FrVect *)", "Auxiliary data; use is generic. 15 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS. If FrVect contains a t-series, then time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS + startX[0]. Note that all quantities are ALWAYS positive. 16 tRange, fShift, fRange are redundant with the axis information in the data Vector in some cases. If a redundancy exists, the data must be identical to that in the FrVect for the earliest time and/or lowest frequency dimension (e.g. for a t-Series tRange = dx[0]*nx[0]). If a discrepancy exists then the FrVect values take precedence 17 If FrVect contains a f-series then the frequency offsets fShift and startX[0] are added together to obtain the frequency in the original data, original_frequency_of_1st_sample = fShift + startX[0], while startX[0] gives the offset in frequency in the heterodyned data of the 1st sample 18 auxParamNames may contain only the following ASCII characters: \"a-z\" , \"A-Z\" , \"0-9\" , \"_\" , \"-\" , \":\" , \"#\" , \"$\" , \"@\", and must begin with an ALPHA character (a-z, A-Z). page 19 of 41"},
            {"table", "PTR_STRUCT(FrTable *)", "Parameter table"},
            {"history", "PTR_STRUCT(FrHistory *)", "Channel history . 19"},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next FrProcData structure in the linked list. 19 The first FrHistory should describe the processing used to build this FrProcData channel. Its name variable should be the FrProcData name. If the channel(s) used to produce this FrProcData have prior FrHistory structures, then in order to not lose this history, these structures should be copied and added to the FrHistory linked list. page 20 of 41"},
        }
    };
    // FrRawData
    defs[7]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list."},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list."},
            {"firstTable", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list."},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures."},
        }
    };
    // FrSerData
    defs[7]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch.7"},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_8", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for the user-defined table structure."},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list. page 21 of 41"},
        }
    };
    // FrSimData
    defs[7]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_8", "Simulated data sample rate, samples / s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds). Must be positive and smaller than the frame length. 20"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.11"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset.11"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of simulated data."},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for input parameters for simulation."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table data structure."},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list. 20 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset. Note that all quantities are ALWAYS positive page 22 of 41"},
        }
    };
    // FrSimEvent
    defs[7]["FrSimEvent"] = {
        "FrSimEvent",
        "",
        {
            {"name", "STRING", "Name of event."},
            {"comment", "STRING", "Descriptor of event."},
            {"inputs", "STRING", "Input channels and filter parameters to event process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of event."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to maximum of event."},
            {"timeBefore", "REAL_4", "Signal duration before GTimeS"},
            {"timeAfter", "REAL_4", "Signal duration after GTimeS"},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by event"},
            {"nParam", "INT_2U", "Number of additional event parameters."},
            {"parameters", "REAL_8[nParam]", "Array of additional event parameters (size of nParam)."},
            {"parameterNames", "STRING[nParam]", "Array of parameter names (size of nParam)."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional event results."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional event information."},
            {"next", "PTR_STRUCT(FrSimEvent *)", "Identifier for another event. page 23 of 41"},
        }
    };
    // FrStatData
    defs[7]["FrStatData"] = {
        "FrStatData",
        "",
        {
            {"name", "STRING", "Static data name22"},
            {"comment", "STRING", "Comment"},
            {"representation", "STRING", "Type of static data being represented. e.g., calibration, swept sine, pole-zero, FIR or IIR coefficients..."},
            {"timeStart", "INT_4U", "Start time of static data validity, GPS time in integer seconds since GPS standard epoch.7"},
            {"timeEnd", "INT_4U", "End time of static data validity (if unknown, set to 0), GPS time in integer seconds since GPS standard epoch.7"},
            {"version", "INT_4U", "Version number for this static structure. i.e, the counter begins at 0 and is incremented by 1 thereafter. Updated statics for the same time window (e.g., modified calibration data) will be identified by unique version numbers."},
            {"detector", "PTR_STRUCT(FrDetector *)", "Identifier for the detector this static data is associated with."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of data."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list. It is possible for a frame to contain more than one structure requiring different FrStatData structures. For example FrDetector for raw data may require static data associated with instrumental parameters; FrProcData for processed data may require static data associated with the filtering or other analysis parameters; FrSimData for simulated data may require static data to define precisely the input parameters to the simulation. For this reason, there is included in the FrStatData definition a PTR_STRUCT object which provides information on the antecedent detector structure with which any one FrStatData structure is associated. Footnote 21, Table 20, applies to each detector structure separately. 21 A file is not required to contain any FrStatData structure; however, if at least one FrStatData structure exists in a frame, then the first one will appear immediately after its associated detector structure. Subsequent instances of FrStatData are not linked; each one must be identified at read time. 22 Note that the combined list of FrStatData elements {name,timeStart, timeEnd,version} must be unique. To access FrStatData of a given name for a given epoch, one selects the block(s) with the desired name and with a time range spanning the epoch of interest, one then selects that block with the latest timeStart, and finally one takes the FrStatData with the highest version number. page 24 of 41"},
        }
    };
    // FrSummary
    defs[7]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment."},
            {"test", "STRING", "Statistical test(s) used on raw data"},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding for this FrSummary"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional summary information."},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary."},
        }
    };
    // FrTOC
    defs[7]["FrTOC"] = {
        "FrTOC",
        "",
        {
            {"ULeapS", "INT_2S", "From the first FrameH in the file."},
            {"nFrame", "INT_4U", "Number of frames in this file"},
            {"dataQuality", "*INT_4U", "Array of integer QA words from each FrameH (size of nFrame)"},
            {"GTimeS", "*INT_4U", "Array of integer GPS frame times (size of nFrame)"},
            {"GTimeN", "*INT_4U", "Array of integer GPS residual nanoseconds for the frame (size of nFrame)"},
            {"dt", "*REAL_8", "Array of frame durations in seconds (size of nFrame)"},
            {"runs", "*INT_4S", "Array of run numbers (size of nFrame)."},
            {"frame", "*INT_4U", "Array of frame numbers (size of nFrame)."},
            {"positionH", "*INT_8U", "Array of FrameH positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstADC", "*INT_8U", "Array of first FrADCData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstSer", "*INT_8U", "Array of first FrSerData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstTable", "*INT_8U", "Array of first FrTable positions, in bytes, from beginning of file (size of nFrame). frame."},
            {"nFirstMsg", "*INT_8U", "Array of first FrMsg positions, in bytes, from beginning of file (size of nFrame)."},
            {"nSH", "INT_4U", "Number of FrSH structures in the file."},
            {"SHid", "*INT_2U", "Array of FrSH IDs (size of nSH)."},
            {"SHname", "*STRING", "Array of FrSH names (size of nSH)."},
            {"nDetector", "INT_4U", "Number of distinct types of FrDetector in the file.23"},
            {"nameDetector", "*STRING", "Array of FrDetector names (size of nDetector). They appear alphabetically."},
            {"positionDetector", "*INT_8U", "Array of FrDetector positions from the beginning of file (size of nDetector). We capture only the first occurrence for each type of FrDetector.24 23 e.g., a file composed of 10 frames, each of which has data from 3 interferometers contains 30 FrDetector structures grouped into 3 types : nDetector=3. 24 In the large majority of cases, all FrDetector structures corresponding to one detector will be copies of each other and it is sufficient to point to the first one ; this means that files containing multiple frames from the same detector operating in a different mode (e.g., rotations of ALLEGRO) will not have direct access via the FrTOC to all the FrDetector structures. page 26 of 41"},
            {"nStatType", "INT_4U", "Number of static data block types in the file. Each is identified by a unique name If nStat == 232-1, then “no data available in FrTOC” For each FrStatData:"},
            {"nameStat", "STRING", "FrStatData name"},
            {"detector", "STRING", "Detector name"},
            {"nStatInstance", "INT_4U", "Number of instance for this FrStatData"},
            {"tStart", "*INT_4U", "Array of GPS integer start times, in seconds (size of nStatInstance)"},
            {"tEnd", "*INT_4U", "Array of GPS integer end times, in seconds (size of nStatInstance)"},
            {"version", "*INT_4U", "Array of version time (size of nStatInstance)"},
            {"positionStat", "*INT_8U", "Array of FrStatData positions from beginning of file (size of nStatInstance) For FrAdcData:"},
            {"nADC", "INT_4U", "Number of unique FrAdcData names in file. If nADC == 232-1, then “no data available in FrTOC”"},
            {"name", "*STRING", "Array of FrAdcData names (size of nADC)"},
            {"channelID", "*INT_4U", "Array of ADC channel IDs (size of nADC)"},
            {"groupID", "*INT_4U", "Array of ADC group IDs (size of nADC)"},
            {"positionADC", "*INT_8U", "Array of lists of FrAdcData offset positions, in bytes, from beginning of file (size of nFrame*nADC) Ordering of entries:row/column major ordering, i.e., all positions for one ADC appear sequentially. For FrProcData:"},
            {"nProc", "INT_4U", "Number of unique FrProcData names in file. If nProc == 232-1, then “no data available in FrTOC”"},
            {"nameProc", "*STRING", "Array of FrProcData names (size of nProc)"},
            {"positionProc", "*INT_8U", "Array of FrProcData positions, in bytes, from beginning of file (size of nFrame*nProc) For FrSimData:"},
            {"nSim", "INT_4U", "Number of unique FrSimData names in file. If nSim == 232-1, then “no data available in FrTOC”"},
            {"nameSim", "*STRING", "Array of FrSimData names (size of nSim)"},
            {"positionSim", "*INT_8U", "Array of FrSimData positions, in bytes, from beginning of file (size of nFrame*nSim) For FrSerData:"},
            {"nSer", "INT_4U", "Number of unique FrSerData names in file. If nSer == 232-1, then “no data available in FrTOC”"},
            {"nameSer", "*STRING", "Array of FrSerData names (size of nSer)"},
            {"positionSer", "*INT_8U", "Array of FrSerData positions, in bytes, from beginning of file (size of nFrame*nSer) For FrSummary:"},
            {"nSummary", "INT_4U", "Number of unique FrSummary names in file. If nSummary == 232-1, then “no data available in FrTOC”"},
            {"nameSum", "*STRING", "Array of FrSummary names (size of nSummary) page 27 of 41"},
            {"positionSum", "*INT_8U", "Array of FrSummary positions, in bytes, from beginning of file (size of nFrame*nSummary) For FrEvent:"},
            {"nEventType", "INT_4U", "Number of type of FrEvent in the file"},
            {"nameEvent", "*STRING", "Array of FrEvent names (size of nEventType) They appear alphabetically."},
            {"nEvent", "*INT_4U", "Number of FrEvent for each type of FrEvent (size of nEventType) If nEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"GTimeSEvent", "*INT_4U", "GPS time in integer seconds (size of nEvent[0]+nEvent[1]+…+nEvent[nEventType])"},
            {"GTimeNEvent", "*INT_4U", "Residual GPS time in integer nanoseconds (same size as GTimeSEvent )"},
            {"amplitudeEvent", "*REAL_4", "Event amplitude (same size as GTimeSEvent)"},
            {"positionEvent", "*INT_8U", "Array of FrEvent positions, in bytes, from beginning of file (same size as GTimeSEvent ) For FrSimEvent:"},
            {"nSimEventType", "INT_4U", "Number of type of FrSimEvent in the file"},
            {"nameSimEvent", "*STRING", "Array of FrSimEvent names (size of nSimEventType) They appear alphabetically."},
            {"nSimEvent", "*INT_4U", "Number of FrSimEvent for each type of FrSimEvent (size of nSimEventType) If nSimEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"GTimeSSim", "*INT_4U", "GPS time in integer seconds (size of nSimEvent[0]+nSimEvent[1]+…+nSimEvent[nSimEventType] )"},
            {"GTimeNSim", "*INT_4U", "Residual GPS time in integer nanoseconds (same size as GtimeSSim)"},
            {"amplitudeSimEvent", "*REAL_4", "Event amplitude (same size as GTimeSSim)"},
            {"positionSimEvent", "*INT_8U", "Array of FrSimEvent positions, in bytes, from beginning of file (same size as GtimeSSim ) Index entries of a table of contents are ordered alphabetically by channel names. This ordering is determined by the byte value of the corresponding ASCII character set with 1st byte being the most significant (rules of the strcmp C function). This is a case sensitive order. Frames, FrEvent and FrSimEvent are ordered according their time in the TOC even if they are not ordered in the file. page 28 of 41"},
        }
    };
    // FrTable
    defs[7]["FrTable"] = {
        "FrTable",
        "",
        {
            {"name", "STRING", "Name of this table -- not required to be unique within a frame."},
            {"comment", "STRING", "Comment"},
            {"nColumn", "INT_2U", "Number of columns in table"},
            {"nRow", "INT_4U", "Number of rows in table. The frame API must ensure that all columns have this length."},
            {"columnName", "STRING[nColumn]", "Names of the columns. The frame API must then copy these names into each FrVect structure included in this FrTable"},
            {"column", "PTR_STRUCT(FrVect *)", "First column of table (may be names of rows)"},
            {"next", "PTR_STRUCT(FrTable *)", "Next table in linked list page 25 of 41"},
        }
    };
    // FrVect
    defs[7]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name -- not required to be unique"},
            {"compress", "INT_2U", "Compression algorithm number25"},
            {"type", "INT_2U", "Vector class26"},
            {"nData", "INT_8U", "Number of sample elements in data series"},
            {"nBytes", "INT_8U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "INT_8U[nDim]", "dimension lengths"},
            {"dx", "REAL_8[nDim]", "sample spacing along each coordinate;"},
            {"startX", "REAL_8[nDim]", "Origin for each data set"},
            {"unitX", "STRING[nDim]", "scale factors in ASCII; “unit per step size along each coordinate”. If dimensionless, then unitX == <NONE>, in CAPITALS (without <...>)."},
            {"unitY", "STRING", "String describing how to interpret the value of each element. If dimensionless, then unitY == <NONE>, in CAPITALS (without <...>)."},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data. For multi-dimensional arrays, elements are stored by rows following the C convention. 25 See APPENDIX B 26 See APPENDIX C. 27 See APPENDIX C. page 29 of 41"},
        }
    };
    // FrameH
    defs[7]["FrameH"] = {
        "FrameH",
        "",
        {
            {"name", "STRING", "Name of project or other experiment description (e.g., GEO; LIGO; VIRGO; TAMA;...)"},
            {"run", "INT_4S", "Run number (number < 0 reserved for simulated data); monotonic for experimental runs."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run, re-starting from 0 with each new run."},
            {"dataQuality", "INT_4U", "A logical 32-bit word to denote top level quality of data. Lowest order bits are reserved in pairs for the various GW detectors 6"},
            {"GTimeS", "INT_4U", "Frame start time in GPS Seconds7."},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"ULeapS", "INT_2U", "The integer number of leap seconds between GPS/TAI and UTC in the epoch when the frame is written: ULeapS = Int[TAI - UTC]. e.g., ULeapS was 32 at end of 1999/07"},
            {"dt", "REAL_8", "Frame length in seconds"},
            {"type", "PTR_STRUCT(FrVect *)", "Identifier for array used to store general info like the event type. This is a reserved parameter: the description is presently not specified."},
            {"user", "PTR_STRUCT(FrVect *)", "Identifier for array for user-provided information. Use is generic."},
            {"detectSim", "PTR_STRUCT(FrDetector *)", "Identifier for array storing model or simulation parameter data definition"},
            {"detectProc", "PTR_STRUCT(FrDetector *)", "Identifier for detector-derived data. It is used to capture detector information for both raw and post-processed data."},
            {"history", "PTR_STRUCT(FrHistory *)", "Identifier for first history of post-processing with which frame may have been generated."},
            {"rawData", "PTR_STRUCT(FrRawData *)", "Identifier for the raw data structure"},
            {"procData", "PTR_STRUCT(FrProcData *)", "Identifier for the first post-processed data"},
            {"simData", "PTR_STRUCT(FrSimData *)", "Identifier for the first simulated data buffers"},
            {"event", "PTR_STRUCT(FrEvent *)", "Identifier for the first event structure"},
            {"simEvent", "PTR_STRUCT(FrSimEvent *)", "Identifier for the first simulated event data structure"},
            {"summaryData", "PTR_STRUCT(FrSummary *)", "Identifier for the first statistical summary data"},
            {"auxData", "PTR_STRUCT(FrVect *)", "Identifier for the first auxiliary data"},
            {"auxTable", "PTR_STRUCT(FrTable *)", "Identifier for the first auxiliary table data 6 See APPENDIX A for bit assignments. 7 GPS time in integer seconds since the GPS standard epoch. This is valid for 143 years. page 13 of 41"},
        }
    };
}

// Definitions for Version 8
static void addDefinitionsV8(DefinitionMap& defs) {
    // FrAdcData
    defs[8]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name -- must be unique with the frame"},
            {"comment", "STRING", "Comment"},
            {"channelGroup", "INT_4U", "Channel grouping number containing ADC10"},
            {"channelNumber", "INT_4U", "Channel number1"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Units @ ADC_counts = 0)"},
            {"slope", "REAL_4", "ADC calibration: input units/ct"},
            {"units", "STRING", "ADC calibration: input units for slope. If dimensionless, then units == <NONE>, in CAPITALS (without <...>)."},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length11"},
            {"fShift", "REAL_8", "fShift is the frequency (in Hz) in the original data that corresponds to 0 Hz in the heterodyned series.12"},
            {"phase", "REAL_4", "Phase (in radian) of heterodyning signal at start of dataset1"},
            {"dataValid", "INT_2U", "Data valid flag: dataValid = 0 -> ADC data valid; dataValid!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of sampled data."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is generic."},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1 9 Whenever physical units are used, these shall be given as combinations of SI units; ADC counts shall be denoted ‘ct’. 10 These two variables are determined by site and must be unique over all detectors 11 Time offsets always added together (to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset . Note that all quantities are ALWAYS positive. 12 In the heterodyning process the real time series is multiplied by cos[2fShift(t-t 0)+phase] to get the real part and by –sin[2fShift(t-t 0)+phase] (note the minus sign) to get the imaginary part of the resulting complex time series. The time origin t is the beginning of the frame 0 page 14 of 42"},
        }
    };
    // FrDetector
    defs[8]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name as described in APPENDIX D. (e.g., Virgo; GEO_600; TAMA_300; LHO_2k; LLO_4k; CIT_40; simulated pseudo data - model version etc.)"},
            {"prefix", "CHAR[2]", "Channel prefix for this detector as described in APPENDIX D.."},
            {"longitude", "REAL_8", "Detector vertex longitude, geographical coordinates: radians; Value> 0 => E of Greenwich (-<Longitude <= +)"},
            {"latitude", "REAL_8", "Detector vertex latitude, geographical coordinates: radians; Value > 0 => N of Equator (<Latitude <= +)"},
            {"elevation", "REAL_4", "Vertex elevation, meters, relative to WGS84 ellipsoid."},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians East of North (0<= ArmXazimuth < 2)"},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians East of North (0<= ArmYazimuth < 2)"},
            {"armXaltitude", "REAL_4", "Altitude (pitch) angle of X arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) < ArmXaltitude <= +."},
            {"armYaltitude", "REAL_4", "Altitude (pitch) angle of Y arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) < ArmYaltitude <= +."},
            {"armXmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the X cavity (meters) (should be zero for bars)"},
            {"armYmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the Y cavity (meters) (should be zero for bars)"},
            {"localTime", "INT_4S", "Local seasonal time – UTC in seconds. If localTime%1800 != 0 then localTime is undefined."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure for additional detector data.."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for user-provided (presently undefined) table structure for additional detector data. Column 1: String containing QA word definitions; Column 2: Value of QA words 0 = “Data QA not evaluated for these data”. 1 = “Data should not be used for source searches”, i.e. BAD data. 2 = “Data not ‘perfect’, but suitable for long time stretch searches”. 3 = “Data ‘perfect’ – suitable for burst searches”."},
            {"next", "PTR_STRUCT(FrDetector *)", "Identifier for next detector structure in the linked list"},
            {"chkSum", "INT_4U", "Structure checksum1"},
        }
    };
    // FrEndOfFile
    defs[8]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_8U", "Total number of bytes in this file (0 if NOT computed)"},
            {"seekTOC", "INT_8U", "Bytes to back up from the end of file to the beginning of the table of contents structure. If seekTOC == 0, then there is no TOC for this file."},
            {"chkSumFrHeader", "INT_4U", "FrHeader checksum14"},
            {"chkSum", "INT_4U", "Structure checksum1 Notice that the chkSum AND chkSumFile variables are not included in the computation of chkSum, but chkSumFrHeader is included."},
            {"chkSumFile", "INT_4U", "File checksum. 15 The CRC should be POSIX.2 checksum as referred to in section 4.9 of P1003.2/D11.2, (for example: http://ftp.optiva.ee/pub/misc/posix_drafts/p1003.2/d11.2/4.9)."},
        }
    };
    // FrEndOfFrame
    defs[8]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4S", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header frame number datum"},
            {"GTimeS", "INT_4U", "Frame start time in GPS Seconds"},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds. Structure checksum1"},
            {"chkSum", "INT_4U", " 14 This checksum is calculated over the contents of the file header (FrHeader). The checksum type is the same as the file checksum specified in FrHeader. Whenever this checksum is not calculated, the default value is 0. 15 This checksum is calculated over the contents of each file, starting with the file header (FrHeader) and ending with the FrEndOfFile structure, including the chkSum variable but excluding the chkSumFile variable. The checksum type is specified in FrHeader. Whenever a file checksum is not calculated (see FrHeader), the default value is chkSum =0. page 16 of 42"},
        }
    };
    // FrHistory
    defs[8]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record. Note: when an FrHistory is linked to an FrProcData, its name variable must be the FrProcData channel name"},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch.1"},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1"},
        }
    };
    // FrMsg
    defs[8]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined); default = 0."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to this FrMsg"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1 page 18 of 42"},
        }
    };
    // FrProcData
    defs[8]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment"},
            {"type", "INT_2U", "Type of data object: 0 Unknown/user defined; 1 Time Series; 2 Frequency series; 3 Other 1D Series data; 4 Time-Frequency; 5 Wavelets; 6 Multi-dimensional"},
            {"subType", "INT_2U", "Subtype for f-Series (TBD for other types) 0 Unknown/user defined; 1 DFT; 2 Amplitude Spectral Density; 3 Power spectral density; 4 Cross spectral density; 5 Coherence; 6 Transfer function"},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length. 16"},
            {"tRange", "REAL_8", "Duration of sampled data (tStop-tStart)17"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.1,1,18 In multidimensional objects this applies to the first frequency dimension"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset (radians, 0 if unknown)1"},
            {"fRange", "REAL_8", "Frequency range (=fMax-fMin, 0 if unknown)1"},
            {"BW", "REAL_8", "Resolution bandwidth (Sum{w[i]2}/N where w[i] is the i{th} window coefficient (0 if unknown)"},
            {"nAuxParam", "INT_2U", "Number of auxiliary parameters"},
            {"auxParam", "REAL_8[nAuxParam]", "Array of auxiliary parameters (size of nAuxParam)."},
            {"auxParamNames", "STRING[nAuxParam]", "Array of auxiliary parameter names (size of nAuxParam). 19"},
            {"data", "PTR_STRUCT(FrVect *)", "Data vector. The data vector for single dimensional types (t-Series and f- Series) must have a singe dimension."},
            {"aux", "PTR_STRUCT(FrVect *)", "Auxiliary data; use is generic."},
            {"table", "PTR_STRUCT(FrTable *)", "Parameter table 16 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS. If FrVect contains a t-series, then time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffsetS + startX[0]. Note that all quantities are ALWAYS positive. 17 tRange, fShift, fRange are redundant with the axis information in the data Vector in some cases. If a redundancy exists, the data must be identical to that in the FrVect for the earliest time and/or lowest frequency dimension (e.g. for a t-Series tRange = dx[0]*nx[0]). If a discrepancy exists then the FrVect values take precedence 18 If FrVect contains a f-series then the frequency offsets fShift and startX[0] are added together to obtain the frequency in the original data, original_frequency_of_1st_sample = fShift + startX[0], while startX[0] gives the offset in frequency in the heterodyned data of the 1st sample 19 auxParamNames may contain only the following ASCII characters: \"a-z\" , \"A-Z\" , \"0-9\" , \"_\" , \"-\" , \":\" , \"#\" , \"$\" , \"@\", and must begin with an ALPHA character (a-z, A-Z). page 19 of 42"},
            {"history", "PTR_STRUCT(FrHistory *)", "Channel history ."},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next FrProcData structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1"},
        }
    };
    // FrRawData
    defs[8]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list."},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list."},
            {"firstTable", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list."},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list."},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures."},
            {"chkSum", "INT_4U", "Structure checksum1"},
        }
    };
    // FrSerData
    defs[8]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch.1"},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_8", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for the user-defined table structure."},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1 page 21 of 42"},
        }
    };
    // FrSimData
    defs[8]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_8", "Simulated data sample rate, samples / s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds). Must be positive and smaller than the frame length. 21"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.1"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset.1"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for array of simulated data."},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for input parameters for simulation."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table data structure."},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1 21 Time offsets always added together (with suitable scaling of timeOffsetN) to obtain decimal time offset: time_of_1st_sample = (GtimeS + GtimeN/109) + timeOffset. Note that all quantities are ALWAYS positive page 22 of 42"},
        }
    };
    // FrSimEvent
    defs[8]["FrSimEvent"] = {
        "FrSimEvent",
        "",
        {
            {"name", "STRING", "Name of event."},
            {"comment", "STRING", "Descriptor of event."},
            {"inputs", "STRING", "Input channels and filter parameters to event process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of event."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to maximum of event."},
            {"timeBefore", "REAL_4", "Signal duration before GTimeS"},
            {"timeAfter", "REAL_4", "Signal duration after GTimeS"},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by event"},
            {"nParam", "INT_2U", "Number of additional event parameters."},
            {"parameters", "REAL_8[nParam]", "Array of additional event parameters (size of nParam)."},
            {"parameterNames", "STRING[nParam]", "Array of parameter names (size of nParam)."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional event results."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional event information."},
            {"next", "PTR_STRUCT(FrSimEvent *)", "Identifier for another event."},
            {"chkSum", "INT_4U", "Structure checksum1 page 23 of 42"},
        }
    };
    // FrStatData
    defs[8]["FrStatData"] = {
        "FrStatData",
        "",
        {
            {"name", "STRING", "Static data name23"},
            {"comment", "STRING", "Comment"},
            {"representation", "STRING", "Type of static data being represented. e.g., calibration, swept sine, pole-zero, FIR or IIR coefficients..."},
            {"timeStart", "INT_4U", "Start time of static data validity, GPS time in integer seconds since GPS standard epoch.1"},
            {"timeEnd", "INT_4U", "End time of static data validity (if unknown, set to 0), GPS time in integer seconds since GPS standard epoch.1"},
            {"version", "INT_4U", "Version number for this static structure. i.e, the counter begins at 0 and is incremented by 1 thereafter. Updated statics for the same time window (e.g., modified calibration data) will be identified by unique version numbers."},
            {"detector", "PTR_STRUCT(FrDetector *)", "Identifier for the detector this static data is associated with."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector of data."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list."},
            {"chkSum", "INT_4U", "Structure checksum1 It is possible for a frame to contain more than one structure requiring different FrStatData structures. For example FrDetector for raw data may require static data associated with instrumental parameters; FrProcData for processed data may require static data associated with the filtering or other analysis parameters; FrSimData for simulated data may require static data to define precisely the input parameters to the simulation. For this reason, there is included in the FrStatData definition a PTR_STRUCT object which provides information on the antecedent detector structure with which any one FrStatData structure is associated. Footnote 1, Table 20, applies to each detector structure separately."},
        }
    };
    // FrSummary
    defs[8]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment."},
            {"test", "STRING", "Statistical test(s) used on raw data GPS time in seconds corresponding for this FrSummary"},
            {"GTimeS", "INT_4U", " GPS time in residual nanoseconds relative to GtimeS"},
            {"GTimeN", "INT_4U", ""},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional summary information."},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary."},
            {"chkSum", "INT_4U", "Structure checksum1"},
        }
    };
    // FrTOC
    defs[8]["FrTOC"] = {
        "FrTOC",
        "",
        {
            {"ULeapS", "INT_2S", "From the first FrameH in the file."},
            {"nFrame", "INT_4U", "Number of frames in this file"},
            {"dataQuality", "INT_4U[nFrame]", "Array of integer QA words from each FrameH (size of nFrame)"},
            {"GTimeS", "INT_4U[nFrame]", "Array of integer GPS frame times (size of nFrame)"},
            {"GTimeN", "INT_4U[nFrame]", "Array of integer GPS residual nanoseconds for the frame (size of nFrame)"},
            {"dt", "REAL_8[nFrame]", "Array of frame durations in seconds (size of nFrame)"},
            {"runs", "INT_4S[nFrame]", "Array of run numbers (size of nFrame)."},
            {"frame", "INT_4U[nFrame]", "Array of frame numbers (size of nFrame)."},
            {"positionH", "INT_8U[nFrame]", "Array of FrameH positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstADC", "INT_8U[nFrame]", "Array of first FrADCData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstSer", "INT_8U[nFrame]", "Array of first FrSerData positions, in bytes, from beginning of file (size of nFrame)."},
            {"nFirstTable", "INT_8U[nFrame]", "Array of first FrTable positions, in bytes, from beginning of file (size of nFrame). frame."},
            {"nFirstMsg", "INT_8U[nFrame]", "Array of first FrMsg positions, in bytes, from beginning of file (size of nFrame)."},
            {"nSH", "INT_4U", "Number of FrSH structures in the file."},
            {"SHid", "INT_2U[nSH]", "Array of FrSH IDs (size of nSH)."},
            {"SHname", "STRING[nSH]", "Array of FrSH names (size of nSH). Number of distinct types of FrDetector in the file.24"},
            {"nDetector", "INT_4U", ""},
            {"nameDetector", "STRING[nDetector]", "Array of FrDetector names (size of nDetector). They appear alphabetically. Array of FrDetector positions from the beginning of file (size of nDetector)."},
            {"positionDetector", "INT_8U[nDetector]", " We capture only the first occurrence for each type of FrDetector.25 24 e.g., a file composed of 10 frames, each of which has data from 3 interferometers contains 30 FrDetector structures grouped into 3 types : nDetector=3. 25 In the large majority of cases, all FrDetector structures corresponding to one detector will be copies of each other and it is sufficient to point to the first one ; this means that files containing multiple frames from the same detector operating in a different mode (e.g., rotations of ALLEGRO) will not have direct access via the FrTOC to all the FrDetector structures. page 26 of 42"},
            {"nStatType", "INT_4U", "Number of static data block types in the file. Each is identified by a unique name If nStat == 232-1, then “no data available in FrTOC”"},
            {"nameStat", "STRING[nStatType]", "Array of FrStatData name (size of nStatType)"},
            {"detector", "STRING[nStatType]", "Array of detector name (size of nStatType)"},
            {"nStatInstance", "INT_4U[nStatType]", "Array of number of instance for each FrStatData (size of nStatType)"},
            {"nTotalStat", "INT_4U", "Summation of nStatInstance array"},
            {"tStart", "INT_4U[nTotalStat]", "Array of GPS integer start times, in seconds (size of nTotalStat)"},
            {"tEnd", "INT_4U[nTotalStat]", "Array of GPS integer end times, in seconds (size of nTotalStat)"},
            {"version", "INT_4U[nTotalStat]", "Array of version time (size of nTotalStat)"},
            {"positionStat", "INT_8U[nTotalStat]", "Array of FrStatData positions from beginning of file (size of nTotalStat) For FrAdcData:"},
            {"nADC", "INT_4U", "Number of unique FrAdcData names in file. If nADC == 232-1, then “no data available in FrTOC”"},
            {"name", "STRING[nADC]", "Array of FrAdcData names (size of nADC)"},
            {"channelID", "INT_4U[nADC]", "Array of ADC channel IDs (size of nADC)"},
            {"groupID", "INT_4U[nADC]", "Array of ADC group IDs (size of nADC)"},
            {"positionADC", "INT_8U[nADC][nFrame]", "Array of lists of FrAdcData offset positions, in bytes, from beginning of file (size of nADC*nFrame) The ordering of entries:row/column follows the C convention. All positions for one ADC appear sequentially."},
            {"nProc", "INT_4U", "Number of unique FrProcData names in file. If nProc == 232-1, then “no data available in FrTOC”"},
            {"nameProc", "STRING[nProc]", "Array of FrProcData names (size of nProc)"},
            {"positionProc", "INT_8U[nProc][nFrame]", "Array of FrProcData positions, in bytes, from beginning of file (size of nProc*nFrame). Ordering of entries:row/column: all positions for one FrProcData appear sequentially."},
            {"nSim", "INT_4U", "Number of unique FrSimData names in file. If nSim == 232-1, then “no data available in FrTOC”"},
            {"nameSim", "STRING[nSim]", "Array of FrSimData names (size of nSim)"},
            {"positionSim", "INT_8U[nSim][nFrame]", "Array of FrSimData positions, in bytes, from beginning of file (size of nSim*nFrame). Ordering of entries:row/column: all positions for one FrSimData appear sequentially."},
            {"nSer", "INT_4U", "Number of unique FrSerData names in file. If nSer == 232-1, then “no data available in FrTOC”"},
            {"nameSer", "STRING[nSer]", "Array of FrSerData names (size of nSer)"},
            {"positionSer", "INT_8U[nSer][nFrame]", "Array of FrSerData positions, in bytes, from beginning of file (size of nSer*nFrame). Ordering of entries:row/column: all positions for one FrSerData appear sequentially."},
            {"nSummary", "INT_4U", "Number of unique FrSummary names in file. If nSummary == 232-1, then “no data available in FrTOC”"},
            {"nameSum", "STRING[nSummary]", "Array of FrSummary names (size of nSummary)"},
            {"positionSum", "INT_8U[nSummary][nFrame]", "Array of FrSummary positions, in bytes, from beginning of file (size of nSummary*nFrame). Ordering of entries:row/column: all positions for one FrSummary appear sequentially."},
            {"nEventType", "INT_4U", "Number of type of FrEvent in the file"},
            {"nameEvent", "STRING[nEventType]", "Array of FrEvent names (size of nEventType) They appear alphabetically. Number of FrEvent for each type of FrEvent (size of nEventType)"},
            {"nEvent", "INT_4U[nEventType]", " If nEvent[i] == 232-1, then “no data available in FrTOC” Total number of FrEvent: nEvent[0]+nEvent[1]+…+nEvent[nEventType]"},
            {"nTotalEvent", "INT_4U", " (excluding the 232-1 cases)"},
            {"GTimeSEvent", "INT_4U[nTotalEvent]", "GPS time in integer seconds (size of nTotalEvent)"},
            {"GTimeNEvent", "INT_4U[nTotalEvent]", "Residual GPS time in integer nanoseconds (size of nTotalEvent)"},
            {"amplitudeEvent", "REAL_4[nTotalEvent]", "Event amplitude (size of nTotalEvent)"},
            {"positionEvent", "INT_8U[nTotalEvent]", "Array of FrEvent positions, in bytes, from beginning of file (size of nTotalEvent) For FrSimEvent:"},
            {"nSimEventType", "INT_4U", "Number of type of FrSimEvent in the file"},
            {"nameSimEvent", "STRING[nSimEventType]", "Array of FrSimEvent names (size of nSimEventType) They appear alphabetically."},
            {"nSimEvent", "INT_4U[nSimEventType]", "Number of FrSimEvent for each type of FrSimEvent (size of nSimEventType) If nSimEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"nTotalSEvent", "INT_4U", "Total number of FrEvent: nSimEvent[0]+nSimEvent[1]+… +nSimEvent[nSimEventType] (excluding the 232-1 cases)"},
            {"GTimeSSim", "INT_4U[nTotalSEvent]", "GPS time in integer seconds (size of nTotalSEvent )"},
            {"GTimeNSim", "INT_4U[nTotalSEvent]", "Residual GPS time in integer nanoseconds (size of nTotalSEvent)"},
            {"amplitudeSimEvent", "REAL_4[nTotalSEvent]", "Event amplitude (size of nTotalSEvent)"},
            {"positionSimEvent", "INT_8U[nTotalSEvent]", "Array of FrSimEvent positions, in bytes, from beginning of file (size of nTotalSEvent)"},
            {"chkSum", "INT_4U", "Structure checksum1 Index entries of a table of contents are ordered alphabetically by channel names. This ordering is determined by the byte value of the corresponding ASCII character set with 1st byte being the most significant (rules of the strcmp C function). This is a case sensitive order. Frames, FrEvent and FrSimEvent are ordered according their time in the FrTOC even if they are not ordered in the file. page 28 of 42"},
        }
    };
    // FrTable
    defs[8]["FrTable"] = {
        "FrTable",
        "",
        {
            {"name", "STRING", "Name of this table -- not required to be unique within a frame."},
            {"comment", "STRING", "Comment"},
            {"nColumn", "INT_2U", "Number of columns in table"},
            {"nRow", "INT_4U", "Number of rows in table. The frame API must ensure that all columns have this length."},
            {"columnName", "STRING[nColumn]", "Names of the columns. The frame API must then copy these names into each FrVect structure included in this FrTable"},
            {"column", "PTR_STRUCT(FrVect *)", "First column of table (may be names of rows)"},
            {"next", "PTR_STRUCT(FrTable *)", "Next table in linked list"},
            {"chkSum", "INT_4U", "Structure checksum1 page 25 of 42"},
        }
    };
    // FrVect
    defs[8]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name -- not required to be unique"},
            {"compress", "INT_2U", "Compression algorithm number26"},
            {"type", "INT_2U", "Vector class27"},
            {"nData", "INT_8U", "Number of sample elements in data series"},
            {"nBytes", "INT_8U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "INT_8U[nDim]", "dimension lengths sample spacing along each coordinate;"},
            {"dx", "REAL_8[nDim]", ""},
            {"startX", "REAL_8[nDim]", "Origin for each data set"},
            {"unitX", "STRING[nDim]", "scale factors in ASCII; “unit per step size along each coordinate”. If dimensionless, then unitX == <NONE>, in CAPITALS (without <...>)."},
            {"unitY", "STRING", "String describing how to interpret the value of each element. If dimensionless, then unitY == <NONE>, in CAPITALS (without <...>)."},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data."},
            {"chkSum", "INT_4U", "Structure checksum1 For multi-dimensional arrays, elements are stored by rows following the C convention. 26 See APPENDIX B.APPENDIX B. 27 See APPENDIX C.APPENDIX B.. 28 See APPENDIX C.APPENDIX B.. page 29 of 42"},
        }
    };
    // FrameH
    defs[8]["FrameH"] = {
        "FrameH",
        "",
        {
            {"name", "STRING", "Name of project or other experiment description (e.g., GEO; LIGO; VIRGO; TAMA;...)"},
            {"run", "INT_4S", "Run number (number < 0 reserved for simulated data); monotonic for experimental runs."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run, re-starting from 0 with each new run."},
            {"dataQuality", "INT_4U", "A logical 32-bit word to denote top level quality of data. Lowest order bits are reserved in pairs for the various GW detectors 7"},
            {"GTimeS", "INT_4U", "Frame start time in GPS Seconds8."},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"ULeapS", "INT_2U", "The integer number of leap seconds between GPS/TAI and UTC in the epoch when the frame is written: ULeapS = Int[TAI - UTC]. e.g., ULeapS was 32 at end of 1999/07"},
            {"dt", "REAL_8", "Frame length in seconds"},
            {"type", "PTR_STRUCT(FrVect *)", "Identifier for array used to store general info like the event type. This is a reserved parameter: the description is presently not specified."},
            {"user", "PTR_STRUCT(FrVect *)", "Identifier for array for user-provided information. Use is generic."},
            {"detectSim", "PTR_STRUCT(FrDetector *)", "Identifier for array storing model or simulation parameter data definition"},
            {"detectProc", "PTR_STRUCT(FrDetector *)", "Identifier for detector-derived data. It is used to capture detector information for both raw and post-processed data."},
            {"history", "PTR_STRUCT(FrHistory *)", "Identifier for first history of post-processing with which frame may have been generated."},
            {"rawData", "PTR_STRUCT(FrRawData *)", "Identifier for the raw data structure"},
            {"procData", "PTR_STRUCT(FrProcData *)", "Identifier for the first post-processed data"},
            {"simData", "PTR_STRUCT(FrSimData *)", "Identifier for the first simulated data buffers"},
            {"event", "PTR_STRUCT(FrEvent *)", "Identifier for the first event structure"},
            {"simEvent", "PTR_STRUCT(FrSimEvent *)", "Identifier for the first simulated event data structure"},
            {"summaryData", "PTR_STRUCT(FrSummary *)", "Identifier for the first statistical summary data"},
            {"auxData", "PTR_STRUCT(FrVect *)", "Identifier for the first auxiliary data"},
            {"auxTable", "PTR_STRUCT(FrTable *)", "Identifier for the first auxiliary table data"},
            {"chkSum", "INT_4U", "Structure checksum1"},
        }
    };
}

// Definitions for Version 9
static void addDefinitionsV9(DefinitionMap& defs) {
    // FrAdcData
    defs[9]["FrAdcData"] = {
        "FrAdcData",
        "",
        {
            {"name", "STRING", "Channel name -- must be unique with the frame"},
            {"comment", "STRING", "Comment"},
            {"channelGroup", "INT_4U", "Channel grouping number containing ADC9"},
            {"channelNumber", "INT_4U", "Channel number 1 INT 4U nBits Number of bits in A/D output"},
            {"nBits", "INT_4U", "Number of bits in A/D output"},
            {"bias", "REAL_4", "DC bias on channel (Units @ ADC counts = 0)"},
            {"slope", "REAL_4", "ADC calibration: input units/ct"},
            {"units", "STRING", "ADC calibration: input units for slope. If dimensionless, then units == <NONE>, in CAPITALS (without <...>)."},
            {"sampleRate", "REAL_8", "Data acquisition rate, samples/s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length10"},
            {"fShift", "REAL_8", "fShift is the frequency (in Hz) in the original data that corresponds to 0 Hz in the heterodyned series. 11"},
            {"phase", "REAL_4", "Phase (in radian) of heterodyning signal at start of dataset 1"},
            {"dataValid", "INT_2U", "Data valid flag: dataValid = 0 -> ADC data valid; dataValid!= 0 -> ADC data suspect/not valid"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for a single vector of data as sampled from the PTR STRUCT instrument."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for vector for user-provided information; use is PTR STRUCT generic. 12"},
            {"next", "PTR_STRUCT(FrAdcData *)", "Identifier for next ADC structure in the linked list. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrDetector
    defs[9]["FrDetector"] = {
        "FrDetector",
        "",
        {
            {"name", "STRING", "Instrument name as described in Appendix C (e.g., Virgo; GEO 600; TAMA 300; LLO 4k; CIT 40; simulated pseudo data - model version etc.)"},
            {"prefix", "CHAR[2]", "Channel prefix for this detector as described in Appendix C."},
            {"longitude", "REAL_8", "Detector vertex longitude, geographical coordinates: radians; Value> 0 => E of Greenwich (-π<Longitude <= +π)"},
            {"latitude", "REAL_8", "Detector vertex latitude, geographical coordinates: radians; Value > 0 => N of Equator (−π/2 < Latitude <= +π/2)"},
            {"elevation", "REAL_4", "Vertex elevation, meters, relative to WGS84 ellipsoid. 13"},
            {"armXazimuth", "REAL_4", "Orientation of X arm, measured in radians East of North (0<= ArmXazimuth < 2π)"},
            {"armYazimuth", "REAL_4", "Orientation of Y arm, measured in radians East of North 0<= ArmYazimuth < 2π)"},
            {"armXaltitude", "REAL_4", "Altitude (pitch) angle of X arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) −π/2 < ArmXaltitude <= +π/2."},
            {"armYaltitude", "REAL_4", "Altitude (pitch) angle of Y arm, measured in radians above horizon (local tangent to WGS84 ellipsoid) −π/2 < ArmYaltitude <= +π/2."},
            {"armXmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the X cavity (meters) (should be zero for bars)"},
            {"armYmidpoint", "REAL_4", "Distance between the detector vertex and the middle of the Y cavity (meters) (should be zero for bars)"},
            {"dataQualityOffset", "INT_2U", "Bit offset of the low order bit of the data quality mask."},
            {"aux", "PTR_STRUCT(FrVect *)", "Identifier for user-provided (presently undefined) structure PTR STRUCT for additional detector data.."},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for user-provided (presently undefined) table PTR STRUCT structure for additional detector data. a 2-column FrTable. Column 1: String containing QA word definitions; Column 2: Value of QA words FOUR possible values: 0 = “Data QA not evaluated for these data”. 1 = “Data should not be used for source searches”, i.e. BAD data. 2 = “Data not ‘perfect’, but suitable for long time stretch searches”. 3 = “Data ‘perfect’ - suitable for burst searches”."},
            {"next", "PTR_STRUCT(FrDetector *)", "Identifier for next detector structure in the linked list PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6 13Ifelevationiszero,nolocationinformationisprovided 24 of 62"},
        }
    };
    // FrEndOfFile
    defs[9]["FrEndOfFile"] = {
        "FrEndOfFile",
        "",
        {
            {"nFrames", "INT_4U", "Number of frames in this file"},
            {"nBytes", "INT_8U", "Total number of bytes in this file (0 if NOT computed)"},
            {"seekTOC", "INT_8U", "Bytes to back up from the end of file to the beginning of the table of contents structure. If seekTOC == 0, then there is no TOC for this file."},
            {"chkSumTOC", "INT_4U", "FrTOC uniqueness checksum14"},
            {"chkSumFrHeader", "INT_4U", "FrHeader checksum15"},
            {"chkSum", "INT_4U", "Structure checksum Notice that the chkSum AND chkSumFile variables are not included in the computation of chkSum, but chkSumFrHeader is included."},
            {"chkSumFile", "INT_4U", "File checksum.16 The CRC should be POSIX.2 checksum as referred to in section 4.9 of P1003.2/D11.2, (for example: http://ftp.optiva.ee/pub/misc/posix drafts/p1003.2/d11.2/4.9)."},
        }
    };
    // FrEndOfFrame
    defs[9]["FrEndOfFrame"] = {
        "FrEndOfFrame",
        "",
        {
            {"run", "INT_4S", "Run number; same as in Frame Header run number datum."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run; same as in Frame Header frame number datum 14This checksum is calculated from the following fields of the FrTOC structure: nFrame, dt, nADC, name, nProc, name- Proc,nSim,nameSim,nSer,nameSer,nSummary,nameSum,nEventType,nameEvent,nEvent,nTotalEvent,nSimEventType, nameSimEvent, nSimEvent, and nTotalSEvent It is used to determine if a previous table of contents structure can be used to representinformationinthisfile. 15This checksum is calculated over the contents of the file header (FrHeader). The checksum type is the same as the file checksumspecifiedinFrHeader. Wheneverthischecksumisnotcalculated,thedefaultvalueis0. 16This checksum is calculated over the contents of each file, starting with the file header (FrHeader) and ending with the FrEndOfFile structure, including the chkSum variable but excluding the chkSumFile variable. The checksum type is specified inFrHeader. Wheneverafilechecksumisnotcalculated(seeFrHeader),thedefaultvalueischkSum=0. 25 of 62"},
            {"GTimeS", "INT_4U", "Frame start time in GPS Seconds"},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrHistory
    defs[9]["FrHistory"] = {
        "FrHistory",
        "",
        {
            {"name", "STRING", "Name of history record. Note: when an FrHistory is linked to an FrProcData, its name variable must be the FrProcData channel name"},
            {"time", "INT_4U", "Time of post-processing, GPS time in integer seconds since GPS standard epoch."},
            {"comment", "STRING", "Program name and relevant comments needed to define post-processing."},
            {"next", "PTR_STRUCT(FrHistory *)", "Identifier for next history structure in the linked list. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrMsg
    defs[9]["FrMsg"] = {
        "FrMsg",
        "",
        {
            {"alarm", "STRING", "Name of message, error flag or alarm state."},
            {"message", "STRING", "Message body"},
            {"severity", "INT_4U", "Message severity level (To Be Defined); default = 0."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to this FrMsg"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"next", "PTR_STRUCT(FrMsg *)", "Identifier for next message structure in the linked list. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrProcData
    defs[9]["FrProcData"] = {
        "FrProcData",
        "",
        {
            {"name", "STRING", "Data or channel name"},
            {"comment", "STRING", "Comment 27 of 62"},
            {"type", "INT_2U", "Type of data object: 0 - Unknown/user defined 1 - Time Series 2 - Frequency series 3 - Other 1D Series data 4 - Time-Frequency 5 - Wavelets 6 - Multi-dimensional 7 - MIME (Multipurpose Internet Mail Exten- sions)"},
            {"subType", "INT_2U", " • Subtype for f-Series 0 - Unknown/user defined 1 - DFT 2 - Amplitude Spectral Density 3 - Power spectral density 4 - Cross spectral density 5 - Coherence 6 - Transfer function • TBD for other types"},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds) Must be positive and smaller than the frame length.17"},
            {"tRange", "REAL_8", "Duration of sampled data (tStop-tStart)18"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.1,1,19 In multidimensional objects this applies to the first frequency dimension"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset (radians, 0 if unknown)1"},
            {"fRange", "REAL_8", "Frequency range (=fMax-fMin, 0 if unknown)1"},
            {"BW", "REAL_8", "Resolution bandwidth (Sum{w[i]2}/N where w[i] is the i{th} window coefficient (0 if unknown)"},
            {"nAuxParam", "INT_2U", "Number of auxiliary parameters"},
            {"auxParam", "REAL_8[nAuxParam]", "Array of auxiliary parameters (size of nAuxParam)."},
            {"auxParamNames", "STRING[nAuxParam]", "Array of auxiliary parameter names (size of nAuxParam).20 17Timeoffsetsalwaysaddedtogether(withsuitablescalingoftimeOffsetN)toobtaindecimaltimeoffset: time of 1st sample =(GtimeS+GtimeN/109)+timeOffsetS.IfFrVectcontainsat-series,thentime of 1st sample=(GtimeS+GtimeN/109)+ timeOffsetS+startX[0]. NotethatallquantitiesareALWAYSpositive. 18tRange,fShift,fRangeareredundantwiththeaxisinformationinthedataVectorinsomecases. Ifaredundancyexists,the datamustbeidenticaltothatintheFrVectfortheearliesttimeand/orlowestfrequencydimension(e.g. forat-SeriestRange =dx[0]*nx[0]). IfadiscrepancyexiststhentheFrVectvaluestakeprecedence 19If FrVect contains a f-series then the frequency offsets fShift and startX[0] are added together to obtain the frequency in the original data, original frequency of 1st sample = fShift + startX[0], while startX[0] gives the offset in frequency in the heterodyneddataofthe1stsample 20auxParamNames may contain only the following ASCII characters: ”a-z”, ”A-Z”, ”0-9”, ” ”, ”-”, ”:”, ”#”, ”$”, ”@”, and mustbeginwithanALPHAcharacter(a-z,A-Z). 28 of 62"},
            {"data", "PTR_STRUCT(FrVect *)", "Data vector. PTR STRUCT • The data vector for single dimensional types (t- Series and f-Series) must not be a linked list. • For MIME data, the value of the unitY member will be the MIME type of the data. • TheconcatinationoperationforMIMEdataisde- fined as extending the link list of data elements with the new elements."},
            {"aux", "PTR_STRUCT(FrVect *)", "Auxiliary data; use is generic. PTR STRUCT"},
            {"table", "PTR_STRUCT(FrTable *)", "Parameter table PTR STRUCT"},
            {"history", "PTR_STRUCT(FrHistory *)", "Channel history.21 PTR STRUCT"},
            {"next", "PTR_STRUCT(FrProcData *)", "Identifier for next FrProcData structure in the linked PTR STRUCT list."},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrRawData
    defs[9]["FrRawData"] = {
        "FrRawData",
        "",
        {
            {"name", "STRING", "Name of raw data."},
            {"firstSer", "PTR_STRUCT(FrSerData *)", "Identifier for first serial data structure in the linked list. PTR STRUCT"},
            {"firstAdc", "PTR_STRUCT(FrAdcData *)", "Identifier for first ADC data structure in the linked list. PTR STRUCT"},
            {"firstTable", "PTR_STRUCT(FrTable *)", "Identifier for first table structure in the linked list. PTR STRUCT"},
            {"logMsg", "PTR_STRUCT(FrMsg *)", "Identifier for first error message structure in the linked list. PTR STRUCT"},
            {"more", "PTR_STRUCT(FrVect *)", "Identifier for the additional user-defined data structures. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6 21ThefirstFrHistoryshoulddescribetheprocessingusedtobuildthisFrProcDatachannel. Itsnamevariableshouldbethe FrProcDataname. Ifthechannel(s)usedtoproducethisFrProcDatahavepriorFrHistorystructures,theninordertonotlose thishistory,thesestructuresshouldbecopiedandaddedtotheFrHistorylinkedlist. 29 of 62"},
        }
    };
    // FrSerData
    defs[9]["FrSerData"] = {
        "FrSerData",
        "",
        {
            {"name", "STRING", "Name of station producing serial data stream."},
            {"timeSec", "INT_4U", "Time of data acquisition, GPS time in integer seconds since GPS standard epoch.1"},
            {"timeNsec", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"sampleRate", "REAL_8", "Sample rate, samples / s."},
            {"data", "STRING", "Pointer to string for ASCII-based data."},
            {"serial", "PTR_STRUCT(FrVect *)", "Identifier for serial data vector. PTR STRUCT"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for the user-defined table structure. PTR STRUCT"},
            {"next", "PTR_STRUCT(FrSerData *)", "Identifier for next serial data structure in the linked list. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrSimData
    defs[9]["FrSimData"] = {
        "FrSimData",
        "",
        {
            {"name", "STRING", "Name of simulated data."},
            {"comment", "STRING", "Comment"},
            {"sampleRate", "REAL_8", "Simulated data sample rate, samples / s."},
            {"timeOffset", "REAL_8", "Offset of 1st sample relative to the frame start time (seconds). Must be positive and smaller than the frame length.22"},
            {"fShift", "REAL_8", "fShift is the frequency in the original data that corresponds to 0 Hz in the heterodyned series.1"},
            {"phase", "REAL_4", "Phase of heterodyning signal at start of dataset.1"},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for a single vector of simulated data. PTR STRUCT"},
            {"input", "PTR_STRUCT(FrVect *)", "Identifier for input parameters for simulation. PTR STRUCT"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table data structure. PTR STRUCT 22Timeoffsetsalwaysaddedtogether(withsuitablescalingoftimeOffsetN)toobtaindecimaltimeoffset: time of 1st sample =(GtimeS+GtimeN/109)+timeOffset. NotethatallquantitiesareALWAYSpositive 30 of 62"},
            {"next", "PTR_STRUCT(FrSimData *)", "Identifier for next simulated data structure in the linked list. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrSimEvent
    defs[9]["FrSimEvent"] = {
        "FrSimEvent",
        "",
        {
            {"name", "STRING", "Name of event."},
            {"comment", "STRING", "Descriptor of event."},
            {"inputs", "STRING", "Input channels and filter parameters to event process."},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding to maximum of event."},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GTimeS corresponding to maximum of event."},
            {"timeBefore", "REAL_4", "Signal duration before GTimeS"},
            {"timeAfter", "REAL_4", "Signal duration after GTimeS"},
            {"amplitude", "REAL_4", "Continuous output amplitude returned by event"},
            {"nParam", "INT_2U", "Number of additional event parameters."},
            {"parameters", "REAL_8[nParam]", "Array of additional event parameters (size of nParam)."},
            {"parameterNames", "STRING[nParam]", "Array of parameter names (size of nParam)."},
            {"data", "PTR_STRUCT(FrVect *)", "Identifier for vector containing additional event results. PTR STRUCT"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional event PTR STRUCT information."},
            {"next", "PTR_STRUCT(FrSimEvent *)", "Identifier for another event. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrSummary
    defs[9]["FrSummary"] = {
        "FrSummary",
        "",
        {
            {"name", "STRING", "Name of summary statistic."},
            {"comment", "STRING", "Comment. 31 of 62"},
            {"test", "STRING", "Statistical test(s) used on raw data"},
            {"GTimeS", "INT_4U", "GPS time in seconds corresponding for this FrSummary"},
            {"GTimeN", "INT_4U", "GPS time in residual nanoseconds relative to GtimeS"},
            {"moments", "PTR_STRUCT(FrVect *)", "Identifier for vector containing statistical descriptors PTR STRUCT"},
            {"table", "PTR_STRUCT(FrTable *)", "Identifier for table structure containing additional summary PTR STRUCT information."},
            {"next", "PTR_STRUCT(FrSummary *)", "Identifier for other summary. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrTOC
    defs[9]["FrTOC"] = {
        "FrTOC",
        "",
        {
            {"fileBaseName", "STRING", "The name of the file at the time of creation including its extension but excluding any directory components. (ex: /a/b/c.gwf becomes c.gwf) If there is no corresponding file with the stream, the empty string will be stored."},
            {"nFrame", "INT_4U", "Number of frames in this file"},
            {"dataQuality", "INT_4U[nFrame]", "Array of integer QA words from each FrameH (size of nFrame)"},
            {"GTimeS", "INT_4U[nFrame]", "Array of integer GPS frame times (size of nFrame)"},
            {"GTimeN", "INT_4U[nFrame]", "Array of integer GPS residual nanoseconds for the frame (size of nFrame)"},
            {"dt", "REAL_8[nFrame]", "Array of frame durations in seconds (size of nFrame)"},
            {"positionH", "INT_8U[nFrame]", "Array of FrameH positions, in bytes, from beginning of file (size of nFrame). For FrSH:"},
            {"nSH", "INT_4U", "Number of FrSH structures in the file."},
            {"SHid", "INT_2U[nSH]", "Array of FrSH IDs (size of nSH)."},
            {"SHname", "STRING[nSH]", "Array of FrSH names (size of nSH). For FrDetector:"},
            {"nDetector", "INT_4U", "Number of distinct types of FrDetector in the file.23"},
            {"nameDetector", "STRING[nDetector]", "Array of FrDetector names (size of nDetector). They appear alphabetically."},
            {"positionDetector", "INT_8U[nDetector]", "Array of FrDetector positions from the beginning of file (size of nDetector). We capture only the first occurrence for each type of FrDetector.24 For FrAdcData:"},
            {"nADC", "INT_4U", "Number of unique FrAdcData names in file. If nADC == 232-1, then “no data available in FrTOC”"},
            {"nameAdc", "STRING[nADC]", "Array of FrAdcData names (size of nADC)"},
            {"positionADC", "INT_8U[nADC][nFrame]", ", from beginning of file (size of nADC*nFrame) The ordering of entries:row/column follows the C convention. All positions for one ADC appear sequentially. For FrProcData:"},
            {"nProc", "INT_4U", "Number of unique FrProcData names in file. If nProc == 232-1, then “no data available in FrTOC”"},
            {"nameProc", "STRING[nProc]", "Array of FrProcData names (size of nProc) 23e.g.,afilecomposedof10frames,eachofwhichhasdatafrom3interferometerscontains30FrDetectorstructuresgrouped into3types: nDetector=3. 24In the large majority of cases, all FrDetector structures corresponding to one detector will be copies of each other and it is sufficient to point to the first one ; this means that files containing multiple frames from the same detector operating in a differentmode(e.g.,rotationsofALLEGRO)willnothavedirectaccessviatheFrTOCtoalltheFrDetectorstructures. 33 of 62"},
            {"positionProc", "INT_8U[nProc][nFrame]", "of file (size of nProc*nFrame). Ordering of entries:row/column: all positions for one FrProcData appear sequentially. For FrSimData:"},
            {"nSim", "INT_4U", "Number of unique FrSimData names in file. If nSim == 232-1, then “no data available in FrTOC”"},
            {"nameSim", "STRING[nSim]", "Array of FrSimData names (size of nSim)"},
            {"positionSim", "INT_8U[nSim][nFrame]", "of file (size of nSim*nFrame). Ordering of entries:row/column: all positions for one FrSimData appear sequentially. For FrSerData:"},
            {"nSer", "INT_4U", "Number of unique FrSerData names in file. If nSer == 232-1, then “no data available in FrTOC”"},
            {"nameSer", "STRING[nSer]", "Array of FrSerData names (size of nSer)"},
            {"positionSer", "INT_8U[nSer][nFrame]", "of file (size of nSer*nFrame). Ordering of entries:row/column: all positions for one FrSerData appear sequentially. For FrSummary:"},
            {"nSummary", "INT_4U", "Number of unique FrSummary names in file. If nSummary == 232-1, then “no data available in FrTOC”"},
            {"nameSum", "STRING[nSummary]", "Array of FrSummary names (size of nSummary)"},
            {"positionSum", "INT_8U[nSummary][nFrame]", "of file (size of nFrame*nSummary). Ordering of entries:row/column: all positions for one FrSummary appear sequentially. For FrEvent:"},
            {"nEventType", "INT_4U", "Number of type of FrEvent in the file"},
            {"nameEvent", "STRING[nEventType]", "Array of FrEvent names (size of nEventType) They appear alphabetically."},
            {"nEvent", "INT_4U[nEventType]", "Number of FrEvent for each type of FrEvent (size of nEventType) If nEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"nTotalEvent", "INT_4U", "Total number of FrEvent: nEvent[0]+nEvent[1]+...+nEvent[nEventType] (excluding the 232-1 cases)"},
            {"GTimeSEvent", "INT_4U[nTotalEvent]", "GPS time in integer seconds (size of nTotalEvent)"},
            {"GTimeNEvent", "INT_4U[nTotalEvent]", "Residual GPS time in integer nanoseconds (size of nTotalEvent)"},
            {"amplitudeEvent", "REAL_4[nTotalEvent]", "Event amplitude (size of nTotalEvent)"},
            {"positionEvent", "INT_8U[nTotalEvent]", "Array of FrEvent positions, in bytes, from beginning of file (size of nTotalEvent) For FrSimEvent:"},
            {"nSimEventType", "INT_4U", "Number of type of FrSimEvent in the file 34 of 62"},
            {"nameSimEvent", "STRING[nSimEventType]", "Array of FrSimEvent names (size of nSimEventType) They appear alphabetically."},
            {"nSimEvent", "INT_4U[nSimEventType]", "Number of FrSimEvent for each type of FrSimEvent (size of nSimEventType) If nSimEvent[i] == 232-1, then “no data available in FrTOC”"},
            {"nTotalSEvent", "INT_4U", "Total number of FrEvent: nSimEvent[0]+nSimEvent[1]+...+nSimEvent[nSimEventType] (excluding the 232-1 cases)"},
            {"GTimeSSim", "INT_4U[nTotalSEvent]", "GPS time in integer seconds (size of nTotalSEvent )"},
            {"GTimeNSim", "INT_4U[nTotalSEvent]", "Residual GPS time in integer nanoseconds (size of nTotalSEvent)"},
            {"amplitudeSimEvent", "REAL_4[nTotalSEvent]", "Event amplitude (size of nTotalSEvent)"},
            {"positionSimEvent", "INT_8U[nTotalSEvent]", "Array of FrSimEvent positions, in bytes, from beginning of file (size of nTotalSEvent)"},
            {"chkSum", "INT_4U", "Structure checksum 6 Indexentriesofatableofcontentsareorderedalphabeticallybychannelnames. Thisorderingisdetermined by the byte value of the corresponding ASCII character set with 1st byte being the most significant (rules of the strcmp C function). This is a case sensitive order. Frames,FrEventandFrSimEventareorderedaccordingtheirtimeintheFrTOCeveniftheyarenotordered in the file."},
        }
    };
    // FrTable
    defs[9]["FrTable"] = {
        "FrTable",
        "",
        {
            {"name", "STRING", "Name of this table -- not required to be unique within a frame."},
            {"comment", "STRING", "Comment"},
            {"nColumn", "INT_2U", "Number of columns in table"},
            {"nRow", "INT_4U", "Number of rows in table. The frame API must ensure that all columns have this length."},
            {"columnName", "STRING[nColumn]", "Names of the columns. The frame API must then copy these names into each FrVect structure included in this FrTable"},
            {"column", "PTR_STRUCT(FrVect *)", "First column of table (may be names of rows) PTR STRUCT"},
            {"next", "PTR_STRUCT(FrTable *)", "Next table in linked list PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6"},
        }
    };
    // FrVect
    defs[9]["FrVect"] = {
        "FrVect",
        "",
        {
            {"name", "STRING", "Channel name -- not required to be unique"},
            {"compress", "INT_2U", "Compression algorithm number25"},
            {"type", "INT_2U", "Vector class26"},
            {"nData", "INT_8U", "Number of sample elements in data series"},
            {"nBytes", "INT_8U", "Number of bytes in the compressed vector"},
            {"data", "CHAR[nBytes]", "nData elements of specified class"},
            {"nDim", "INT_4U", "Dimensionality of data vector"},
            {"nx", "INT_8U[nDim]", "dimension lengths"},
            {"dx", "REAL_8[nDim]", "sample spacing along each coordinate; 25SeeAppendixA 26SeeAppendixB 27SeeAppendixA 35 of 62"},
            {"startX", "REAL_8[nDim]", "Origin for each data set"},
            {"unitX", "STRING[nDim]", "scale factors in ASCII; “unit per step size along each coordinate”. If dimensionless, then unitX == <NONE>, in CAPITALS (without <...>)."},
            {"unitY", "STRING", "String describing how to interpret the value of each element. If dimensionless, then unitY == <NONE>, in CAPITALS (without <...>)."},
            {"nDataValid", "INT_8U", "A value of zero indicates no dataValid data is present; a non-zero value indicates dataValid contains data. • nData/nDataValid must be a whole number ≥ 1 • For multidemensional array: – Arrays are stored in row-major order (C array for- mat) – The innermost dimension of the array divided by nData/nDataValid must be a whole number ≥ 1 • Values outside the accepted range will be interpreted as the FrVect being invalid."},
            {"dataValidCompScheme", "INT_2U", "- Compression scheme Scheme"},
            {"nDataValidCompBytes", "INT_8U", "- Number of compressed bytes in dataValid Bytes"},
            {"dataValid", "CHAR[nDataValidCompBytes]", "- • This is an array of dataValid values covering the span of Bytes] the FrVect.data. A value of 0 in the array signifies the correspondingblockofdataisvalid. Anon-zerovaluein the array signifies data as suspect. • Non-zero values: 1 ⇒ invalid 2 ⇒ missing samples 3 ⇒ out of range 255 ⇒ undocumented error"},
            {"next", "PTR_STRUCT(FrVect *)", "Identifier for additional data. PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6 For multi-dimensional arrays, elements are stored by rows following the C convention. 36 of 62"},
        }
    };
    // FrameH
    defs[9]["FrameH"] = {
        "FrameH",
        "",
        {
            {"name", "STRING", "Name of project or other experiment description (e.g., GEO; LIGO; VIRGO; TAMA;...)"},
            {"run", "INT_4S", "Run number (number < 0 reserved for simulated data); monotonic for experimental runs."},
            {"frame", "INT_4U", "Frame number, monotonically increasing until end of run, re-starting from 0 with each new run."},
            {"dataQuality", "INT_4U", "A logical 32-bit word to denote top level quality of data. Lowest order bits are reserved in pairs for the various GW detectors 7"},
            {"GTimeS", "INT_4U", "Frame start time in GPS Seconds 8"},
            {"GTimeN", "INT_4U", "Frame start time residual, integer nanoseconds."},
            {"dt", "REAL_8", "Frame length in seconds"},
            {"type", "PTR_STRUCT(FrVect *)", "Identifier for array used to store general info like the event PTR STRUCT type. This is a reserved parameter: the description is presently not specified."},
            {"user", "PTR_STRUCT(FrVect *)", "Identifier for array for user-provided information. Use is PTR STRUCT generic."},
            {"detectSim", "PTR_STRUCT(FrDetector *)", "Identifier for array storing model or simulation parameter PTR STRUCT data definition"},
            {"detectProc", "PTR_STRUCT(FrDetector *)", "Identifier for detector-derived data. It is used to capture PTR STRUCT detector information for both raw and post-processed data."},
            {"history", "PTR_STRUCT(FrHistory *)", "Identifier for first history of post-processing with which frame PTR STRUCT may have been generated."},
            {"rawData", "PTR_STRUCT(FrRawData *)", "Identifier for the raw data structure PTR STRUCT"},
            {"procData", "PTR_STRUCT(FrProcData *)", "Identifier for the first post-processed data PTR STRUCT"},
            {"simData", "PTR_STRUCT(FrSimData *)", "Identifier for the first simulated data buffers PTR STRUCT"},
            {"event", "PTR_STRUCT(FrEvent *)", "Identifier for the first event structure PTR STRUCT"},
            {"simEvent", "PTR_STRUCT(FrSimEvent *)", "Identifier for the first simulated event data structure PTR STRUCT"},
            {"summaryData", "PTR_STRUCT(FrSummary *)", "Identifier for the first statistical summary data PTR STRUCT"},
            {"auxData", "PTR_STRUCT(FrVect *)", "Identifier for the first auxiliary data PTR STRUCT"},
            {"auxTable", "PTR_STRUCT(FrTable *)", "Identifier for the first auxiliary table data PTR STRUCT"},
            {"chkSum", "INT_4U", "Structure checksum 6 7SeeAppendixCAforbitassignments. 8GPStimeinintegersecondssincetheGPSstandardepoch. Thisisvalidfor143years. 22 of 62"},
        }
    };
}

static DefinitionMap createDefinitions() {
    DefinitionMap defs;

    addDefinitionsV3(defs);
    addDefinitionsV4(defs);
    addDefinitionsV5(defs);
    addDefinitionsV6(defs);
    addDefinitionsV7(defs);
    addDefinitionsV8(defs);
    addDefinitionsV9(defs);

    return defs;
}

const DefinitionMap& getDefinitions() {
    static DefinitionMap defs = createDefinitions();
    return defs;
}

} // namespace PDFDefinitions
} // namespace FrameCPP
