IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 5, 2008, 11:18:27 AM (18 years ago)
Author:
Paul Price
Message:

Adding configuration dumping. Required reorganisation of how recipe values get into the program. Formerly, the command-line and recipe values were parsed and the result was put on config->arguments. Now, we want whatever was altered by the command-line to be reflected in the recipe (which is dumped), so using the recipe as the storage. Not yet tested, but will do so soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r18591 r18918  
    203203    assert(config);
    204204
     205    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
     206    psAssert(recipe, "We've thrown an error on this before.");
     207
    205208    bool mdok;                          // Status of MD lookup
    206     bool tempDelete = psMetadataLookupBool(&mdok, config->arguments, "TEMP.DELETE"); // Delete temporary files?
    207     const char *tempImage = psMetadataLookupStr(NULL, config->arguments, "TEMP.IMAGE"); // Suffix for temporary images
    208     const char *tempMask = psMetadataLookupStr(NULL, config->arguments, "TEMP.MASK"); // Suffix for temporary masks
    209     const char *tempWeight = psMetadataLookupStr(NULL, config->arguments, "TEMP.WEIGHT"); // Suffix for temporary weight (variance) maps
     209    bool tempDelete = psMetadataLookupBool(&mdok, recipe, "TEMP.DELETE"); // Delete temporary files?
     210    const char *tempImage = psMetadataLookupStr(NULL, recipe, "TEMP.IMAGE"); // Suffix for temporary images
     211    const char *tempMask = psMetadataLookupStr(NULL, recipe, "TEMP.MASK"); // Suffix for temporary masks
     212    const char *tempWeight = psMetadataLookupStr(NULL, recipe, "TEMP.WEIGHT"); // Suffix for temp weight maps
    210213    if (!tempImage || !tempMask || !tempWeight) {
    211         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.WEIGHT");
    212         return false;
    213     }
    214 
    215     float threshold = psMetadataLookupF32(NULL, config->arguments, "THRESHOLD.MASK"); // Threshold for mask deconvolution
    216     float imageRej = psMetadataLookupF32(NULL, config->arguments, "IMAGE.REJ"); // Maximum fraction of image to reject before rejecting entire image
     214        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     215                "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.WEIGHT in recipe");
     216        return false;
     217    }
     218
     219    float threshold = psMetadataLookupF32(NULL, recipe, "THRESHOLD.MASK"); // Threshold for mask deconvolution
     220    float imageRej = psMetadataLookupF32(NULL, recipe, "IMAGE.REJ"); // Maximum fraction of image to reject
     221                                                                     // before rejecting entire image
    217222
    218223    const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics
     
    238243    }
    239244    int num = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs
    240     int numScans = psMetadataLookupS32(NULL, config->arguments, "ROWS"); // Number of scans to read at once
     245    int numScans = psMetadataLookupS32(NULL, recipe, "ROWS"); // Number of scans to read at once
     246
    241247    psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
    242     int overlap = 2 * psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Overlap by kernel size between consecutive scans
     248    int overlap = 2 * psMetadataLookupS32(NULL, ppsub,
     249                                          "KERNEL.SIZE"); // Overlap by kernel size between consecutive scans
    243250
    244251    if (!pmConfigMaskSetBits(NULL, NULL, config)) {
     
    770777        memDump("final");
    771778
    772         if (psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY")) {
     779        if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) {
    773780
    774781            fileActivation(config, combineFiles, false);
Note: See TracChangeset for help on using the changeset viewer.