IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29926


Ignore:
Timestamp:
Dec 5, 2010, 9:21:36 PM (15 years ago)
Author:
eugene
Message:

support for compressed metadata files; clarify rules for constructing a mask; support for modified psphotReadout API; remove some deprecated comments and test prints

Location:
trunk/ppImage/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r29833 r29926  
    6262    // Non-linearity correction
    6363    if (options->doNonLin) {
    64       //      linearity = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.LINEARITY");
    6564      if (!ppImageDetrendNonLinear(input,detview,config)) {
    6665        psError(PS_ERR_UNKNOWN, false, "Unable to correct NonLinearity");
     
    6867        return(false);
    6968      }
    70       /*       ppImageDetrendNonLinear(detrend->input, input, options); */
    7169    }
    7270
  • trunk/ppImage/src/ppImageOptions.c

    r29833 r29926  
    301301    options->checkCTE       = psMetadataLookupBool(NULL, recipe, "CHECK.CTE");
    302302
     303    /* doMaskBuild : there are some cases where we require a mask, so we force doMaskBuild to be set even if the user specified 'FALSE'
     304     *
     305     * doPhotom : a mask is required because it is used to mark the locations of stars
     306     *
     307     * doNoiseMap : no reason this needs to trigger a mask?
     308     * doBias : no reason this needs to trigger a mask?
     309     * doOverscan : no reason this needs to trigger a mask?
     310     * doDark : no reason this needs to trigger a mask?
     311     * doShutter : no reason this needs to trigger a mask?
     312     * doFlat : no reason this needs to trigger a mask?
     313     */
     314
    303315    // even if not requested explicitly, if any of these are set, build an internal mask and variance:
    304     if (options->doNoiseMap || options->doBias || options->doOverscan || options->doDark || options->doShutter || options->doFlat ||
    305         options->doPhotom) {
    306         options->doMaskBuild = true;
     316    // XXX we used to automatically generate a mask in all of these cases.
     317    // if (options->doNoiseMap || options->doBias || options->doOverscan || options->doDark || options->doShutter || options->doFlat || options->doPhotom) {
     318    //     options->doMaskBuild = true;
     319    //     options->doVarianceBuild = true;
     320    // }
     321
     322    // photometry and noisemap both require a variance image
     323    if (options->doNoiseMap || options->doPhotom) {
    307324        options->doVarianceBuild = true;
    308     } else if (options->doMask || options->doBG) {
     325    }
     326
     327    // photometry, mask, and background all require a mask image
     328    if (options->doMask || options->doBG || options->doPhotom) {
    309329        options->doMaskBuild = true;
    310330    }
  • trunk/ppImage/src/ppImagePhotom.c

    r28375 r29926  
    1111    pmCell *cell;
    1212    pmReadout *readout;
    13     printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
     13
    1414    psphotInit();
    15     printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
     15
    1616    // find or define a pmFPAfile PSPHOT.INPUT
    1717    pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT");
     
    2020        return false;
    2121    }
    22     printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
     22
    2323    // we make a new copy of the output chip to keep psphot from modifying the output image
    2424    pmChip *oldChip = pmFPAviewThisChip (view, input->src);
    2525    pmChip *newChip = pmFPAviewThisChip (view, input->fpa);
    2626    pmChipCopy (newChip, oldChip);
    27     printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
     27
    2828    // iterate over the cells and readout for this chip
    2929    while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
     
    3434        while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
    3535            if (! readout->data_exists) { continue; }
    36             printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
     36
    3737            // run the actual photometry analysis
    38             if (!psphotReadout (config, view)) {
     38            if (!psphotReadout (config, view, "PSPHOT.INPUT")) {
    3939                // This is likely a data quality issue
    4040                // XXX Split into multiple cases using error codes?
     
    6060    ppImageMemoryDump("photom");
    6161
    62     // the PSPHOT.INPUT file is a temporary file used to carry PPIMAGE.CHIP to psphotReadout
    63     // XXX not sure that this is needed...
    64 //    pmFPAfileActivate (config->files, false, "PSPHOT.INPUT");
    65 
    6662    return true;
    6763}
    68 
    69 // XXX do we need to deactivate all files and activate the psphot ones explicitly?
  • trunk/ppImage/src/ppImageStatsOutput.c

    r27064 r29926  
    2828        return false;
    2929    }
    30     if (!psMetadataConfigWrite(stats, resolved)) {
     30
     31    // check for Metadata compression options:
     32    char *compressMode;
     33    bool status = false;
     34    if (config->camera) {
     35        // XXX use a different config variable for this output?
     36        compressMode = psMetadataLookupStr(&status, config->camera, "METADATA.COMPRESSION");
     37    }
     38
     39    if (!psMetadataConfigWrite(stats, resolved, compressMode)) {
    3140        psError(psErrorCodeLast(), false, "Unable to serialize stats metadata.\n");
    3241        psFree(resolved);
Note: See TracChangeset for help on using the changeset viewer.