Changeset 6125 for trunk/ppImage/src/ppImageLoop.c
- Timestamp:
- Jan 21, 2006, 12:29:48 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageLoop.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageLoop.c
r6114 r6125 1 1 # include "ppImage.h" 2 3 psMemId ppMemPrint(const psMemBlock *ptr) 4 { 5 psLogMsg(__func__, PS_LOG_INFO, 6 "Memory block %d (%ld):\n" 7 "\tFile %s, line %d, size %d\n" 8 "\tPosts: %lx %lx %lx\n", 9 ptr->id, ptr->refCounter, ptr->file, ptr->lineno, ptr->userMemorySize, ptr->startblock, 10 ptr->endblock, *(void**)((int8_t *)(ptr + 1) + ptr->userMemorySize)); 11 return 0; 12 } 2 13 3 14 // Read the entire FPA … … 51 62 psArray *chips = data->input->fpa->chips; // Component chips 52 63 for (int i = 0; i < chips->n; i++) { 64 65 if (i > 6) { 66 continue; 67 } 68 53 69 if (processChip >= 0 && i != processChip) { 54 70 continue; … … 100 116 psLogMsg(__func__, PS_LOG_INFO, "%d cells mosaicked.\n", numMosaicked); 101 117 118 // XXX EAM: Photometry goes here! 119 120 // A kludge to get the write to behave wrt the concepts 121 const psMetadata *camera = data->input->fpa->camera; 122 data->input->fpa->camera = NULL; 123 pmFPAWrite(data->output, data->input->fpa, config->database); 124 data->input->fpa->camera = camera; 125 126 // Now I can blow away the mosaic so I can then read more. 127 psFree(chips->data[i]); 128 ppMemPrint((psMemBlock*)chips->data[i]-1); 102 129 } 130 131 #if 0 132 // Write out the mosaicked chip, just to see; this wouldn't normally happen 133 psFits *mosaicFile = psFitsOpen("mosaic.fits", "w"); 134 for (int i = 0; i < chips->n; i++) { 135 pmChip *chip = chips->data[i]; 136 if (! chip || ! chip->exists || ! chip->process) { 137 continue; 138 } 139 #if 0 140 psArray *cells = chip->cells; 141 pmCell *cell = cells->data[0]; 142 psArray *readouts = cell->readouts; 143 pmReadout *readout = readouts->data[0]; 144 psImage *image = readout->image; 145 #else 146 psImage *image = chip->hdu->images->data[0]; 147 #endif 148 psFitsWriteImage(mosaicFile, NULL, image, 0); 149 150 } 151 #endif 103 152 104 153 // Free the detrend FPA and chips … … 108 157 psFree(data->flat); 109 158 159 psFitsClose(data->output); 110 160 111 161 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
