IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2009, 5:20:29 PM (17 years ago)
Author:
watersc1
Message:

Finished up my edits to the detrend cleanup, and some changes to my
copy of burntool and the pslib astrometry. Detrend cleanup has not
been tested yet. That's up next.

Location:
branches/czw_branch/cleanup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup

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

    r24485 r24951  
    6464    if (options->doVarianceBuild) {
    6565        // create the target mask and variance images
    66         psImage *noiseImage = NULL;
    67         if (options->doNoiseMap) {
    68             // XXX convert the noiseMap image to a binned image
    69             pmReadout *noiseMap = NULL;
    70             noiseMap = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.NOISEMAP");
    71             noiseImage = psImageCopy (NULL, input->image, PS_TYPE_F32);
    72             psImageInit (noiseImage, 0.0);
    73 
    74             // XXX this works, but is not really quite right: the model shoud include the
    75             // offset information, we are not really getting exactly the right mapping from the
    76             // original file.
    77             psImageBinning *binning = psImageBinningAlloc();
    78             binning->nXruff = noiseMap->image->numCols;
    79             binning->nYruff = noiseMap->image->numRows;
    80             binning->nXfine = input->image->numCols;
    81             binning->nYfine = input->image->numRows;
    82             psImageBinningSetScale(binning, PS_IMAGE_BINNING_LEFT);
    83 
    84             psImageUnbin (noiseImage, noiseMap->image, binning);
    85             psFree (binning);
    86         }
     66        psImage *noiseImage = NULL;
     67        if (options->doNoiseMap) {
     68            // XXX convert the noiseMap image to a binned image
     69            pmReadout *noiseMap = NULL;
     70            noiseMap = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.NOISEMAP");
     71            noiseImage = psImageCopy (NULL, input->image, PS_TYPE_F32);
     72            psImageInit (noiseImage, 0.0);
     73
     74            // XXX this works, but is not really quite right: the model shoud include the
     75            // offset information, we are not really getting exactly the right mapping from the
     76            // original file.
     77            psImageBinning *binning = psImageBinningAlloc();
     78            binning->nXruff = noiseMap->image->numCols;
     79            binning->nYruff = noiseMap->image->numRows;
     80            binning->nXfine = input->image->numCols;
     81            binning->nYfine = input->image->numRows;
     82            psImageBinningSetScale(binning, PS_IMAGE_BINNING_LEFT);
     83
     84            psImageUnbin (noiseImage, noiseMap->image, binning);
     85            psFree (binning);
     86        }
    8787        pmReadoutGenerateVariance(input, noiseImage, true);
    88         psFree (noiseImage);
     88        psFree (noiseImage);
    8989    }
    9090
     
    119119        pmReadout *flat = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.FLAT");
    120120        if (!pmFlatField(input, flat, options->flatMask)) {
     121            psFree(detview);
     122            return false;
     123        }
     124    }
     125
     126    // Pattern noise correction
     127    if (options->doPattern) {
     128        if (!pmPatternRow(input, options->patternOrder, options->patternIter, options->patternRej,
     129                          options->patternThresh, options->patternMean, options->patternStdev,
     130                          options->maskValue, options->darkMask)) {
    121131            psFree(detview);
    122132            return false;
Note: See TracChangeset for help on using the changeset viewer.