IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 25, 2010, 7:52:41 PM (16 years ago)
Author:
eugene
Message:

various API updates to work with multiple INPUT files (not yet finished)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psphot.stack.20100120/src/psphotSubtractBackground.c

    r26542 r26681  
    44// generate the median in NxN boxes, clipping heavily
    55// linear interpolation to generate full-scale model
    6 bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index)
     6bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe)
    77{
    88    bool status = true;
     
    2525    pmReadout *model = pmFPAviewThisReadout (view, modelFile->fpa);
    2626    assert (model);
    27 
    28     // select the appropriate recipe information
    29     psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
    30     assert (recipe);
    3127
    3228    // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
     
    114110    // the pmReadout selected in this function are all view on entries in config->files
    115111
     112    // display the backsub and backgnd images
     113    // move this inthe the subtract background loop
     114    psphotVisualShowBackground (config, view, readout);
     115
    116116    npass ++;
    117117    return true;
     
    122122    bool status = false;
    123123
     124    // select the appropriate recipe information
     125    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
     126    psAssert (recipe, "missing recipe?");
     127
    124128    int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
    125129    psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
     
    127131    // loop over the available readouts
    128132    for (int i = 0; i < num; i++) {
    129         if (!psphotSubtractBackgroundReadout (config, view, "PSPHOT.INPUT", i)) {
     133        if (!psphotSubtractBackgroundReadout (config, view, "PSPHOT.INPUT", i, recipe)) {
    130134            psError (PSPHOT_ERR_CONFIG, false, "failed to subtract background for PSPHOT.INPUT entry %d", i);
    131135            return false;
Note: See TracChangeset for help on using the changeset viewer.