IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2014, 4:06:26 PM (12 years ago)
Author:
eugene
Message:

add Koppenhoefer correction to psastro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140423/psastro/src/psastroDataLoad.c

    r21409 r36819  
    4242    }
    4343
     44    // apply Koppenhoeffer correction to this exposure?
     45    bool applyKH = psMetadataLookupBool (NULL, recipe, "KH.CORRECT.APPLY.EXP");
     46    if (applyKH) {
     47        // make sure the KH correction file is loaded.  de-activate all files except PSASTRO.KH.CORRECT
     48        pmFPAfileActivate (config->files, false, NULL);
     49        pmFPAfileActivate (config->files, true, "PSASTRO.KH.CORRECT");
     50
     51        pmFPAview *viewKH = pmFPAviewAlloc (0);
     52
     53        // files associated with the science image
     54        if (!pmFPAfileIOChecks (config, viewKH, PM_FPA_BEFORE)) {
     55            psError (PS_ERR_IO, false, "Can't load the Koppenhoeffer Correction file");
     56            return false;
     57        }
     58        psFree (viewKH);
     59    }
     60
    4461    // select the input data sources
    4562    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT");
     
    7390                if (!readout->data_exists) { continue; }
    7491
    75                 if (!psastroConvertReadout (readout, recipe)) ESCAPE;
     92                if (!psastroConvertReadout (config, view, readout, recipe)) ESCAPE;
    7693
    7794                if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
Note: See TracChangeset for help on using the changeset viewer.