IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2009, 6:15:31 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/psModules

  • branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfig.c

    r23351 r23594  
    806806    pmConfigLoadRecipeOptions(argc, argv, config, "-Df");
    807807    pmConfigLoadRecipeOptions(argc, argv, config, "-Db");
     808
     809    if (!pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CL)) {
     810        psError(PS_ERR_IO, false, "Failed to read recipes from command-line");
     811        psFree(config);
     812        return NULL;
     813    }
    808814
    809815    // Look for command-line options for files to replace
  • branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigCamera.c

    r23351 r23594  
    159159// Don't update these skycell concepts; last one MUST be 0 (i.e., NULL).
    160160const static char *skycellConceptsCell[] = { "CELL.BIASSEC", "CELL.TRIMSEC", "CELL.READDIR", "CELL.XPARITY",
    161                                              "CELL.YPARITY", "CELL.X0", "CELL.Y0", 0 };
     161                                             "CELL.YPARITY", "CELL.X0", "CELL.Y0", "CELL.TIMESYS", 0 };
    162162const static char *skycellConceptsChip[] = { "CHIP.XPARITY", "CHIP.YPARITY", 0 };
    163 const static char *skycellConceptsFPA[] = { 0 };
     163const static char *skycellConceptsFPA[] = { "FPA.TIMESYS" };
    164164
    165165// What do we call the skycell concept in the FITS header?
     
    332332        psMetadataAddS32(defaults, PS_LIST_TAIL, "CHIP.X0", 0, NULL, 0);
    333333        psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.READDIR", 0, "Read direction (rows)", 1);
     334        psMetadataAddStr(defaults, PS_LIST_TAIL, "CELL.TIMESYS", 0, "Time system", "TAI");
     335        psMetadataAddStr(defaults, PS_LIST_TAIL, "FPA.TIMESYS", 0, "Time system", "TAI");
    334336
    335337        psMetadataAddMetadata(format, PS_LIST_TAIL, "DEFAULTS", 0, "Default values for concepts", defaults);
  • branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigMask.c

    r21386 r23594  
    1010
    1111static pmConfigMaskInfo masks[] = {
    12     { "DETECTOR",  NULL,       0x00, true  },   // Something is wrong with the detector
    13     { "DARK",      "DETECTOR", 0x00, true  },   // Pixel doesn't dark-subtract properly
    14     { "FLAT",      "DETECTOR", 0x01, true  },   // Pixel doesn't flat-field properly
    15     { "BLANK",     "DETECTOR", 0x01, true  },   // Pixel doesn't contain valid data
    16     { "RANGE",     NULL,       0x00, true  },   // Pixel is out-of-range of linearity
    17     { "SAT",       "RANGE",    0x01, true  },   // Pixel is saturated
    18     { "BAD",       "RANGE",    0x01, true  },   // Pixel is low
    19     { "BAD.WARP",  NULL,       0x01, true  },   // Pixel is bad after convolution with a bad pixel
    20     { "CR",        NULL,       0x00, true  },   // Pixel contains a cosmic ray
    21     { "GHOST",     NULL,       0x00, true  },   // Pixel contains an optical ghost
    22     { "POOR.WARP", NULL,       0x00, false },   // Pixel is poor after convolution with a bad pixel
    23     // "LOW"  Pixel is low
    24     // "CONV" Pixel is bad after convolution with a bad pixel
     12    // Features of the detector
     13    { "DETECTOR",  NULL,       0x01, true  }, // Something is wrong with the detector
     14    { "FLAT",      "DETECTOR", 0x01, true  }, // Pixel doesn't flat-field properly
     15    { "DARK",      "DETECTOR", 0x01, true  }, // Pixel doesn't dark-subtract properly
     16    { "BLANK",     "DETECTOR", 0x01, true  }, // Pixel doesn't contain valid data
     17    { "CTE",       "DETECTOR", 0x01, true  }, // Pixel has poor CTE
     18    // Invalid signal ranges
     19    { "SAT",       NULL,       0x02, true  }, // Pixel is saturated or non-linear
     20    { "LOW",       "SAT",      0x02, true  }, // Pixel is low
     21    { "SUSPECT",   NULL,       0x04, false }, // Pixel is suspected of being bad
     22    // Non-astronomical structures
     23    { "CR",        NULL,       0x08, true  }, // Pixel contains a cosmic ray
     24    { "SPIKE",     NULL,       0x08, true  }, // Pixel contains a diffraction spike
     25    { "GHOST",     NULL,       0x08, true  }, // Pixel contains an optical ghost
     26    { "STREAK",    NULL,       0x08, true  }, // Pixel contains streak data
     27    { "STARCORE",  NULL,       0x08, true  }, // Pixel contains a bright star core
     28    // Effects of convolution and interpolation
     29    { "CONV.BAD",  NULL,       0x02, true  }, // Pixel is bad after convolution with a bad pixel
     30    { "CONV.POOR", NULL,       0x04, false }, // Pixel is poor after convolution with a bad pixel
    2531};
    2632
  • branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRun.c

    r23351 r23594  
    3939}
    4040
    41 
    42 bool pmConfigRunFileAdd(pmConfig *config, const pmFPAfile *file)
     41// Add a file to a nominated metadata in the RUN information
     42static bool configRunFileAdd(pmConfig *config, // Configuration
     43                             const pmFPAfile *file, // File to add
     44                             const char *target // Name of metadata to which to add
     45                             )
    4346{
    4447    PS_ASSERT_PTR_NON_NULL(config, false);
     
    4750    psMetadata *run = configRun(config);// RUN information
    4851    psAssert(run, "Require run-time information");
    49     psMetadata *files = configElement(run, "FILES", "Filerules used during execution");
     52    psMetadata *files = configElement(run, target, "Filerules used during execution");
    5053    psAssert(files, "Require list of files");
    5154
     
    7174}
    7275
    73 psArray *pmConfigRunFileGet(pmConfig *config, const char *name)
     76bool pmConfigRunFileAddRead(pmConfig *config, const pmFPAfile *file)
    7477{
    7578    PS_ASSERT_PTR_NON_NULL(config, false);
    76     PS_ASSERT_STRING_NON_EMPTY(name, false);
     79    PS_ASSERT_PTR_NON_NULL(file, false);
    7780
     81    return configRunFileAdd(config, file, "FILES.INPUT");
     82}
     83
     84bool pmConfigRunFileAddWrite(pmConfig *config, const pmFPAfile *file)
     85{
     86    PS_ASSERT_PTR_NON_NULL(config, false);
     87    PS_ASSERT_PTR_NON_NULL(file, false);
     88
     89    return configRunFileAdd(config, file, "FILES.OUTPUT");
     90}
     91
     92// Get an array of filenames from the nominated RUN information
     93static psArray *configRunFileGet(pmConfig *config, // Configuration
     94                                 const char *name, // Name of file
     95                                 const char *source // Source metadata for file
     96                                 )
     97{
    7898    psMetadata *run = configRun(config);// RUN information
    7999    psAssert(run, "Require run-time information");
    80     psMetadata *files = configElement(run, "FILES", "Filerules used during execution");
     100    psMetadata *files = configElement(run, source, "Filerules used during execution");
    81101    psAssert(files, "Require list of files");
     102
     103    if (psListLength(files->list) == 0) {
     104        // Can't find anything
     105        return NULL;
     106    }
    82107
    83108    psList *list = psListAlloc(NULL);   // List of file names
     
    104129
    105130    return array;
     131}
     132
     133
     134psArray *pmConfigRunFileGet(pmConfig *config, const char *name)
     135{
     136    PS_ASSERT_PTR_NON_NULL(config, false);
     137    PS_ASSERT_STRING_NON_EMPTY(name, false);
     138
     139    // Try the input and output, in turn
     140    psArray *files = configRunFileGet(config, name, "FILES.INPUT"); // Files from RUN metadata
     141    if (!files) {
     142        configRunFileGet(config, name, "FILES.OUTPUT");
     143    }
     144
     145    return files;
    106146}
    107147
  • branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRun.h

    r23351 r23594  
    66#include <pmFPAfile.h>
    77
    8 /// Add a file to the list of files used in the run-time information
    9 bool pmConfigRunFileAdd(
     8/// Add a file to the list of files read in the run-time information
     9bool pmConfigRunFileAddRead(
     10    pmConfig *config,                   ///< Configuration
     11    const pmFPAfile *file               ///< File to add
     12    );
     13
     14/// Add a file to the list of files written in the run-time information
     15bool pmConfigRunFileAddWrite(
    1016    pmConfig *config,                   ///< Configuration
    1117    const pmFPAfile *file               ///< File to add
Note: See TracChangeset for help on using the changeset viewer.