Changeset 10212
- Timestamp:
- Nov 27, 2006, 6:27:37 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageDetrendReadout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageDetrendReadout.c
r9952 r10212 6 6 #include "ppImageDetrendFringe.h" 7 7 8 bool ppImageDetrendReadout (pmConfig *config, ppImageOptions *options, pmFPAview *view)8 bool ppImageDetrendReadout(pmConfig *config, ppImageOptions *options, pmFPAview *view) 9 9 { 10 10 // construct a view for the detrend images (which have only one readout) 11 pmFPAview *detview = pmFPAviewAlloc (0);11 pmFPAview *detview = pmFPAviewAlloc(0); 12 12 *detview = *view; 13 13 detview->readout = 0; 14 14 15 15 // find the currently selected readout 16 pmReadout *input = pmFPAfileThisReadout (config->files, view, "PPIMAGE.INPUT"); 17 18 // create the target mask and weight images 19 pmReadoutGenerateMaskWeight (input); 16 pmReadout *input = pmFPAfileThisReadout(config->files, view, "PPIMAGE.INPUT"); 20 17 21 18 // apply the externally supplied mask to the input->mask pixels 22 19 if (options->doMask) { 23 pmReadout *mask = pmFPAfileThisReadout (config->files, detview, "PPIMAGE.MASK"); 24 pmMaskBadPixels (input, mask, options->maskValue); 25 // ppImageDetrendMask(input, mask); 20 pmReadout *mask = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.MASK"); 21 pmMaskBadPixels(input, mask, options->maskValue); 26 22 } 27 23 … … 37 33 pmReadout *bias = NULL; 38 34 if (options->doBias) { 39 bias = pmFPAfileThisReadout (config->files, detview, "PPIMAGE.BIAS");35 bias = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.BIAS"); 40 36 } 41 37 if (options->doDark) { 42 dark = pmFPAfileThisReadout (config->files, detview, "PPIMAGE.DARK");38 dark = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.DARK"); 43 39 } 44 40 … … 60 56 // Flat-field correction (no options used?) 61 57 if (options->doFlat) { 62 pmReadout *flat = pmFPAfileThisReadout (config->files, detview, "PPIMAGE.FLAT"); 58 pmReadoutGenerateMaskWeight(input); 59 pmReadout *flat = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.FLAT"); 63 60 if (!pmFlatField(input, flat)) { 64 61 return false; … … 80 77 } 81 78 82 psFree (detview);79 psFree(detview); 83 80 return true; 84 81 }
Note:
See TracChangeset
for help on using the changeset viewer.
