Changeset 42328
- Timestamp:
- Jan 26, 2023, 10:42:21 AM (3 years ago)
- Location:
- branches/eam_branches/ppImage.20230123/src
- Files:
-
- 1 added
- 7 edited
-
ppImageArguments.c (modified) (2 diffs)
-
ppImageDetrendFree.c (modified) (1 diff)
-
ppImageDetrendNewNonLinear.c (added)
-
ppImageDetrendNonLinear.c (modified) (1 diff)
-
ppImageDetrendReadout.c (modified) (2 diffs)
-
ppImageDetrendRecord.c (modified) (1 diff)
-
ppImageOptions.c (modified) (2 diffs)
-
ppImageParseCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ppImage.20230123/src/ppImageArguments.c
r41894 r42328 25 25 fprintf(stderr, "\t-fringe/-fringelist: Fringe image and data.\n"); 26 26 fprintf(stderr, "\t-linearity/-linearlist: linearity correction file.\n"); 27 fprintf(stderr, "\t-newnonlin/-newnonlinlist: non-linearity correction file (v 2023.01).\n"); 27 28 fprintf(stderr, "\n"); 28 29 exit (2); … … 116 117 pmConfigFileSetsMD (config->arguments, &argc, argv, "FRINGE", "-fringe", "-fringelist"); 117 118 pmConfigFileSetsMD (config->arguments, &argc, argv, "LINEARITY", "-linearity", "-linearlist"); 119 pmConfigFileSetsMD (config->arguments, &argc, argv, "NEWNONLIN", "-newnonlin", "-newnonlinlist"); 118 120 pmConfigFileSetsMD (config->arguments, &argc, argv, "PATTERN.ROW.AMP", "-pattern-row-amplitude", "-not-defined"); 119 121 -
branches/eam_branches/ppImage.20230123/src/ppImageDetrendFree.c
r29833 r42328 14 14 "PPIMAGE.SHUTTER", 15 15 "PPIMAGE.LINEARITY", 16 "PPIMAGE.NEWNONLIN", 16 17 NULL 17 18 }; -
branches/eam_branches/ppImage.20230123/src/ppImageDetrendNonLinear.c
r29833 r42328 1 #ifdef HAVE_CONFIG_H2 #include <config.h>3 #endif4 5 1 #include "ppImage.h" 6 2 -
branches/eam_branches/ppImage.20230123/src/ppImageDetrendReadout.c
r39501 r42328 124 124 // psLogMsg ("ppImage", 6, "nonlinear correction: %f sec\n", psTimerMark ("detrend.readout")); 125 125 } 126 // New Non-linearity correction (exclusive of the above) 127 if (options->doNewNonLin) { 128 if (!ppImageDetrendNewNonLinear(input, detview, config)) { 129 psError(PS_ERR_UNKNOWN, false, "Unable to correct Non-Linearity with new version (2023)"); 130 psFree(detview); 131 return(false); 132 } 133 // psLogMsg ("ppImage", 6, "nonlinear correction: %f sec\n", psTimerMark ("detrend.readout")); 134 } 126 135 127 136 // set up the dark and bias … … 188 197 psImageUnbin (noiseImage, noiseMap->image, binning); 189 198 psFree (binning); 190 // Stolen from pmSkySubtract.c191 // CZW: Unneeded, as psImageUnbin does the bilinear interpolation? It still looks blocky.192 /* psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe */193 /* psAssert(recipe, "Should be there!"); */194 195 /* psS32 xBinFactor = psMetadataLookupS32(NULL,recipe,"NOISE.XBIN"); */196 /* psS32 yBinFactor = psMetadataLookupS32(NULL,recipe,"NOISE.YBIN"); */197 /* psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, */198 /* noiseMap->image, */199 /* NULL, NULL, */200 /* 0, 0.0, 0.0, 0, 0, 0.0); */201 /* for (psS32 row = 0; row < input->image->numRows; row++) { */202 /* for (psS32 col = 0; col < input->image->numCols; col++) { */203 /* // We calculate the F32 value of the pixel coordinates in the */204 /* // binned image and then use a pixel interpolation routine to */205 /* // determine the value of the pixel at that location. */206 /* psF32 binRowF64 = ((psF32) row) / ((psF32) yBinFactor); */207 /* psF32 binColF64 = ((psF32) col) / ((psF32) xBinFactor); */208 /* // We add 0.5 to the pixel locations since the pixel */209 /* // interpolation routine defines the location of pixel */210 /* // (i, j) as (i+0.5, j+0.5). */211 /* binRowF64+= 0.5; */212 /* binColF64+= 0.5; */213 214 /* double binPixel; */215 /* if (!psImagePixelInterpolate(&binPixel, NULL, NULL, binColF64, binRowF64, interp)) { */216 /* psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image."); */217 /* psFree(interp); */218 /* psFree(noiseImage); */219 /* return NULL; */220 /* } */221 /* noiseImage->data.F32[row][col] = binPixel; */222 /* } */223 /* } */224 /* psFree(interp); */225 199 } 226 200 -
branches/eam_branches/ppImage.20230123/src/ppImageDetrendRecord.c
r35612 r42328 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"); 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)"); 78 79 79 80 detrendRecord(options->doDark & options->useVideoDark, detrend, config, view, "PPIMAGE.VIDEODARK", "DETREND.VIDEODARK", "VideoDark filename"); -
branches/eam_branches/ppImage.20230123/src/ppImageOptions.c
r41918 r42328 28 28 options->doAuxMask = false; // apply auxillary mask 29 29 options->doNonLin = false; // Non-linearity correction 30 options->doNewNonLin = false; // New Non-linearity correction (v2023) 30 31 options->doOverscan = false; // Overscan subtraction 31 32 options->doNoiseMap = false; // Apply Read Noise Map … … 175 176 // XXX PAP: The overscan stuff needs to be updated following the reworked API 176 177 178 // New Non-linearity (v 2023) recipe options 179 // non-linearity corrections are loaded from a file defined in the detrend system or on the command-line 180 if (psMetadataLookupBool(NULL, recipe, "NEWNONLIN")) { 181 options->doNewNonLin = true; 182 } 183 184 // XXX PAP: The overscan stuff needs to be updated following the reworked API 185 177 186 // Overscan recipe options 178 187 // XXX EAM : we should abort on invalid options. default options? -
branches/eam_branches/ppImage.20230123/src/ppImageParseCamera.c
r42321 r42328 104 104 105 105 if (options->doNonLin) { 106 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.LINEARITY", "LINEARITY", 107 PM_FPA_FILE_LINEARITY, PM_DETREND_TYPE_LINEARITY)) { 108 psError(PS_ERR_IO, false, "Can't find a non-linearity correction source"); 109 psFree(options); 110 return NULL; 111 } 112 } 113 114 if (options->doNonLinNew) { 115 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.NONLIN_NEW", "NONLIN_NEW", 116 PM_FPA_FILE_NONLIN_NEW, PM_DETREND_TYPE_NONLIN_NEW)) { 117 psError(PS_ERR_IO, false, "Can't find a new non-linearity correction source"); 118 psFree(options); 119 return NULL; 120 } 106 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.LINEARITY", "LINEARITY", 107 PM_FPA_FILE_LINEARITY, PM_DETREND_TYPE_LINEARITY)) { 108 psError(PS_ERR_IO, false, "Can't find a non-linearity correction source"); 109 psFree(options); 110 return NULL; 111 } 112 } 113 if (options->doNewNonLin) { 114 // if the file has been specified on the command-line (-newnonlin file), then the file 115 // is identified by the NEWNONLIN entry in config->arguments. otherwise, load from the 116 // detrend system as type NEWNONLIN 117 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.NEWNONLIN", "NEWNONLIN", 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 } 121 123 } 122 124
Note:
See TracChangeset
for help on using the changeset viewer.
