Changeset 42340
- Timestamp:
- Jan 30, 2023, 9:55:36 AM (3 years ago)
- Location:
- trunk/ppImage
- Files:
-
- 10 edited
- 1 copied
-
. (modified) (1 prop)
-
src/Makefile.am (modified) (1 diff)
-
src/ppImage.h (modified) (2 diffs)
-
src/ppImageArguments.c (modified) (2 diffs)
-
src/ppImageDetrendFree.c (modified) (1 diff)
-
src/ppImageDetrendNewNonLinear.c (copied) (copied from branches/eam_branches/ppImage.20230123/src/ppImageDetrendNewNonLinear.c )
-
src/ppImageDetrendNonLinear.c (modified) (1 diff)
-
src/ppImageDetrendReadout.c (modified) (2 diffs)
-
src/ppImageDetrendRecord.c (modified) (1 diff)
-
src/ppImageOptions.c (modified) (2 diffs)
-
src/ppImageParseCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/IPP-308_move_backups_folder/ppImage merged eligible /branches/czw_branch/20160809/ppImage merged eligible /branches/czw_branch/20170908/ppImage merged eligible /branches/eam_branches/ipp-20191011/ppImage merged eligible /branches/eam_branches/ipp-20211108/ppImage merged eligible /branches/eam_branches/ipp-dev-20210817/ppImage merged eligible /branches/eam_branches/ppImage.20230123 merged eligible /tags/ipp-ops-20220303-rc/ppImage merged eligible /tags/ipp-ops-20220705/ppImage merged eligible /tags/ipp-ps1-20210510/ppImage merged eligible /tags/ipp-ps1-20210708/ppImage merged eligible /branches/ipp-259_genericise_backups/ppImage 40910-40966
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/ppImage/src/Makefile.am
r41894 r42340 23 23 ppImageDetrendRecord.c \ 24 24 ppImageDetrendNonLinear.c \ 25 ppImageDetrendNewNonLinear.c \ 25 26 ppImageDetrendFringe.c \ 26 27 ppImageDetrendFree.c \ -
trunk/ppImage/src/ppImage.h
r42293 r42340 35 35 bool doAuxMask; // apply auxillary mask 36 36 bool doNonLin; // Non-linearity correction 37 bool doNewNonLin; // Non-linearity correction 37 38 bool doOverscan; // Overscan subtraction 38 39 bool doNoiseMap; // Bias subtraction … … 175 176 bool ppImageDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppImageOptions *options); 176 177 178 bool ppImageDetrendNewNonLinear(pmReadout *input, pmFPAview *linearity, pmConfig *config); 179 177 180 bool ppImageDetrendNonLinear(pmReadout *input, pmFPAview *linearity, pmConfig *config); 178 181 bool ppImageDetrendNonLinearLookup(pmReadout *input, psMetadataItem *dataItem); -
trunk/ppImage/src/ppImageArguments.c
r41894 r42340 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 -
trunk/ppImage/src/ppImageDetrendFree.c
r29833 r42340 14 14 "PPIMAGE.SHUTTER", 15 15 "PPIMAGE.LINEARITY", 16 "PPIMAGE.NEWNONLIN", 16 17 NULL 17 18 }; -
trunk/ppImage/src/ppImageDetrendNonLinear.c
r29833 r42340 1 #ifdef HAVE_CONFIG_H2 #include <config.h>3 #endif4 5 1 #include "ppImage.h" 6 2 -
trunk/ppImage/src/ppImageDetrendReadout.c
r39501 r42340 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 -
trunk/ppImage/src/ppImageDetrendRecord.c
r35612 r42340 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"); -
trunk/ppImage/src/ppImageOptions.c
r41918 r42340 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? -
trunk/ppImage/src/ppImageParseCamera.c
r41894 r42340 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 } 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 } 112 123 } 113 124
Note:
See TracChangeset
for help on using the changeset viewer.
