IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2007, 4:07:11 PM (19 years ago)
Author:
Paul Price
Message:

Don't build own masks, but only use those that are provided. Don't attempt to define psphot files unless a PSF model has been provided.

File:
1 edited

Legend:

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

    r13528 r13665  
    2828    pmFPAfile *inputMask = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.MASK", "INPUT.MASK");
    2929    if (!status) {
    30         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
    31         return NULL;
     30        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
     31        return NULL;
    3232    }
    3333    if (inputMask && inputMask->type != PM_FPA_FILE_MASK) {
     
    3939    pmFPAfile *inputWeight = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.WEIGHT", "INPUT.WEIGHT");
    4040    if (!status) {
    41         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
    42         return NULL;
     41        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
     42        return NULL;
    4343    }
    4444    if (inputWeight && inputWeight->type != PM_FPA_FILE_WEIGHT) {
     
    6262    pmFPAfile *refMask = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.REF.MASK", "REF.MASK");
    6363    if (!status) {
    64         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
    65         return NULL;
     64        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
     65        return NULL;
    6666    }
    6767    if (refMask && refMask->type != PM_FPA_FILE_MASK) {
     
    7373    pmFPAfile *refWeight = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.REF.WEIGHT", "REF.WEIGHT");
    7474    if (!status) {
    75         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
    76         return NULL;
     75        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
     76        return NULL;
    7777    }
    7878    if (refWeight && refWeight->type != PM_FPA_FILE_WEIGHT) {
     
    115115
    116116    // psPhot input
    117     pmFPAfile *psphot = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT");
    118     if (!psphot) {
    119         psError(PS_ERR_IO, false, "Failed to build FPA from PSPHOT.INPUT");
    120         return false;
    121     }
    122     if (input->type != PM_FPA_FILE_IMAGE) {
    123         psError(PS_ERR_IO, true, "PSPHOT.INPUT is not of type IMAGE");
    124         return false;
    125     }
     117    if (psMetadataLookup(config->arguments, "PSPHOT.PSF")) {
     118        pmFPAfile *psphot = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT");
     119        if (!psphot) {
     120            psError(PS_ERR_IO, false, "Failed to build FPA from PSPHOT.INPUT");
     121            return false;
     122        }
     123        if (input->type != PM_FPA_FILE_IMAGE) {
     124            psError(PS_ERR_IO, true, "PSPHOT.INPUT is not of type IMAGE");
     125            return false;
     126        }
    126127
    127     if (!psphotDefineFiles(config, psphot)) {
    128         psError(PS_ERR_UNKNOWN, false, "Unable to set up psphot files.");
    129         return false;
     128        if (!psphotDefineFiles(config, psphot)) {
     129            psError(PS_ERR_UNKNOWN, false, "Unable to set up psphot files.");
     130            return false;
     131        }
    130132    }
    131133
Note: See TracChangeset for help on using the changeset viewer.