hmi_import_egse_lev0 - ingest pre-launch level-0 data files
[Level Zero]

Collaboration diagram for hmi_import_egse_lev0 - ingest pre-launch level-0 data files:

Defines

#define CONFIG_SERIES
#define DIE(msg)
#define FSN_CAM_ID_FIXED
#define FSN_HSHIEXP_FIXED
#define FSN_TAI_FIXED
#define MAX_KEYMAPS
#define MAX_KEYS
#define NOT_SPECIFIED
#define TABLE_PATH
#define UPDATE_CONFIG_PROG

Variables

ModuleArgs_t module_args []
 Global DRMS-module structure representing the default command-line arguments for a DRMS module.
char * module_name
 Global DRMS-module string providing the name of the module.

Detailed Description

Import ground test level0 FITS files into DRMS.

This program is used only for processing of pre-launch data.

The program copies a lev0 FITS file into a matching DRMS record, setting the DRMS keywords from the FITS file. Additional keywords are written into both the DRMS and FITS headers so the lev0 data can be accessed as a stand-along FITS file or via DRMS segment read calls.

The program can accept either RAL EGSE generated lev0 FITS files or CIF/DCHRI HS-bus lev0 files produced from the telemetry via the SSIM. The CIF or RAL mode is set in the CONFIG command line arg and saved in the keyword CONFIG.

 Outline of this program 
  Init: 
  Get command line flags and args
  Create a new output record into DRMS struct
  Read input lev0 FITS file into DR struct.
    Set some keywords from command line info
  Loop through output keywords
    begin
    Get DRMS name and FITS shortname from rec
    if shortname in input file, use it
       else if shortname in alias list
        if one of aliases in input file, use it
        else set default value in FITS file
    if keyword is prime key T_OBS
    if RAL mode
        Use filename for T_OBS
    else
        look in keyword named in timekey command line arg
        but if not found default to SHS keyword.
    if keyword is prime key FSN
    get FSN from possibly aliased keyword
    if keyword is TELEM_T set telem time value from SHS
    else
    for all other keywords copy value from
    FITS to DRMS if present, if not present
    set FITS value from DRMS default values from JSD.
    if RAL mode then fix the PCU position values.
    End of loop 
  if CIF mode then
    begin
    get test config info from auxillary file
    call external program (set_config_by_time.csh) to update config info in
       an ancillary dataseries.  Pass the FSN and T_OBS to this program.
    Then open the newly made record in the ancillar series and copy
    the configuration keywords into both DRMS and FITS headers.
    set mechanism values via index keywords using tables.
    end of CIF special code
  Save new FITS file with all keywords in segment with original filename
  Close DRMS record 
  Done

Synopsis:
      import_egse_lev0 [-RhrvDRIVER_FLAGS] in=<lev0_FITS_file>] [out=<lev0_DRMS_series>] 
                       [fsn_key=<fsn_keyword>] [time_key=<obs_time_keyword>] 
                       [keymap=<alias_table>] [dsds=<egse_lev0_DSDS_name>]
Flags:
-R: Add 2 to HCAMID if exposure > 0.
-h: Print usage message and quit.
-r: RAL EGSE data expected.
-v: Verbose - noisy.
Driver flags:
DRMS common main program
Parameters:
in Specifies the EGSE produced level0 FITS file. If it was produced by the RAL Camera EGSE the -r flag should also be specified.
out This is the destination dataseries for the level 0 data. For HMI is will be hmi_ground.lev0. It must have both FSN and T_OBS as prime keys and of type DRMS_TYPE_INT and DRMS_TYPE_TIME respectively. No record filter should be specified. The keywords description is used for the shortname that will be used for the FITS keyword name. Thus each keyword must have at least the shortname as the first word in the description in the JSD file. For convenience the keymap entries are also present as comments.
fsn_key The name of the keyword in the input FITS file that should be used for the Filtergram Sequence Number, FSN. The default is FSN for CIF mode and HSQFGSN for RAL mode.
time_key The name of the keyword to be used for the observation time T_OBS target keyword. The default is HOBITSEC. If the time_key defined keyword is not present, then SHS will be used. At least one must be present.
keymap The optional name of an alias file. The alias file should contain one line for each target shortname that may have an alternate in the input lev0 file. Up to 9 aliases may be provided. The first word (white space delimited) on the line is the target. Subsequent words are possible aliases. A maximum of 256 alias lines are allowed.
dsds If present the value of this keyword is stored in the DSDS_SRC keyword to record the source of the input data. It can be a "prog:level:series" name or simply the filename of the input data.

Generated on Fri Mar 24 07:00:34 2017 for JSOC_Documentation by  doxygen 1.5.7.1