IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 20, 2010, 2:30:45 PM (16 years ago)
Author:
watersc1
Message:

Attempting to bring branch in sync with trunk

Location:
branches/czw_branch/20101203
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20101203

  • branches/czw_branch/20101203/ppImage/src/ppImageDetrendReadout.c

    r29833 r30118  
    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
  • branches/czw_branch/20101203/ppImage/src/ppImageOptions.c

    r29833 r30118  
    216216
    217217    // for these images, even if not required otherwise
    218     options->doMaskBuild = psMetadataLookupBool(NULL, recipe, "MASK.BUILD");
    219     options->doMaskSat   = psMetadataLookupBool(NULL, recipe, "MASK.SATURATED");
    220     options->doMaskLow   = psMetadataLookupBool(NULL, recipe, "MASK.LOW");
    221     options->doMaskBurntool = psMetadataLookupBool(NULL, recipe, "MASK.BURNTOOL");
     218    options->doMaskBuild     = psMetadataLookupBool(NULL, recipe, "MASK.BUILD");
     219    options->doMaskSat       = psMetadataLookupBool(NULL, recipe, "MASK.SATURATED");
     220    options->doMaskLow       = psMetadataLookupBool(NULL, recipe, "MASK.LOW");
     221    options->doMaskBurntool  = psMetadataLookupBool(NULL, recipe, "MASK.BURNTOOL");
    222222    options->doVarianceBuild = psMetadataLookupBool(NULL, recipe, "VARIANCE.BUILD");
    223223
     
    301301    options->checkCTE       = psMetadataLookupBool(NULL, recipe, "CHECK.CTE");
    302302
    303     // 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) {
     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
     315    // if the variance image is requested, build it (if not supplied)
     316    if (options->BaseVarianceFITS || options->ChipVarianceFITS) {
     317        options->doVarianceBuild = true;
     318    }
     319    // photometry and noisemap both require a variance image
     320    if (options->doNoiseMap || options->doPhotom) {
     321        options->doVarianceBuild = true;
     322    }
     323
     324    // we need a mask if we are going to apply these things:
     325    if (options->doMaskSat || options->doMaskLow || options->doMaskBurntool || options->doMaskStats) {
    306326        options->doMaskBuild = true;
    307         options->doVarianceBuild = true;
    308     } else if (options->doMask || options->doBG) {
     327    }
     328    // photometry, mask, and background all require a mask image
     329    if (options->doMask || options->doBG || options->doPhotom) {
    309330        options->doMaskBuild = true;
    310331    }
  • branches/czw_branch/20101203/ppImage/src/ppImagePhotom.c

    r28375 r30118  
    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?
  • branches/czw_branch/20101203/ppImage/src/ppImageStatsOutput.c

    r27064 r30118  
    2828        return false;
    2929    }
    30     if (!psMetadataConfigWrite(stats, resolved)) {
     30
     31    // check for Metadata compression options:
     32    char *compressMode = NULL;
     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.