IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 9, 2013, 10:00:41 AM (13 years ago)
Author:
eugene
Message:

add source for output, output.bkgmodel, and psphotInput in psphotParseCamera; do not activate PSPHOT.INPUT; if a background model is not supplied do not attempt to generate one; generate the metadata for the output bkgmodel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130419/pswarp/src/pswarpParseCamera.c

    r35538 r35539  
    7676    }
    7777    output->save = true;
     78    pmFPAAddSourceFromFormat(output->fpa, output->format); // ** builds the HDUs, is this OK?
    7879
    7980    pmFPAfile *outMask = useInputCamera ?
     
    116117            pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL"):
    117118            pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT.BKGMODEL", skycell->cameraName, skycell->formatName);
     119        if (!outBackground) {
     120            psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.BKGMODEL");
     121            return false;
     122        }
    118123        outBackground->xBin = psMetadataLookupS32(&status, recipe, "BKG.XGRID");
    119124        outBackground->yBin = psMetadataLookupS32(&status, recipe, "BKG.YGRID");
    120        
    121         if (!outBackground) {
    122             psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.BKGMODEL");
    123             return false;
    124         }
    125125        outBackground->save = true;
     126        pmFPAAddSourceFromFormat(outBackground->fpa, outBackground->format); // ** builds the HDUs, is this OK?
    126127    }
    127128
     
    136137        }
    137138        psphotInput->src = psMemIncrRefCounter(output->fpa);
     139        pmFPAAddSourceFromFormat(psphotInput->fpa, psphotInput->format); // ** builds the HDUs, is this OK?
    138140
    139141        // specify the number of psphot input images (psphotReadout loops over all input images)
     
    232234        foundBackground = true;
    233235    } else {
     236      // cannot do the background model if an input is not supplied.
     237      psMetadataAddBool (config->arguments, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE, "no input background supplied", false);
    234238      psLogMsg("pswarp", PS_LOG_INFO, "No background models supplied");
    235239    }
     
    329333            psLogMsg("pswarp", PS_LOG_INFO, "No variance supplied");
    330334        }
     335
     336        // XXX for now we do not have an option to supply a background model set in multi input mode
     337        psMetadataAddBool (config->arguments, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE, "no input background supplied", false);
    331338    }
    332339
Note: See TracChangeset for help on using the changeset viewer.