IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 16, 2007, 1:46:31 PM (19 years ago)
Author:
eugene
Message:

fixed up basic operations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dvoTools/src/dvoApplyCorrParseCamera.c

    r11804 r11862  
    1010
    1111    // the input image defines the camera, and all recipes and options the follow
    12     // XXX we need to change this: mosaic.fits is not in pmFPA format??
    13     // - determine the camera from the header keywords
    14     pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "DVOCORR.INPUT", "INPUT");
    15     if (!status || !input) {
    16         psError(PS_ERR_IO, false, "Failed to build FPA from DVOCORR.INPUT");
     12    pmFPAfile *input = pmFPAfileDefineFromArgs (NULL, config, "DVOFLAT.INPUT", "INPUT");
     13    if (!input) {
     14        psError(PS_ERR_IO, false, "Failed to build FPA from DVOFLAT.INPUT");
    1715        return NULL;
    1816    }
     
    2523
    2624    // the following files are output targets
    27     pmFPAfile *output = pmFPAfileDefineOutput(config, input->fpa, "DVOCORR.OUTPUT");
     25    pmFPAfile *output = pmFPAfileDefineOutput(config, input->fpa, "DVOFLAT.OUTPUT");
    2826    if (!output) {
    29         psError(PS_ERR_IO, false, _("Unable to generate output file from DVOCORR.OUTPUT"));
     27        psError(PS_ERR_IO, false, _("Unable to generate output file from DVOFLAT.OUTPUT"));
    3028        psFree(options);
    3129        return NULL;
    3230    }
    3331
     32    // find the flat-field correction image (from command-line, config file, or detrend db)
     33    status = false;
     34    pmFPAfileDefineFromArgs  (&status, config, "DVOFLAT.CORR", "CORR");
     35    psErrorClear();
     36    pmFPAfileDefineFromConf  (&status, config, "DVOFLAT.CORR");
     37    psErrorClear();
     38    pmFPAfileDefineFromDetDB (&status, config, "DVOFLAT.CORR", input->fpa, PM_DETREND_TYPE_FLAT_CORRECTION);
     39    if (!status) {
     40        psError (PS_ERR_IO, false, "can't find a flat-field correction image source");
     41        return NULL;
     42    }
     43   
    3444    // Chip selection: turn on only the chips specified (pass status to suppress missing-key log msg)
     45    status = false;
    3546    char *chipLine = psMetadataLookupStr(&status, config->arguments, "CHIP_SELECTIONS");
    3647    psArray *chips = psStringSplitArray (chipLine, ",", false);
Note: See TracChangeset for help on using the changeset viewer.