Changeset 6747 for trunk/ppImage/src/ppImageLoop.c
- Timestamp:
- Mar 31, 2006, 3:24:14 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageLoop.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageLoop.c
r6396 r6747 1 1 #include <stdio.h> 2 2 #include "pslib.h" 3 #include "pmFPA.h" 4 #include "pmFPARead.h" 5 #include "pmChipMosaic.h" 6 #include "pmFPAWrite.h" 3 #include "psmodules.h" 7 4 #include "ppImageDetrend.h" 8 5 #include "ppImage.h" … … 13 10 // Read the entire FPA 14 11 void readFPA(ppFile *file, // File to read 15 p pConfig *config // Configuration, containing the DB handle12 pmConfig *config // Configuration, containing the DB handle 16 13 ) 17 14 { 18 15 if (file->fpa && file->fits) { 19 if (! pmFPARead(file->fpa, file->fits, file->phu, config->database)) { 20 psErrorStackPrint(stderr, "Unable to populate camera from input FITS file\n"); 21 exit(EXIT_FAILURE); 22 } 16 pmFPARead(file->fpa, file->fits, config->database); 23 17 } 24 18 } … … 26 20 // Read a specified chip only 27 21 void readChip(ppFile *file, // File to read 28 p pConfig *config, // Configuration22 pmConfig *config, // Configuration 29 23 int chipNum // Chip number to read 30 24 ) 31 25 { 32 pmFPASelectChip(file->fpa, chipNum); 33 readFPA(file, config); 26 pmFPA *fpa = file->fpa; // The FPA 27 if (fpa && file->fits) { 28 pmChip *chip = fpa->chips->data[chipNum]; // The chip 29 pmChipRead(chip, file->fits, config->database); 30 } 34 31 } 35 32 36 33 37 void readCell(ppFile *file, p pConfig *config, int chipNum, int cellNum)34 void readCell(ppFile *file, pmConfig *config, int chipNum, int cellNum) 38 35 { 39 pmChip *chip = file->fpa->chips->data[chipNum]; 40 pmChipSelectCell(chip, cellNum); 41 readFPA(file, config); 36 pmFPA *fpa = file->fpa; // The FPA 37 if (fpa && file->fits) { 38 pmChip *chip = fpa->chips->data[chipNum]; // The chip 39 if (chip) { 40 pmCell *cell = chip->cells->data[cellNum]; // The cell 41 pmCellRead(cell, file->fits, config->database); 42 } 43 } 42 44 } 43 45 44 46 45 bool ppImageLoop(ppImageData *data, ppImageOptions *options, p pConfig *config)47 bool ppImageLoop(ppImageData *data, ppImageOptions *options, pmConfig *config) 46 48 { 47 49 ppImageDetrend detrend; … … 108 110 } 109 111 112 #if 0 110 113 int numMosaicked = pmChipMosaic(inputChip, 1, 1); // Number of cells mosaicked together 111 114 psLogMsg(__func__, PS_LOG_INFO, "%d cells mosaicked.\n", numMosaicked); 112 113 // XXX EAM: Photometry goes here!114 115 115 116 // XXX A kludge to get the write to behave w.r.t. the concepts --- we've changed the camera format, so … … 117 118 const psMetadata *camera = data->input->fpa->camera; 118 119 data->input->fpa->camera = NULL; 119 pmFPAWrite(data->output, data->input->fpa, config->database); 120 #endif 121 122 // XXX Photometry goes here! 123 124 pmChipWrite(inputChip, data->output, config->database); 125 126 #if 0 120 127 data->input->fpa->camera = camera; 128 #endif 121 129 122 130 // Now I can blow away the mosaic so I can then read more.
Note:
See TracChangeset
for help on using the changeset viewer.
