Changeset 43038 for trunk/ppImage
- Timestamp:
- May 28, 2026, 9:38:40 PM (7 weeks ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 1 added
- 8 edited
-
Makefile.am (modified) (1 diff)
-
ppImage.h (modified) (2 diffs)
-
ppImageArguments.c (modified) (2 diffs)
-
ppImageDetrendFree.c (modified) (1 diff)
-
ppImageDetrendReadout.c (modified) (1 diff)
-
ppImageDetrendRecord.c (modified) (1 diff)
-
ppImageMaskBadOverscan.c (added)
-
ppImageOptions.c (modified) (2 diffs)
-
ppImageParseCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/Makefile.am
r42382 r43038 33 33 ppImageMosaicBackground.c \ 34 34 ppImageMaskStats.c \ 35 ppImageMaskBadOverscan.c \ 35 36 ppImagePhotom.c \ 36 37 ppImageAstrom.c \ -
trunk/ppImage/src/ppImage.h
r42890 r43038 36 36 bool doNonLin; // Non-linearity correction 37 37 bool doNewNonLin; // Non-linearity correction 38 bool doMaskBadOverscan; // Mask cells/readouts with out-of-range overscan 38 39 bool doOverscan; // Overscan subtraction 39 40 bool doNoiseMap; // Bias subtraction … … 180 181 bool ppImageDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppImageOptions *options); 181 182 183 bool ppImageMaskBadOverscan(pmReadout *input, pmConfig *config); 184 182 185 bool ppImageDetrendNewNonLinear(pmReadout *input, pmFPAview *linearity, pmConfig *config); 183 186 -
trunk/ppImage/src/ppImageArguments.c
r42382 r43038 26 26 fprintf(stderr, "\t-linearity/-linearlist: linearity correction file.\n"); 27 27 fprintf(stderr, "\t-newnonlin/-newnonlinlist: non-linearity correction file (v 2023.01).\n"); 28 fprintf(stderr, "\t-valid-overscan/-valid-overscan-list: overscan valid range file.\n"); 28 29 fprintf(stderr, "\n"); 29 30 exit (2); … … 118 119 pmConfigFileSetsMD (config->arguments, &argc, argv, "LINEARITY", "-linearity", "-linearlist"); 119 120 pmConfigFileSetsMD (config->arguments, &argc, argv, "NEWNONLIN", "-newnonlin", "-newnonlinlist"); 121 pmConfigFileSetsMD (config->arguments, &argc, argv, "VALID.OVERSCAN", "-valid-overscan", "-valid-overscan-list"); 120 122 pmConfigFileSetsMD (config->arguments, &argc, argv, "PATTERN.ROW.AMP", "-pattern-row-amplitude", "-not-defined"); 121 123 pmConfigFileSetsMD (config->arguments, &argc, argv, "PATTERN.DEAD.CELLS", "-pattern-dead-cells", "-not-defined"); -
trunk/ppImage/src/ppImageDetrendFree.c
r42340 r43038 15 15 "PPIMAGE.LINEARITY", 16 16 "PPIMAGE.NEWNONLIN", 17 "PPIMAGE.VALID.OVERSCAN", 17 18 NULL 18 19 }; -
trunk/ppImage/src/ppImageDetrendReadout.c
r42964 r43038 167 167 } 168 168 169 // Mask bad cells based on the overscan values 170 if (options->doMaskBadOverscan) { 171 if (!ppImageMaskBadOverscan(input, config)) { 172 psError(PS_ERR_UNKNOWN, false, "Unable to mask readout based on overscan"); 173 psFree(detview); 174 return(false); 175 } 176 } 177 169 178 // measure the overscan-subtracted readoutBackground here (or subtract the overscan value?) 170 179 // XXX this is the measurements and should be independent of the pattern masking -
trunk/ppImage/src/ppImageDetrendRecord.c
r42340 r43038 75 75 detrendRecord(options->doFringe, detrend, config, view, "PPIMAGE.FRINGE", "DETREND.FRINGE", "Fringe filename"); 76 76 77 detrendRecord(options->doNonLin, detrend, config, view, "PPIMAGE.LINEARITY","DETREND.NONLIN", "Non-linearity table filename"); 78 detrendRecord(options->doNewNonLin, detrend, config, view, "PPIMAGE.NEWNONLIN","DETREND.NEWNONLIN","Non-linearity table filename (v2023)"); 77 detrendRecord(options->doNonLin, detrend, config, view, "PPIMAGE.LINEARITY", "DETREND.NONLIN", "Non-linearity table filename"); 78 detrendRecord(options->doNewNonLin, detrend, config, view, "PPIMAGE.NEWNONLIN", "DETREND.NEWNONLIN", "Non-linearity table filename (v2023)"); 79 detrendRecord(options->doMaskBadOverscan, detrend, config, view, "PPIMAGE.VALID.OVERSCAN", "DETREND.VALID.OVERSCAN", "Valid Overscan table filename"); 79 80 80 81 detrendRecord(options->doDark & options->useVideoDark, detrend, config, view, "PPIMAGE.VIDEODARK", "DETREND.VIDEODARK", "VideoDark filename"); -
trunk/ppImage/src/ppImageOptions.c
r42890 r43038 29 29 options->doNonLin = false; // Non-linearity correction 30 30 options->doNewNonLin = false; // New Non-linearity correction (v2023) 31 options->doMaskBadOverscan = false; // Mask cells / readouts if overscan is out of bounds 31 32 options->doOverscan = false; // Overscan subtraction 32 33 options->doNoiseMap = false; // Apply Read Noise Map … … 182 183 } 183 184 185 // Mask cells/readouts with out-of-range overscan 186 // nominal overscan ranges are loaded from a file defined in the detrend system or on the command-line 187 if (psMetadataLookupBool(NULL, recipe, "MASK.BAD.OVERSCAN")) { 188 options->doMaskBadOverscan = true; 189 } 190 184 191 // XXX PAP: The overscan stuff needs to be updated following the reworked API 185 192 -
trunk/ppImage/src/ppImageParseCamera.c
r42382 r43038 117 117 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.NEWNONLIN", "NEWNONLIN", 118 118 PM_FPA_FILE_NEWNONLIN, PM_DETREND_TYPE_NEWNONLIN)) { 119 psError(PS_ERR_IO, false, "Can't find a new non-linearity correction source"); 120 psFree(options); 121 return NULL; 122 } 123 } 124 if (options->doMaskBadOverscan) { 125 // if the file has been specified on the command-line (-valid-overscan file), then the file 126 // is identified by the VALID.OVERSCAN entry in config->arguments. otherwise, load from the 127 // detrend system as type VALID.OVERSCAN 128 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.VALID.OVERSCAN", "VALID.OVERSCAN", 129 PM_FPA_FILE_VALID_OVERSCAN, PM_DETREND_TYPE_VALID_OVERSCAN)) { 119 130 psError(PS_ERR_IO, false, "Can't find a new non-linearity correction source"); 120 131 psFree(options);
Note:
See TracChangeset
for help on using the changeset viewer.
