IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18920


Ignore:
Timestamp:
Aug 5, 2008, 11:52:02 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.

Location:
trunk/ppSub/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubArguments.c

    r18770 r18920  
    4141        } \
    4242    } \
    43     psMetadataAdd##TYPE(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \
     43    psMetadataAdd##TYPE(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \
    4444}
    4545
     
    5656        } \
    5757    } \
    58     psMetadataAdd##TYPE(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \
     58    psMetadataAdd##TYPE(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \
    5959}
    6060
     
    6868    psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest
    6969    if (value && strlen(value) > 0) {
    70         return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
     70        return psMetadataAddStr(target, PS_LIST_TAIL, mdName, PS_META_REPLACE, NULL, value);
    7171    }
    7272    return false;
     
    9191        }
    9292    }
    93     return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
     93    return psMetadataAddStr(target, PS_LIST_TAIL, mdName, PS_META_REPLACE, NULL, value);
    9494}
    9595
     
    149149    }
    150150
    151     psMetadataAddVector(target, PS_LIST_TAIL, recipeName, 0, NULL, vector);
     151    psMetadataAddVector(target, PS_LIST_TAIL, recipeName, PS_META_REPLACE, NULL, vector);
    152152    psFree(vector);                     // Drop reference
    153153
     
    184184    psMetadataAddS32(arguments, PS_LIST_TAIL, "-size", 0, "Kernel half-size (pixels)", 0);
    185185    psMetadataAddS32(arguments, PS_LIST_TAIL, "-order", 0, "Spatial polynomial order", -1);
    186     psMetadataAddStr(arguments, PS_LIST_TAIL, "-type", 0, "Kernel type (ISIS|POIS|SPAM|FRIES|GUNK|RINGS)", NULL);
     186    psMetadataAddStr(arguments, PS_LIST_TAIL, "-type", 0,
     187                     "Kernel type (ISIS|POIS|SPAM|FRIES|GUNK|RINGS)", NULL);
    187188    psMetadataAddF32(arguments, PS_LIST_TAIL, "-penalty", 0, "Penalty for wideness", NAN);
    188     psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-widths", 0, "ISIS Gaussian FWHMs (comma-separated)", NULL);
    189     psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-orders", 0, "ISIS polynomial orders (comma-separated)", NULL);
     189    psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-widths", 0,
     190                     "ISIS Gaussian FWHMs (comma-separated)", NULL);
     191    psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-orders", 0,
     192                     "ISIS polynomial orders (comma-separated)", NULL);
    190193    psMetadataAddS32(arguments, PS_LIST_TAIL, "-rings-order", 0, "RINGS polynomial order", -1);
    191194    psMetadataAddS32(arguments, PS_LIST_TAIL, "-inner", 0, "SPAM and FRIES inner radius", -1);
     
    201204    psMetadataAddBool(arguments,  PS_LIST_TAIL, "-reverse", 0, "Reverse sense of subtraction?", false);
    202205    psMetadataAddBool(arguments,  PS_LIST_TAIL, "-generate-mask", 0, "Generate mask if not supplied?", false);
    203     psMetadataAddStr(arguments,  PS_LIST_TAIL, "-stamps", 0, "Stamps filename; file has x,y on each line", NULL);
    204     psMetadataAddBool(arguments, PS_LIST_TAIL, "-opt", 0, "Derive optimum parameters for ISIS kernels?", false);
     206    psMetadataAddStr(arguments,  PS_LIST_TAIL, "-stamps", 0,
     207                     "Stamps filename; file has x,y on each line", NULL);
     208    psMetadataAddBool(arguments, PS_LIST_TAIL, "-opt", 0,
     209                      "Derive optimum parameters for ISIS kernels?", false);
    205210    psMetadataAddF32(arguments, PS_LIST_TAIL, "-opt-min", 0, "Minimum value for optimum kernel search", NAN);
    206211    psMetadataAddF32(arguments, PS_LIST_TAIL, "-opt-max", 0, "Minimum value for optimum kernel search", NAN);
     
    221226    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[3]);
    222227
    223     const char *inMask = psMetadataLookupStr(NULL, config->arguments, "-inmask"); // Name of input mask
     228    const char *inMask = psMetadataLookupStr(NULL, arguments, "-inmask"); // Name of input mask
    224229    if (inMask && strlen(inMask) > 0) {
    225230        fileList("INPUT.MASK", inMask, "Name of the input mask image", config);
    226231    }
    227     const char *inWeight = psMetadataLookupStr(NULL, config->arguments, "-inweight"); // Name of input weight
     232    const char *inWeight = psMetadataLookupStr(NULL, arguments, "-inweight"); // Name of input weight
    228233    if (inWeight && strlen(inWeight) > 0) {
    229234        fileList("INPUT.WEIGHT", inWeight, "Name of the input weight image", config);
    230235    }
    231236
    232     const char *refMask = psMetadataLookupStr(NULL, config->arguments, "-refmask"); // Name of reference mask
     237    const char *refMask = psMetadataLookupStr(NULL, arguments, "-refmask"); // Name of reference mask
    233238    if (refMask && strlen(refMask) > 0) {
    234239        fileList("REF.MASK", refMask, "Name of the reference mask image", config);
    235240    }
    236     const char *refWeight = psMetadataLookupStr(NULL, config->arguments, "-refweight"); // Name of ref weight
     241    const char *refWeight = psMetadataLookupStr(NULL, arguments, "-refweight"); // Name of ref weight
    237242    if (refWeight && strlen(refWeight) > 0) {
    238243        fileList("REF.WEIGHT", refWeight, "Name of the reference weight image", config);
    239244    }
    240245
    241     if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) {
    242         psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, "Perform photometry?", true);
     246    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     247    if (!recipe) {
     248        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
     249        return false;
     250    }
     251
     252    if (psMetadataLookupBool(NULL, arguments, "-photometry")) {
     253        psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, "Perform photometry?", true);
    243254    }
    244255
     
    250261    assert(config);
    251262
    252     valueArgStr(config->arguments, "-stats",  "STATS",  config->arguments);
    253     valueArgStr(config->arguments, "-stamps", "STAMPS", config->arguments);
     263    psMetadata *arguments = config->arguments; // Command-line arguments
     264
     265    valueArgStr(arguments, "-stats",  "STATS",  arguments);
     266    valueArgStr(arguments, "-stamps", "STAMPS", arguments);
    254267
    255268    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     
    273286    VALUE_ARG_RECIPE_FLOAT("-penalty",    "PENALTY",         F32);
    274287
    275     valueArgRecipeStr(config->arguments, recipe, "-mask-bad",   "MASK.BAD",   config->arguments);
    276     valueArgRecipeStr(config->arguments, recipe, "-mask-blank", "MASK.BLANK", config->arguments);
    277 
    278     vectorArgRecipe(config->arguments, "-isis-widths", recipe, "ISIS.WIDTHS", config->arguments, PS_TYPE_F32);
    279     vectorArgRecipe(config->arguments, "-isis-orders", recipe, "ISIS.ORDERS", config->arguments, PS_TYPE_S32);
    280 
    281     psVector *widths = psMetadataLookupPtr(NULL, config->arguments, "ISIS.WIDTHS"); // ISIS Gaussian widths
    282     psVector *orders = psMetadataLookupPtr(NULL, config->arguments, "ISIS.ORDERS"); // ISIS Polynomial orders
     288    valueArgRecipeStr(arguments, recipe, "-mask-bad",   "MASK.BAD",   recipe);
     289    valueArgRecipeStr(arguments, recipe, "-mask-blank", "MASK.BLANK", recipe);
     290
     291    vectorArgRecipe(arguments, "-isis-widths", recipe, "ISIS.WIDTHS", recipe, PS_TYPE_F32);
     292    vectorArgRecipe(arguments, "-isis-orders", recipe, "ISIS.ORDERS", recipe, PS_TYPE_S32);
     293
     294    psVector *widths = psMetadataLookupPtr(NULL, recipe, "ISIS.WIDTHS"); // ISIS Gaussian widths
     295    psVector *orders = psMetadataLookupPtr(NULL, recipe, "ISIS.ORDERS"); // ISIS Polynomial orders
    283296    if (widths->n != orders->n) {
    284297        psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Size of vectors for ISIS widths and orders do not match.");
     
    286299    }
    287300
    288     if (psMetadataLookupBool(NULL, config->arguments, "-opt") ||
    289         psMetadataLookupBool(NULL, recipe, "OPTIMUM")) {
    290         psMetadataAddBool(config->arguments, PS_LIST_TAIL, "OPTIMUM", 0,
     301    if (psMetadataLookupBool(NULL, arguments, "-opt") || psMetadataLookupBool(NULL, recipe, "OPTIMUM")) {
     302        psMetadataAddBool(recipe, PS_LIST_TAIL, "OPTIMUM", PS_META_REPLACE,
    291303                          "Derive optimum parameters for ISIS kernels?", true);
    292304        VALUE_ARG_RECIPE_FLOAT("-opt-min", "OPTIMUM.MIN",   F32);
     
    297309    }
    298310
    299     psMetadataAddBool(config->arguments, PS_LIST_TAIL, "REVERSE", 0, "Reverse sense of subtraction",
    300                       psMetadataLookupBool(NULL, config->arguments, "-reverse"));
    301     psMetadataAddBool(config->arguments, PS_LIST_TAIL, "MASK.GENERATE", 0, "Generate mask if not supplied",
    302                       psMetadataLookupBool(NULL, config->arguments, "-generate-mask"));
    303     psMetadataAddBool(config->arguments, PS_LIST_TAIL, "DUAL", 0, "Dual convolution?",
    304                       psMetadataLookupBool(NULL, config->arguments, "-dual"));
    305 
    306     if (psMetadataLookupBool(NULL, config->arguments, "-renorm") ||
     311    psMetadataAddBool(arguments, PS_LIST_TAIL, "REVERSE", 0, "Reverse sense of subtraction",
     312                      psMetadataLookupBool(NULL, arguments, "-reverse"));
     313    psMetadataAddBool(recipe, PS_LIST_TAIL, "MASK.GENERATE", PS_META_REPLACE, "Generate mask if not supplied",
     314                      psMetadataLookupBool(NULL, arguments, "-generate-mask"));
     315    psMetadataAddBool(recipe, PS_LIST_TAIL, "DUAL", PS_META_REPLACE, "Dual convolution?",
     316                      psMetadataLookupBool(NULL, arguments, "-dual"));
     317
     318    if (psMetadataLookupBool(NULL, arguments, "-renorm") ||
    307319        psMetadataLookupBool(NULL, recipe, "RENORM")) {
    308         psMetadataAddBool(config->arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise weights?", true);
     320        psMetadataAddBool(recipe, PS_LIST_TAIL, "RENORM", PS_META_REPLACE, "Renormalise weights?", true);
    309321        VALUE_ARG_RECIPE_INT("-renorm-width", "RENORM.WIDTH", S32, 0);
    310322    }
    311323
    312     if (psMetadataLookupBool(NULL, config->arguments, "-photometry") ||
    313         psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
    314         psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE,
    315                           "Perform photometry?", true);
     324    // Need to update this because it could have been overwritten by the camera's own recipe
     325    if (psMetadataLookupBool(NULL, arguments, "-photometry")) {
     326        psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, "Perform photometry?", true);
    316327    }
    317328
    318329    // Translate the kernel type
    319     psString type = psMetadataLookupStr(NULL, config->arguments, "-type"); // Name of kernel type
     330    psString type = psMetadataLookupStr(NULL, arguments, "-type"); // Name of kernel type
    320331    if (!type || strlen(type) == 0) {
    321332        type = psMetadataLookupStr(NULL, recipe, "KERNEL.TYPE");
     
    325336        }
    326337    }
    327     pmSubtractionKernelsType kernelType = pmSubtractionKernelsTypeFromString(type); // Type of kernel
    328     if (kernelType == PM_SUBTRACTION_KERNEL_NONE) {
    329         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised kernel type: %s", type);
    330         goto ERROR;
    331     }
    332     psMetadataAddS32(config->arguments, PS_LIST_TAIL, "KERNEL.TYPE", 0, "Type of kernel", kernelType);
     338    psMetadataAddStr(recipe, PS_LIST_TAIL, "KERNEL.TYPE", PS_META_REPLACE, "Type of kernel", type);
    333339
    334340    psTrace("ppSub", 1, "Done reading command-line arguments\n");
     341
     342    // Dump configuration, now that's it's settled
     343    {
     344        pmConfigCamerasCull(config);
     345        pmConfigRecipesCull(config, "PPSUB,PPSTATS,PSPHOT,MASKS");
     346
     347        const char *outroot = psMetadataLookupStr(NULL, arguments, "OUTPUT"); // Output root name
     348        psAssert(outroot, "Should be there, we put it there!");
     349
     350        pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PPSUB.INPUT"); // Input file
     351        pmConfigDump(config, input->fpa, outroot);
     352    }
     353
    335354    return true;
    336355
  • trunk/ppSub/src/ppSubCamera.c

    r18653 r18920  
    143143
    144144    // psPhot input
    145     if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY") ||
    146         psMetadataLookupBool(NULL, recipe, "PHOTOMETRY") ) {
    147         psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, "Perform photometry?", true);
     145    if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
    148146        psphotModelClassInit ();        // load implementation-specific models
    149147        pmFPAfile *psphot = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT");
  • trunk/ppSub/src/ppSubLoop.c

    r18591 r18920  
    5252        psError(PS_ERR_UNEXPECTED_NULL, false, "Can't find output data!\n");
    5353        return false;
    54     }
    55 
    56     bool doPhotom = false;
    57     if (psMetadataLookup(config->arguments, "PSPHOT.PSF")) {
    58         doPhotom = true;
    5954    }
    6055
  • trunk/ppSub/src/ppSubReadout.c

    r18612 r18920  
    5858    PS_ASSERT_IMAGES_SIZE_EQUAL(input, reference, false);
    5959
    60     // Look up appropriate values
     60    // Look up recipe values
     61    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     62    psAssert(recipe, "We checked this earlier, so it should be here.");
     63
     64    const char *typeStr = psMetadataLookupStr(NULL, recipe, "KERNEL.TYPE"); // Kernel type
     65    psAssert(typeStr, "We put it here in ppSubArguments.c");
     66    pmSubtractionKernelsType type = pmSubtractionKernelsTypeFromString(typeStr); // Type of kernel
     67    if (type == PM_SUBTRACTION_KERNEL_NONE) {
     68        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised kernel type: %s", typeStr);
     69        psFree(inConv);
     70        psFree(refConv);
     71        psFree(outRO);
     72        return false;
     73    }
     74
    6175    bool mdok;                          // Status of MD lookup
    62     int size = psMetadataLookupS32(NULL, config->arguments, "KERNEL.SIZE"); // Kernel half-size
    63     int order = psMetadataLookupS32(NULL, config->arguments, "SPATIAL.ORDER"); // Spatial polynomial order
    64     float regionSize = psMetadataLookupF32(NULL, config->arguments, "REGION.SIZE"); // Size of iso-kernel regs
    65     float spacing = psMetadataLookupF32(NULL, config->arguments, "STAMP.SPACING"); // Typical stamp spacing
    66     int footprint = psMetadataLookupS32(NULL, config->arguments, "STAMP.FOOTPRINT"); // Stamp half-size
    67     float threshold = psMetadataLookupF32(NULL, config->arguments, "STAMP.THRESHOLD"); // Threshold for stmps
    68     int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Rejection iterations
    69     float rej = psMetadataLookupF32(NULL, config->arguments, "REJ"); // Rejection threshold
    70     pmSubtractionKernelsType type = psMetadataLookupS32(NULL, config->arguments,
    71                                                         "KERNEL.TYPE"); // Kernel type
     76    int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size
     77    int order = psMetadataLookupS32(NULL, recipe, "SPATIAL.ORDER"); // Spatial polynomial order
     78    float regionSize = psMetadataLookupF32(NULL, recipe, "REGION.SIZE"); // Size of iso-kernel regs
     79    float spacing = psMetadataLookupF32(NULL, recipe, "STAMP.SPACING"); // Typical stamp spacing
     80    int footprint = psMetadataLookupS32(NULL, recipe, "STAMP.FOOTPRINT"); // Stamp half-size
     81    float threshold = psMetadataLookupF32(NULL, recipe, "STAMP.THRESHOLD"); // Threshold for stmps
     82    int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations
     83    float rej = psMetadataLookupF32(NULL, recipe, "REJ"); // Rejection threshold
    7284    bool reverse = psMetadataLookupBool(NULL, config->arguments, "REVERSE"); // Reverse sense of subtraction?
    73     psVector *widths = psMetadataLookupPtr(NULL, config->arguments, "ISIS.WIDTHS"); // ISIS Gaussian widths
    74     psVector *orders = psMetadataLookupPtr(NULL, config->arguments, "ISIS.ORDERS"); // ISIS Polynomial orders
    75     int inner = psMetadataLookupS32(NULL, config->arguments, "INNER"); // Inner radius
    76     int ringsOrder = psMetadataLookupS32(NULL, config->arguments, "RINGS.ORDER"); // RINGS polynomial order
    77     int binning = psMetadataLookupS32(NULL, config->arguments, "SPAM.BINNING"); // Binning for SPAM kernel
    78     float penalty = psMetadataLookupF32(NULL, config->arguments, "PENALTY"); // Penalty for wideness
     85    psVector *widths = psMetadataLookupPtr(NULL, recipe, "ISIS.WIDTHS"); // ISIS Gaussian widths
     86    psVector *orders = psMetadataLookupPtr(NULL, recipe, "ISIS.ORDERS"); // ISIS Polynomial orders
     87    int inner = psMetadataLookupS32(NULL, recipe, "INNER"); // Inner radius
     88    int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order
     89    int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel
     90    float penalty = psMetadataLookupF32(NULL, recipe, "PENALTY"); // Penalty for wideness
    7991    psMaskType maskIn = pmConfigMaskGet("MASK.VALUE", config); // Bits to mask going in to pmSubtractionMatch
    8092    psMaskType maskOut = pmConfigMaskGet("BLANK", config); // Bits to mask after pmSubtractionMatch
    81     float badFrac = psMetadataLookupF32(NULL, config->arguments, "BADFRAC"); // Maximum bad fraction
     93    float badFrac = psMetadataLookupF32(NULL, recipe, "BADFRAC"); // Maximum bad fraction
    8294    const char *stampsName = psMetadataLookupStr(&mdok, config->arguments, "STAMPS"); // Filename for stamps
    8395
    84     bool optimum = psMetadataLookupBool(&mdok, config->arguments, "OPTIMUM"); // Derive optimum parameters?
    85     float optMin = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.MIN"); // Minimum width for search
    86     float optMax = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.MAX"); // Maximum width for search
    87     float optStep = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.STEP"); // Step for search
    88     float optThresh = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.TOL"); // Tolerance for search
    89     int optOrder = psMetadataLookupS32(&mdok, config->arguments, "OPTIMUM.ORDER"); // Order for search
    90     bool dual = psMetadataLookupBool(&mdok, config->arguments, "DUAL"); // Dual convolution?
    91     bool renorm = psMetadataLookupBool(&mdok, config->arguments, "RENORM"); // Renormalise weights?
    92     int renormWidth = psMetadataLookupS32(&mdok, config->arguments, "RENORM.WIDTH"); // Width for renormalise
     96    bool optimum = psMetadataLookupBool(&mdok, recipe, "OPTIMUM"); // Derive optimum parameters?
     97    float optMin = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MIN"); // Minimum width for search
     98    float optMax = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MAX"); // Maximum width for search
     99    float optStep = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.STEP"); // Step for search
     100    float optThresh = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.TOL"); // Tolerance for search
     101    int optOrder = psMetadataLookupS32(&mdok, recipe, "OPTIMUM.ORDER"); // Order for search
     102    bool dual = psMetadataLookupBool(&mdok, recipe, "DUAL"); // Dual convolution?
     103    bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise weights?
     104    int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalise
    93105
    94106    pmSubtractionMode mode = dual ? PM_SUBTRACTION_MODE_DUAL : PM_SUBTRACTION_MODE_UNSURE; // Subtraction mode
     
    97109    int numCols = input->numCols, numRows = input->numRows; // Image dimensions
    98110    if (!inRO->mask) {
    99         if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) {
     111        if (psMetadataLookupBool(NULL, recipe, "MASK.GENERATE")) {
    100112            pmReadoutSetMask(inRO, pmConfigMaskGet("SAT", config), pmConfigMaskGet("BAD", config));
    101113        } else {
     
    105117    }
    106118    if (!refRO->mask) {
    107         if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) {
     119        if (psMetadataLookupBool(NULL, recipe, "MASK.GENERATE")) {
    108120            pmReadoutSetMask(refRO, pmConfigMaskGet("SAT", config), pmConfigMaskGet("BAD", config));
    109121        } else {
     
    220232    // Photometry stage 1: measure the PSF
    221233    pmPSF *psf = NULL;                  // PSF for photometry
    222     if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
     234    if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
    223235        outRO->image = psImageCopy(outRO->image, minuend->image, PS_TYPE_F32);
    224236        if (minuend->weight) {
     
    319331
    320332    // QA: photometry of known sources with measured PSF
    321     if (sourcesRO && psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
     333    if (sourcesRO && psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
    322334        sources = psMetadataLookupPtr(&mdok, sourcesRO->analysis, "PSPHOT.SOURCES");
    323335
     
    374386
    375387    // Photometry stage 2: find and measure sources on the subtracted image
    376     if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
     388    if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
    377389        // The PSF should already be stored for the readout
    378390        pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT");
Note: See TracChangeset for help on using the changeset viewer.