IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33590 for trunk


Ignore:
Timestamp:
Mar 21, 2012, 5:02:21 PM (14 years ago)
Author:
watersc1
Message:

Tell ppImage how to construct a noise map, and add appropriate recipes for this.

Location:
trunk
Files:
1 added
7 edited

Legend:

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

    r33243 r33590  
    227227  MASK.BURNTOOL      BOOL    TRUE            # Mask potential burntool trails
    228228  PATTERN.ROW        BOOL    TRUE            # Row pattern correction
    229   PATTERN.CELL       BOOL    TRUE            # Cell pattern correction
     229  PATTERN.CELL       BOOL    FALSE           # Cell pattern correction
     230  PATTERN.CONTINUITY BOOL    TRUE
    230231  FRINGE             BOOL    TRUE            # Fringe subtraction
    231232  BIN1.FITS          BOOL    TRUE            # Save 1st binned chip image?
     
    10301031    END
    10311032  END   
     1033END
     1034
     1035PPIMAGE_NOISEMAP     METADATA
     1036  BASE.FITS        BOOL    TRUE            # Save base image?
     1037  BASE.MASK.FITS   BOOL    TRUE            # Save base detrended image?
     1038  BASE.VARIANCE.FITS BOOL  TRUE            # Save base detrended image?
     1039  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image?
     1040  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image?
     1041  CHIP.VARIANCE.FITS BOOL  FALSE           # Save chip-mosaic-ed image?
     1042  OVERSCAN         BOOL    TRUE            # Overscan subtraction
     1043  NONLIN             BOOL    FALSE           # Non-linearity correction; not implemented
     1044  BIAS             BOOL    FALSE            # Bias subtraction
     1045  DARK             BOOL    FALSE            # Dark subtraction
     1046  SHUTTER          BOOL    FALSE           # Shutter correction
     1047  FLAT             BOOL    FALSE           # Flat-field normalisation
     1048  MASK             BOOL    FALSE           # Mask bad pixels
     1049  MASK.BUILD       BOOL    FALSE           # Build internal mask?
     1050  FRINGE           BOOL    FALSE           # Fringe subtraction
     1051  PHOTOM           BOOL    FALSE           # Source identification and photometry
     1052  ASTROM.CHIP      BOOL    FALSE           # Astrometry per chip?
     1053  ASTROM.MOSAIC    BOOL    FALSE           # Astrometry for mosaic?
     1054  BIN1.FITS        BOOL    TRUE            # Save 1st binned chip image?
     1055  BIN2.FITS        BOOL    TRUE            # Save 2nd binned chip image?
     1056  CHECK.CTE        BOOL    FALSE            # measure CTE errors?
     1057  CHECK.NOISE      BOOL    TRUE            # measure cell level noise.
     1058
     1059#   DETREND.CONSTRAINTS  METADATA
     1060#     DARK METADATA
     1061#       DETTYPE STR DARK_PREMASK
     1062#       EXPTIME STR FPA.EXPOSURE
     1063#     END
     1064#     FLAT METADATA
     1065#       DETTYPE STR FLAT_PREMASK
     1066#       FILTER  STR FPA.FILTERID
     1067#     END
     1068#   END   
    10321069END
    10331070
  • trunk/ippconfig/recipes/ppImage.config

    r33243 r33590  
    3636BACKGROUND         BOOL    FALSE           # Subtract model background?
    3737CHECK.CTE          BOOL    FALSE           # measure CTE errors?
     38CHECK.NOISE        BOOL    FALSE         
    3839USE.DEBURNED.IMAGE BOOL    FALSE           # use burntool-repaired image?
    3940USE.BEST.BURNTOOL  BOOL    FALSE           # require the best burntooled data
     
    110111PATTERN.ROW.MEAN       STR     SAMPLE_MEAN     # Statistic for mean for row pattern
    111112PATTERN.ROW.STDEV      STR     SAMPLE_STDEV    # Statistic for standard deviation for row pattern
    112 PATTERN.CELL.BG        STR     ROBUST_MEDIAN   # Statistic for background for cell pattern
     113PATTERN.CELL.BG        STR     FITTED_MEAN     # Statistic for background for cell pattern
    113114PATTERN.CELL.MEAN      STR     SAMPLE_MEDIAN   # Statistic for mean for cell pattern
    114115
     
    130131CTE.XBIN                S32     20
    131132CTE.YBIN                S32     20
     133
     134NOISE.XBIN              S32     20
     135NOISE.YBIN              S32     20
    132136
    133137PPIMAGE.JPEG1  METADATA
     
    18711875    END
    18721876  END   
     1877END
     1878
     1879PPIMAGE_NOISEMAP     METADATA
     1880  BASE.FITS        BOOL    TRUE            # Save base image?
     1881  BASE.MASK.FITS   BOOL    TRUE            # Save base detrended image?
     1882  BASE.VARIANCE.FITS BOOL  TRUE            # Save base detrended image?
     1883  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image?
     1884  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image?
     1885  CHIP.VARIANCE.FITS BOOL  FALSE           # Save chip-mosaic-ed image?
     1886  OVERSCAN         BOOL    TRUE            # Overscan subtraction
     1887  NONLIN             BOOL    FALSE           # Non-linearity correction; not implemented
     1888  BIAS             BOOL    TRUE            # Bias subtraction
     1889  DARK             BOOL    FALSE            # Dark subtraction
     1890  SHUTTER          BOOL    FALSE           # Shutter correction
     1891  FLAT             BOOL    FALSE           # Flat-field normalisation
     1892  MASK             BOOL    FALSE           # Mask bad pixels
     1893  MASK.BUILD       BOOL    FALSE           # Build internal mask?
     1894  FRINGE           BOOL    FALSE           # Fringe subtraction
     1895  PHOTOM           BOOL    FALSE           # Source identification and photometry
     1896  ASTROM.CHIP      BOOL    FALSE           # Astrometry per chip?
     1897  ASTROM.MOSAIC    BOOL    FALSE           # Astrometry for mosaic?
     1898  BIN1.FITS        BOOL    TRUE            # Save 1st binned chip image?
     1899  BIN2.FITS        BOOL    TRUE            # Save 2nd binned chip image?
     1900  CHECK.CTE        BOOL    FALSE            # measure CTE errors?
     1901  CHECK.NOISE      BOOL    TRUE            # measure cell level noise.
     1902
     1903#   DETREND.CONSTRAINTS  METADATA
     1904#     DARK METADATA
     1905#       DETTYPE STR DARK_PREMASK
     1906#       EXPTIME STR FPA.EXPOSURE
     1907#     END
     1908#     FLAT METADATA
     1909#       DETTYPE STR FLAT_PREMASK
     1910#       FILTER  STR FPA.FILTERID
     1911#     END
     1912#   END   
    18731913END
    18741914
  • trunk/ppImage/src/Makefile.am

    r30655 r33590  
    5959        ppImageParityFlip.c \
    6060        ppImageCheckCTE.c \
     61        ppImageCheckNoise.c \
    6162        ppImageFileCheck.c \
    6263        ppImageVersion.c \
  • trunk/ppImage/src/ppImage.h

    r33243 r33590  
    4848    bool doStats;                       // call ppStats on the image
    4949    bool checkCTE;                      // measure pixel-based variance
     50    bool checkNoise;                    // measure cell-level variance
    5051    bool applyParity;                   // Apply Cell parities
    5152
     
    172173bool ppImageCheckCTE(pmConfig *config, ppImageOptions *options, pmFPAview *view);
    173174
     175bool ppImageCheckNoise(pmConfig *config, ppImageOptions *options, pmFPAview *view);
     176
    174177bool ppImageBurntoolMask(pmConfig *config, ppImageOptions *options, pmFPAview *view, pmReadout *mask);
    175178
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r29926 r33590  
    110110            // offset information, we are not really getting exactly the right mapping from the
    111111            // original file.
     112            // CZW 2012-03-21: I do not believe this is true anymore.  In any case, this seems to be what
     113            //                 ppImageReplaceBackground does to do sky subtraction.
    112114            psImageBinning *binning = psImageBinningAlloc();
    113115            binning->nXruff = noiseMap->image->numCols;
     
    119121            psImageUnbin (noiseImage, noiseMap->image, binning);
    120122            psFree (binning);
     123            // Stolen from pmSkySubtract.c
     124            // CZW: Unneeded, as psImageUnbin does the bilinear interpolation?  It still looks blocky.
     125/*          psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe */
     126/*          psAssert(recipe, "Should be there!"); */
     127
     128/*          psS32 xBinFactor = psMetadataLookupS32(NULL,recipe,"NOISE.XBIN"); */
     129/*          psS32 yBinFactor = psMetadataLookupS32(NULL,recipe,"NOISE.YBIN"); */
     130/*          psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, */
     131/*                                                                             noiseMap->image, */
     132/*                                                                             NULL, NULL, */
     133/*                                                                             0, 0.0, 0.0, 0, 0, 0.0); */
     134/*          for (psS32 row = 0; row < input->image->numRows; row++) { */
     135/*            for (psS32 col = 0; col < input->image->numCols; col++) { */
     136/*              // We calculate the F32 value of the pixel coordinates in the */
     137/*              // binned image and then use a pixel interpolation routine to */
     138/*              // determine the value of the pixel at that location. */
     139/*              psF32 binRowF64 = ((psF32) row) / ((psF32) yBinFactor); */
     140/*              psF32 binColF64 = ((psF32) col) / ((psF32) xBinFactor); */
     141/*              // We add 0.5 to the pixel locations since the pixel */
     142/*              // interpolation routine defines the location of pixel */
     143/*              // (i, j) as (i+0.5, j+0.5). */
     144/*              binRowF64+= 0.5; */
     145/*              binColF64+= 0.5; */
     146
     147/*              double binPixel; */
     148/*              if (!psImagePixelInterpolate(&binPixel, NULL, NULL, binColF64, binRowF64, interp)) { */
     149/*                psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image."); */
     150/*                psFree(interp); */
     151/*                psFree(noiseImage); */
     152/*                return NULL; */
     153/*              } */
     154/*              noiseImage->data.F32[row][col] = binPixel; */
     155/*            } */
     156/*          } */
     157/*          psFree(interp); */
    121158        }
    122159
  • trunk/ppImage/src/ppImageLoop.c

    r33243 r33590  
    126126                }
    127127
     128                if (!ppImageCheckNoise (config, options, view)) {
     129                    ESCAPE("Unable to generate noisemap");
     130                }
     131               
    128132                // optionally degrade a MD image to 3pi exposure times
    129133                if (!ppImageAddNoise(config, options, view, input->fpa)){
  • trunk/ppImage/src/ppImageOptions.c

    r33243 r33590  
    4141    options->doStats         = false;   // Measure and save image statistics
    4242    options->checkCTE        = false;   // Measure pixel-based variance
     43    options->checkNoise      = false;   // Measure cell-level variances.
    4344    options->applyParity     = false;   // Apply Cell parities
    4445    options->doMaskStats     = false;   // Calculate mask fractions
     
    319320
    320321    options->checkCTE       = psMetadataLookupBool(NULL, recipe, "CHECK.CTE");
     322    options->checkNoise     = psMetadataLookupBool(NULL, recipe, "CHECK.NOISE");
    321323
    322324    /* doMaskBuild : there are some cases where we require a mask, so we force doMaskBuild to be set even if the user specified 'FALSE'
Note: See TracChangeset for help on using the changeset viewer.