IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24891


Ignore:
Timestamp:
Jul 22, 2009, 9:28:22 AM (17 years ago)
Author:
Paul Price
Message:

Adding code to fit and subtraction pattern noise; intended to replace tiltystreaks.

Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/recipes/ppImage.config

    r24817 r24891  
    2525USE.DEBURNED.IMAGE BOOL    FALSE           # use burntool-repaired image?
    2626TILTYSTREAK.APPLY  BOOL    FALSE           # apply the 'tiltystreak' tool
     27
     28PATTERN            BOOL    FALSE           # Fit and remove pattern noise?
     29PATTERN.ORDER      S32     1               # Polynomial order
     30PATTERN.ITER       S32     3               # Rejection iterations
     31PATTERN.REJ        F32     2.0             # Rejection threshold
     32PATTERN.MEAN       STR     ROBUST_MEDIAN   # Statistic for mean
     33PATTERN.STDEV      STR     ROBUST_STDEV    # Statistic for standard deviation
     34
    2735
    2836TILTYSTREAK.BY.CLASS METADATA              # apply the 'tiltystreak' tool
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r24485 r24891  
    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
     
    123123        }
    124124    }
     125
     126    // Pattern noise correction
     127    if (options->doPattern) {
     128        if (!pmPatternRow(input, options->patternOrder,
     129options->patternIter, options->patternRej, options->patternMean,
     130options->patternStdev)) {
     131                psFree(detview);
     132                return false;
     133            }
     134        }
     135
    125136
    126137    // Normalization by a single (known) constant
  • trunk/psModules/src/detrend/Makefile.am

    r20617 r24891  
    1616        pmShifts.c \
    1717        pmDark.c \
    18         pmRemnance.c
     18        pmRemnance.c \
     19        pmPattern.c
    1920
    2021#       pmSkySubtract.c
     
    3334        pmShifts.h \
    3435        pmDark.h \
    35         pmRemnance.h
     36        pmRemnance.h \
     37        pmPattern.h
    3638
    3739#       pmSkySubtract.h
  • trunk/psModules/src/psmodules.h

    r24836 r24891  
    7777#include <pmDark.h>
    7878#include <pmRemnance.h>
     79#include <pmPattern.h>
    7980
    8081// the following headers are from psModule:astrom
Note: See TracChangeset for help on using the changeset viewer.