Changeset 6396 for trunk/ppImage/src/ppImageLoop.c
- Timestamp:
- Feb 8, 2006, 4:37:59 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageLoop.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageLoop.c
r6260 r6396 7 7 #include "ppImageDetrend.h" 8 8 #include "ppImage.h" 9 #include "ppMem.h" 9 10 10 11 #define MEM_LEAKS 1 … … 101 102 102 103 // Need to free detrend cells here so we have enough memory to do other stuff 103 #ifndef MEM_LEAKS104 104 psFree(detrend.bias); 105 105 psFree(detrend.dark); 106 106 psFree(detrend.mask); 107 107 psFree(detrend.flat); 108 #endif109 108 } 110 109 … … 114 113 // XXX EAM: Photometry goes here! 115 114 116 // A kludge to get the write to behave wrtthe concepts --- we've changed the camera format, so115 // XXX A kludge to get the write to behave w.r.t. the concepts --- we've changed the camera format, so 117 116 // the concepts don't know what on earth to do. 118 117 const psMetadata *camera = data->input->fpa->camera; … … 122 121 123 122 // Now I can blow away the mosaic so I can then read more. 124 #ifndef MEM_LEAKS 125 pmChipFreeCells(inputChip); 126 #endif 123 psFree(inputChip); 127 124 } 128 129 #if 0130 // Write out the mosaicked chip, just to see; this wouldn't normally happen131 psFits *mosaicFile = psFitsOpen("mosaic.fits", "w");132 for (int i = 0; i < chips->n; i++) {133 pmChip *chip = chips->data[i];134 if (! chip || ! chip->exists || ! chip->process) {135 continue;136 }137 #if 0138 psArray *cells = chip->cells;139 pmCell *cell = cells->data[0];140 psArray *readouts = cell->readouts;141 pmReadout *readout = readouts->data[0];142 psImage *image = readout->image;143 #else144 psImage *image = chip->hdu->images->data[0];145 #endif146 psFitsWriteImage(mosaicFile, NULL, image, 0);147 148 }149 #endif150 151 // Free the detrend FPA and chips152 #ifndef MEM_LEAKS153 psFree(data->bias);154 psFree(data->dark);155 psFree(data->mask);156 psFree(data->flat);157 #endif158 159 psFitsClose(data->output);160 125 161 126 return true; 162 127 } 163 164 /* if we allow per-readout loads, we need to load detrend images here */
Note:
See TracChangeset
for help on using the changeset viewer.
