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/ppStackMatch.c

    r18591 r18918  
    2727    pmReadout *output = pmReadoutAlloc(NULL); // Output readout, for holding results temporarily
    2828
     29    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
     30    psAssert(recipe, "We've thrown an error on this before.");
     31
    2932    // Look up appropriate values from the ppSub recipe
    30     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
    31     int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size
     33    psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
     34    int size = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size
    3235
    3336    psMaskType maskIn = pmConfigMaskGet("MASK.VALUE", config); // Bits to mask going in to pmSubtractionMatch
     
    3538
    3639    bool mdok;                          // Status of MD lookup
    37     bool renorm = psMetadataLookupBool(&mdok, config->arguments, "RENORM"); // Renormalise variances?
    38     psStatsOptions renormMean = psMetadataLookupS32(&mdok, config->arguments,
    39                                                     "RENORM.MEAN"); // Statistic for mean
    40     psStatsOptions renormStdev = psMetadataLookupS32(&mdok, config->arguments,
    41                                                      "RENORM.STDEV"); // Statistic for stdev
    42     int renormWidth = psMetadataLookupS32(&mdok, config->arguments,
    43                                           "RENORM.WIDTH"); // Width for renormalisation box
    44     float penalty = psMetadataLookupF32(NULL, config->arguments, "PENALTY"); // Penalty for wideness
     40    bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise variances?
     41    psStatsOptions renormMean = psMetadataLookupS32(&mdok, recipe, "RENORM.MEAN"); // Statistic for mean
     42    psStatsOptions renormStdev = psMetadataLookupS32(&mdok, recipe, "RENORM.STDEV"); // Statistic for stdev
     43    int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalisation box
     44    float penalty = psMetadataLookupF32(NULL, ppsub, "PENALTY"); // Penalty for wideness
    4545
    4646    if (!pmReadoutMaskNonfinite(readout, maskIn)) {
     
    5353        assert(sources);
    5454
    55         int order = psMetadataLookupS32(NULL, recipe, "SPATIAL.ORDER"); // Spatial polynomial order
    56         float regionSize = psMetadataLookupF32(NULL, recipe, "REGION.SIZE"); // Size of iso-kernel regs
    57         float spacing = psMetadataLookupF32(NULL, recipe, "STAMP.SPACING"); // Typical stamp spacing
    58         int footprint = psMetadataLookupS32(NULL, recipe, "STAMP.FOOTPRINT"); // Stamp half-size
    59         float threshold = psMetadataLookupF32(NULL, recipe, "STAMP.THRESHOLD"); // Threshold for stmps
    60         int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations
    61         float rej = psMetadataLookupF32(NULL, recipe, "REJ"); // Rejection threshold
     55        int order = psMetadataLookupS32(NULL, ppsub, "SPATIAL.ORDER"); // Spatial polynomial order
     56        float regionSize = psMetadataLookupF32(NULL, ppsub, "REGION.SIZE"); // Size of iso-kernel regs
     57        float spacing = psMetadataLookupF32(NULL, ppsub, "STAMP.SPACING"); // Typical stamp spacing
     58        int footprint = psMetadataLookupS32(NULL, ppsub, "STAMP.FOOTPRINT"); // Stamp half-size
     59        float threshold = psMetadataLookupF32(NULL, ppsub, "STAMP.THRESHOLD"); // Threshold for stmps
     60        int iter = psMetadataLookupS32(NULL, ppsub, "ITER"); // Rejection iterations
     61        float rej = psMetadataLookupF32(NULL, ppsub, "REJ"); // Rejection threshold
    6262        pmSubtractionKernelsType type = pmSubtractionKernelsTypeFromString(
    63             psMetadataLookupStr(NULL, recipe, "KERNEL.TYPE")); // Kernel type
    64         psVector *widths = psMetadataLookupPtr(NULL, recipe, "ISIS.WIDTHS"); // ISIS Gaussian widths
    65         psVector *orders = psMetadataLookupPtr(NULL, recipe, "ISIS.ORDERS"); // ISIS Polynomial orders
    66         int inner = psMetadataLookupS32(NULL, recipe, "INNER"); // Inner radius
    67         int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order
    68         int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel
    69         float badFrac = psMetadataLookupF32(NULL, recipe, "BADFRAC"); // Maximum bad fraction
    70         bool optimum = psMetadataLookupBool(&mdok, recipe, "OPTIMUM"); // Derive optimum parameters?
    71         float optMin = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MIN"); // Minimum width for search
    72         float optMax = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MAX"); // Maximum width for search
    73         float optStep = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.STEP"); // Step for search
    74         float optThresh = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.TOL"); // Tolerance for search
    75         int optOrder = psMetadataLookupS32(&mdok, recipe, "OPTIMUM.ORDER"); // Order for search
     63            psMetadataLookupStr(NULL, ppsub, "KERNEL.TYPE")); // Kernel type
     64        psVector *widths = psMetadataLookupPtr(NULL, ppsub, "ISIS.WIDTHS"); // ISIS Gaussian widths
     65        psVector *orders = psMetadataLookupPtr(NULL, ppsub, "ISIS.ORDERS"); // ISIS Polynomial orders
     66        int inner = psMetadataLookupS32(NULL, ppsub, "INNER"); // Inner radius
     67        int ringsOrder = psMetadataLookupS32(NULL, ppsub, "RINGS.ORDER"); // RINGS polynomial order
     68        int binning = psMetadataLookupS32(NULL, ppsub, "SPAM.BINNING"); // Binning for SPAM kernel
     69        float badFrac = psMetadataLookupF32(NULL, ppsub, "BADFRAC"); // Maximum bad fraction
     70        bool optimum = psMetadataLookupBool(&mdok, ppsub, "OPTIMUM"); // Derive optimum parameters?
     71        float optMin = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.MIN"); // Minimum width for search
     72        float optMax = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.MAX"); // Maximum width for search
     73        float optStep = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.STEP"); // Step for search
     74        float optThresh = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.TOL"); // Tolerance for search
     75        int optOrder = psMetadataLookupS32(&mdok, ppsub, "OPTIMUM.ORDER"); // Order for search
    7676
    7777        // These values are specified specifically for stacking
Note: See TracChangeset for help on using the changeset viewer.