Changeset 28948
- Timestamp:
- Aug 17, 2010, 6:39:14 PM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/ppSub/src
- Files:
-
- 2 edited
-
ppSubBackground.c (modified) (1 diff)
-
ppSubLoop.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/ppSub/src/ppSubBackground.c
r26982 r28948 67 67 for (int y = 0; y < numRows; y++) { 68 68 for (int x = 0; x < numCols; x++) { 69 // special case 1: NAN the masked pixels 69 70 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskBad) { 70 image->data.F32[y][x] = 0.0; 71 } else { 72 float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value 73 if (!isfinite(value)) { 74 image->data.F32[y][x] = NAN; 75 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad; 76 } else { 77 image->data.F32[y][x] -= value; 78 } 79 } 71 image->data.F32[y][x] = NAN; 72 continue; 73 } 74 // special case 1: NAN & mask pixels without a valid background model 75 float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value 76 if (!isfinite(value)) { 77 image->data.F32[y][x] = NAN; 78 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad; 79 continue; 80 } 81 image->data.F32[y][x] -= value; 80 82 } 81 83 } -
branches/eam_branches/ipp-20100621/ppSub/src/ppSubLoop.c
r28121 r28948 17 17 #include <pslib.h> 18 18 #include <psmodules.h> 19 #include <psphot.h> 19 20 20 21 #include "ppSub.h" 22 23 bool dumpout(pmConfig *config, char *name) 24 { 25 pmFPAview *view = ppSubViewReadout(); // View to readout 26 pmReadout *out = pmFPAfileThisReadout(config->files, view, "PPSUB.OUTPUT"); 27 psphotSaveImage (NULL, out->image, name); 28 return true; 29 } 30 21 31 22 32 bool ppSubLoop(ppSubData *data) … … 105 115 return false; 106 116 } 117 // dumpout(config, "diff.1.fits"); 107 118 108 119 // Close convolved files … … 111 122 return false; 112 123 } 124 // dumpout(config, "diff.2a.fits"); 113 125 114 126 // Higher order background subtraction using psphot … … 117 129 return false; 118 130 } 131 // dumpout(config, "diff.2b.fits"); 119 132 120 133 // Perform Variance correction (rescale within a modest range) … … 123 136 return false; 124 137 } 138 // dumpout(config, "diff.2c.fits"); 125 139 126 140 if (data->quality) { … … 138 152 return false; 139 153 } 154 // dumpout(config, "diff.3.fits"); 140 155 141 156 if (!ppSubFilesIterateUp(config, PPSUB_FILES_PHOT_SUB)) { … … 157 172 } 158 173 } 174 // dumpout(config, "diff.4.fits"); 159 175 160 176 // generate the binned image used to write the jpeg … … 204 220 } else { 205 221 // Close subtraction files 222 // dumpout(config, "diff.5.fits"); 206 223 if (!ppSubFilesIterateUp(config, PPSUB_FILES_SUB)) { 207 224 psError(PPSUB_ERR_IO, false, "Unable to close subtraction files.");
Note:
See TracChangeset
for help on using the changeset viewer.
