IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2009, 3:16:06 PM (17 years ago)
Author:
Paul Price
Message:

Get input and reference source lists, and merge them to provide a source list for stamps and PSF.

File:
1 edited

Legend:

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

    r21524 r23235  
    4040    pmFPAfile *inputMask = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.MASK", "INPUT.MASK");
    4141    if (!status) {
    42         psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.MASK");
     42        psError(PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.MASK");
    4343        return NULL;
    4444    }
     
    5151    pmFPAfile *inputVariance = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.VARIANCE", "INPUT.VARIANCE");
    5252    if (!status) {
    53         psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.VARIANCE");
     53        psError(PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.VARIANCE");
    5454        return NULL;
    5555    }
    5656    if (inputVariance && inputVariance->type != PM_FPA_FILE_VARIANCE) {
    5757        psError(PS_ERR_IO, true, "PPSUB.INPUT.VARIANCE is not of type VARIANCE");
     58        return false;
     59    }
     60
     61    // Input source list
     62    pmFPAfile *inputSources = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.SOURCES", "INPUT.SOURCES");
     63    if (!status) {
     64        psError(PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.SOURCES");
     65        return NULL;
     66    }
     67    if (inputSources && inputSources->type != PM_FPA_FILE_CMF) {
     68        psError(PS_ERR_IO, true, "PPSUB.INPUT.SOURCES is not of type CMF");
    5869        return false;
    5970    }
     
    7485    pmFPAfile *refMask = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.MASK", "REF.MASK");
    7586    if (!status) {
    76         psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.MASK");
     87        psError(PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.MASK");
    7788        return NULL;
    7889    }
     
    8596    pmFPAfile *refVariance = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.VARIANCE", "REF.VARIANCE");
    8697    if (!status) {
    87         psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.VARIANCE");
     98        psError(PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.VARIANCE");
    8899        return NULL;
    89100    }
    90101    if (refVariance && refVariance->type != PM_FPA_FILE_VARIANCE) {
    91102        psError(PS_ERR_IO, true, "PPSUB.REF.VARIANCE is not of type VARIANCE");
     103        return false;
     104    }
     105
     106    // Reference source list
     107    pmFPAfile *refSources = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.SOURCES", "REF.SOURCES");
     108    if (!status) {
     109        psError(PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.SOURCES");
     110        return NULL;
     111    }
     112    if (refSources && refSources->type != PM_FPA_FILE_CMF) {
     113        psError(PS_ERR_IO, true, "PPSUB.REF.SOURCES is not of type CMF");
    92114        return false;
    93115    }
     
    241263    outKernels->save = true;
    242264
    243 #if 0
    244     if (!pmFPAAddSourceFromFormat(output->fpa, "Subtraction", output->format)) {
    245         psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA.");
    246         return false;
    247     }
    248 #endif
    249 
    250     pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSUB.SOURCES", "PPSUB.SOURCES");
    251     if (!status) {
    252         psError(PS_ERR_IO, false, "Failed to load file definition PPSUB.SOURCES");
    253         return false;
    254     }
    255     if (sources && sources->type != PM_FPA_FILE_CMF) {
    256         psError(PS_ERR_IO, true, "PPSUB.SOURCES is not of type CMF");
    257         return false;
    258     }
    259265
    260266    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
Note: See TracChangeset for help on using the changeset viewer.