Changeset 13901
- Timestamp:
- Jun 19, 2007, 4:49:08 PM (19 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 8 edited
-
ppImage.c (modified) (6 diffs)
-
ppImage.h (modified) (1 diff)
-
ppImageLoop.c (modified) (15 diffs)
-
ppImageMosaic.c (modified) (3 diffs)
-
ppImageOptions.c (modified) (3 diffs)
-
ppImageOptions.h (modified) (1 diff)
-
ppImageParseCamera.c (modified) (10 diffs)
-
ppImagePhotom.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImage.c
r13843 r13901 18 18 if (config == NULL) { 19 19 psErrorStackPrint(stderr, "Unable to parse command-line arguments."); 20 ppImageCleanup(config, NULL); 20 21 exit(PS_EXIT_CONFIG_ERROR); 21 22 } … … 26 27 if (options == NULL) { 27 28 psErrorStackPrint(stderr, "Unable to parse camera."); 29 ppImageCleanup(config, options); 28 30 exit(PS_EXIT_CONFIG_ERROR); 29 31 } … … 32 34 if (!ppImageLoop(config, options)) { 33 35 psErrorStackPrint(stderr, "Unable to loop over input"); 36 ppImageCleanup(config, options); 34 37 exit(PS_EXIT_SYS_ERROR); 35 38 } … … 62 65 if (fpa->hdu->header) fprintf (stderr, " (%d,%d) header\n", -1, -1); 63 66 } else { 64 // fprintf (stderr, " has no fpa data (%d,%d)\n", -1, -1);65 }67 // fprintf (stderr, " has no fpa data (%d,%d)\n", -1, -1); 68 } 66 69 for (int i = 0; i < fpa->chips->n; i++) { 67 70 pmChip *chip = fpa->chips->data[i]; … … 72 75 if (chip->hdu->header) fprintf (stderr, " (%d,%d) header\n", i, -1); 73 76 } else { 74 // fprintf (stderr, " has no chip data (%d,%d)\n", i, -1);75 }77 // fprintf (stderr, " has no chip data (%d,%d)\n", i, -1); 78 } 76 79 for (int j = 0; j < chip->cells->n; j++) { 77 80 pmCell *cell = chip->cells->data[j]; … … 82 85 if (cell->hdu->header) fprintf (stderr, " (%d,%d) header\n", i, j); 83 86 } else { 84 // fprintf (stderr, " has no cell data (%d,%d)\n", i, j);85 }86 for (int k = 0; k < cell->readouts->n; k++) {87 pmReadout *readout = cell->readouts->data[k];88 if (readout) {89 if (readout->image) fprintf (stderr, " (%d,%d,%d) image\n", i, j, k);90 if (readout->weight) fprintf (stderr, " (%d,%d,%d) weight\n", i, j, k);91 if (readout->mask) fprintf (stderr, " (%d,%d,%d) masks\n", i, j, k);92 }93 }87 // fprintf (stderr, " has no cell data (%d,%d)\n", i, j); 88 } 89 for (int k = 0; k < cell->readouts->n; k++) { 90 pmReadout *readout = cell->readouts->data[k]; 91 if (readout) { 92 if (readout->image) fprintf (stderr, " (%d,%d,%d) image\n", i, j, k); 93 if (readout->weight) fprintf (stderr, " (%d,%d,%d) weight\n", i, j, k); 94 if (readout->mask) fprintf (stderr, " (%d,%d,%d) masks\n", i, j, k); 95 } 96 } 94 97 } 95 98 } -
trunk/ppImage/src/ppImage.h
r13562 r13901 48 48 bool ppImageAddstar (pmConfig *config); 49 49 50 bool ppImageMosaicChip (pmConfig *config, const pmFPAview *view, char *outFile, char *inFile); 51 bool ppImageMosaicFPA (pmConfig *config, char *outFile, char *inFile); 50 bool ppImageMosaicChip (pmConfig *config, const ppImageOptions *options, const pmFPAview *view, 51 const char *outFile, const char *inFile); 52 bool ppImageMosaicFPA (pmConfig *config, const ppImageOptions *options, 53 const char *outFile, const char *inFile); 52 54 53 55 void ppImageFileCheck (pmConfig *config); -
trunk/ppImage/src/ppImageLoop.c
r13837 r13901 27 27 return false; 28 28 } 29 stats = psMetadataAlloc();29 stats = psMetadataAlloc(); 30 30 psFree(resolved); 31 31 } … … 34 34 if (!status) { 35 35 psErrorStackPrint(stderr, "Can't find input data!\n"); 36 exit(EXIT_FAILURE); 36 ppImageCleanup(config, options); 37 exit(PS_EXIT_PROG_ERROR); 37 38 } 38 39 … … 42 43 // files associated with the science image 43 44 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 44 psFree (view);45 psFree (view); 45 46 return false; 46 47 } … … 53 54 54 55 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 55 psFree (view);56 psFree (view); 56 57 return false; 57 58 } … … 63 64 } 64 65 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 65 psFree (view);66 psFree (view); 66 67 return false; 67 68 } … … 78 79 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 79 80 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 80 psFree (view);81 psFree (view); 81 82 return false; 82 83 } … … 88 89 if (!ppImageDetrendReadout(config, options, view)) { 89 90 psError(PS_ERR_UNKNOWN, false, "Unable to detrend readout.\n"); 90 psFree (view);91 psFree (view); 91 92 return false; 92 93 } … … 99 100 pmChip *fringe = pmFPAfileThisChip(config->files, view, "PPIMAGE.FRINGE"); 100 101 if (!ppImageDetrendFringeSolve(chip, fringe, options)) { 101 psFree (view);102 psFree (view); 102 103 return false; 103 104 } … … 116 117 pmCell *fringeCell = pmFPAfileThisCell(config->files, view, "PPIMAGE.FRINGE"); 117 118 if (!ppImageDetrendFringeGenerate(cell, fringeCell)) { 118 psFree (view);119 psFree (view); 119 120 return false; 120 121 } … … 127 128 if (!mdok || !output) { 128 129 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find file PPIMAGE.OUTPUT.\n"); 129 psFree (view);130 return false; 131 } 132 133 if (!ppStats(stats, 134 output->fpa, 135 view,136 options->satMask | options->badMask | options->maskValue,137 config)) {130 psFree (view); 131 return false; 132 } 133 134 if (!ppStats(stats, 135 output->fpa, 136 view, 137 options->satMask | options->badMask | options->maskValue, 138 config)) { 138 139 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to generate stats for image.\n"); 139 psFree (stats);140 psFree (view);141 return false; 142 } 143 } 144 140 psFree (stats); 141 psFree (view); 142 return false; 143 } 144 } 145 145 146 // Add MD5 information for cell 146 147 pmHDU *hdu = pmHDUFromCell(cell); // HDU that owns the cell … … 162 163 } 163 164 164 if (!ppImageMosaicChip(config, view, "PPIMAGE.OUTPUT.CHIP", "PPIMAGE.OUTPUT")) {165 if (!ppImageMosaicChip(config, options, view, "PPIMAGE.CHIP", "PPIMAGE.OUTPUT")) { 165 166 psError(PS_ERR_UNKNOWN, false, "Unable to mosaic chip.\n"); 166 psFree (view);167 psFree (view); 167 168 return false; 168 169 } 169 170 if (!ppImageRebinChip(config, view, "PPIMAGE.BIN1")) { 170 171 psError(PS_ERR_UNKNOWN, false, "Unable to bin chip.\n"); 171 psFree (view);172 psFree (view); 172 173 return false; 173 174 } 174 175 if (!ppImageRebinChip(config, view, "PPIMAGE.BIN2")) { 175 176 psError(PS_ERR_UNKNOWN, false, "Unable to bin chip.\n"); 176 psFree (view);177 psFree (view); 177 178 return false; 178 179 } … … 181 182 if (options->doPhotom) { 182 183 if (!ppImagePhotom(config, view)) { 183 psError(PS_ERR_UNKNOWN, false, "error running photometry.\n");184 psFree (view);185 return false;186 }184 psError(PS_ERR_UNKNOWN, false, "error running photometry.\n"); 185 psFree (view); 186 return false; 187 } 187 188 } 188 189 … … 195 196 196 197 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) { 197 psFree(view);198 psFree(view); 198 199 return false; 199 200 } … … 202 203 // Close chip 203 204 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) { 204 psFree(view);205 psFree(view); 205 206 return false; 206 207 } … … 221 222 222 223 // XXX an optional full-scale FPA mosaic could happen here 223 // it would require us to NOT free PPIMAGE. OUTPUT.CHIP until here224 // ppImageMosaicFPA (config, "PPIMAGE.OUTPUT.FPA", "PPIMAGE. OUTPUT.CHIP");225 ppImageMosaicFPA(config, "PPIMAGE.OUTPUT.FPA1", "PPIMAGE.BIN1");226 ppImageMosaicFPA(config, "PPIMAGE.OUTPUT.FPA2", "PPIMAGE.BIN2");224 // it would require us to NOT free PPIMAGE.CHIP until here 225 // ppImageMosaicFPA (config, "PPIMAGE.OUTPUT.FPA", "PPIMAGE.CHIP"); 226 ppImageMosaicFPA(config, options, "PPIMAGE.OUTPUT.FPA1", "PPIMAGE.BIN1"); 227 ppImageMosaicFPA(config, options, "PPIMAGE.OUTPUT.FPA2", "PPIMAGE.BIN2"); 227 228 228 229 // we perform astrometry on all chips after sources have been detected 229 230 if (options->doAstromChip || options->doAstromMosaic) { 230 231 if (!ppImageAstrom(config)) { 231 psError(PS_ERR_UNKNOWN, false, "error running astrometry.\n");232 psFree(view);233 return false;234 }232 psError(PS_ERR_UNKNOWN, false, "error running astrometry.\n"); 233 psFree(view); 234 return false; 235 } 235 236 } 236 237 237 238 // Close FPA 238 239 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) { 239 psFree(view);240 psFree(view); 240 241 return false; 241 242 } -
trunk/ppImage/src/ppImageMosaic.c
r12818 r13901 5 5 #include "ppImage.h" 6 6 7 bool ppImageMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile) 7 bool ppImageMosaicChip(pmConfig *config, const ppImageOptions *options, const pmFPAview *view, 8 const char *outFile, const char *inFile) 8 9 { 9 10 bool status; // Status of MD lookup … … 31 32 in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin); 32 33 33 // XXX mosaic the chip, making a deep copy. this has the side effect of making the 34 // XXX mosaic the chip, making a deep copy. this has the side effect of making the 34 35 // output image products pure trimmed images, but also increases the memory footprint. 35 status = pmChipMosaic(outChip, inChip, true );36 status = pmChipMosaic(outChip, inChip, true, options->blankMask); 36 37 return status; 37 38 } 38 39 39 bool ppImageMosaicFPA (pmConfig *config, char *outFile, char *inFile) 40 bool ppImageMosaicFPA (pmConfig *config, const ppImageOptions *options, const char *outFile, 41 const char *inFile) 40 42 { 41 43 bool status; // Status of MD lookup … … 72 74 psTrace ("pmFPAMosaic", 5, "mosaic fpa %s to %s (xbin,ybin: %d,%d to %d,%d)\n", 73 75 in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin); 74 return pmFPAMosaic(out->fpa, in->fpa, false );76 return pmFPAMosaic(out->fpa, in->fpa, false, options->blankMask); 75 77 } -
trunk/ppImage/src/ppImageOptions.c
r13761 r13901 28 28 options->badMask = 0x00; // Bad pixels 29 29 options->flatMask = 0x00; // Bad flat pixels 30 options->blankMask = 0x00; // Blank (no data, cell gap) pixels 30 31 31 32 options->doNonLin = false; // Non-linearity correction … … 147 148 148 149 // What method do we use to measure the overscan statistics? 149 // XXX allow user to specify psStats types by name150 // XXX allow user to specify psStats types by name 150 151 psStats *overscanStats = NULL; // Statistics for overscan 151 152 psString stat = psMetadataLookupStr(NULL, recipe, "OVERSCAN.STAT"); … … 175 176 options->badMask = pmConfigMask("BAD", config); 176 177 options->flatMask = pmConfigMask("FLAT", config); 177 178 options->blankMask = pmConfigMask("BLANK", config); 178 179 179 180 options->doBias = psMetadataLookupBool(NULL, recipe, "BIAS"); -
trunk/ppImage/src/ppImageOptions.h
r13593 r13901 9 9 psMaskType badMask; // Mask value to give bad pixels 10 10 psMaskType flatMask; // Mask value to give bad flat pixels 11 psMaskType blankMask; // Mask value to give blank pixels 11 12 12 13 bool doBias; // Bias subtraction -
trunk/ppImage/src/ppImageParseCamera.c
r13844 r13901 24 24 pmFPAfile *inputMask = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.MASK", "INPUT.MASK"); 25 25 if (!status) { 26 psError (PS_ERR_UNKNOWN, false, "failed to load find definition");27 return NULL;26 psError (PS_ERR_UNKNOWN, false, "failed to load find definition"); 27 return NULL; 28 28 } 29 29 if (inputMask && inputMask->type != PM_FPA_FILE_MASK) { … … 34 34 pmFPAfile *inputWeight = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.WEIGHT", "INPUT.WEIGHT"); 35 35 if (!status) { 36 psError (PS_ERR_UNKNOWN, false, "failed to load find definition");37 return NULL;36 psError (PS_ERR_UNKNOWN, false, "failed to load find definition"); 37 return NULL; 38 38 } 39 39 if (inputWeight && inputWeight->type != PM_FPA_FILE_WEIGHT) { … … 52 52 // not all input or output images are used in a given recipe 53 53 if (options->doBias) { 54 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS)) {55 psError (PS_ERR_IO, false, "Can't find a bias image source");56 psFree (options);57 return NULL;58 }54 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS)) { 55 psError (PS_ERR_IO, false, "Can't find a bias image source"); 56 psFree (options); 57 return NULL; 58 } 59 59 } 60 60 if (options->doDark) { 61 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) {62 psError (PS_ERR_IO, false, "Can't find a dark image source");63 psFree (options);64 return NULL;65 }61 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) { 62 psError (PS_ERR_IO, false, "Can't find a dark image source"); 63 psFree (options); 64 return NULL; 65 } 66 66 } 67 67 if (options->doMask) { 68 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) {69 psError (PS_ERR_IO, false, "Can't find a mask image source");70 psFree (options);71 return NULL;72 }68 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) { 69 psError (PS_ERR_IO, false, "Can't find a mask image source"); 70 psFree (options); 71 return NULL; 72 } 73 73 } 74 74 if (options->doShutter) { 75 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.SHUTTER", "SHUTTER", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_SHUTTER)) {76 psError (PS_ERR_IO, false, "Can't find a flat image source");77 psFree (options);78 return NULL;79 }75 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.SHUTTER", "SHUTTER", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_SHUTTER)) { 76 psError (PS_ERR_IO, false, "Can't find a flat image source"); 77 psFree (options); 78 return NULL; 79 } 80 80 } 81 81 82 82 if (options->doFlat) { 83 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_FLAT)) {84 psError (PS_ERR_IO, false, "Can't find a shutter image source");85 psFree (options);86 return NULL;87 }83 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_FLAT)) { 84 psError (PS_ERR_IO, false, "Can't find a shutter image source"); 85 psFree (options); 86 return NULL; 87 } 88 88 } 89 89 … … 136 136 skip_fringe: 137 137 if (options->doFringe) { 138 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FRINGE", "FRINGE", PM_FPA_FILE_FRINGE, PM_DETREND_TYPE_FRINGE)) {139 psError (PS_ERR_IO, false, "Can't find a fringe image source");140 return NULL;141 }138 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FRINGE", "FRINGE", PM_FPA_FILE_FRINGE, PM_DETREND_TYPE_FRINGE)) { 139 psError (PS_ERR_IO, false, "Can't find a fringe image source"); 140 return NULL; 141 } 142 142 } 143 143 … … 178 178 179 179 // XXX should these be bound explicitly to the output->fpa rather than the input->fpa? 180 pmFPAfile *byChip = pmFPAfileDefineChipMosaic(config, input->fpa, "PPIMAGE.OUTPUT.CHIP"); 181 if (!byChip) { 182 psError(PS_ERR_IO, false, _("Unable to generate new file from PPIMAGE.OUTPUT.CHIP")); 183 psFree(options); 184 return NULL; 185 } 186 if (byChip->type != PM_FPA_FILE_IMAGE) { 187 psError(PS_ERR_IO, true, "PPIMAGE.OUTPUT.CHIP is not of type IMAGE"); 188 psFree(options); 189 return NULL; 190 } 180 pmFPAfile *chipImage = pmFPAfileDefineChipMosaic(config, input->fpa, "PPIMAGE.CHIP"); 181 if (!chipImage) { 182 psError(PS_ERR_IO, false, _("Unable to generate new file from PPIMAGE.CHIP")); 183 psFree(options); 184 return NULL; 185 } 186 if (chipImage->type != PM_FPA_FILE_IMAGE) { 187 psError(PS_ERR_IO, true, "PPIMAGE.CHIP is not of type IMAGE"); 188 psFree(options); 189 return NULL; 190 } 191 pmFPAfile *chipMask = pmFPAfileDefineOutput(config, chipImage->fpa, "PPIMAGE.CHIP.MASK"); 192 if (!chipMask) { 193 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHIP.MASK")); 194 psFree(options); 195 return NULL; 196 } 197 if (chipMask->type != PM_FPA_FILE_MASK) { 198 psError(PS_ERR_IO, true, "PPIMAGE.CHIP.MASK is not of type MASK"); 199 psFree(options); 200 return NULL; 201 } 202 pmFPAfile *chipWeight = pmFPAfileDefineOutput(config, chipImage->fpa, "PPIMAGE.CHIP.WEIGHT"); 203 if (!chipWeight) { 204 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHIP.WEIGHT")); 205 psFree(options); 206 return NULL; 207 } 208 if (chipWeight->type != PM_FPA_FILE_WEIGHT) { 209 psError(PS_ERR_IO, true, "PPIMAGE.CHIP.WEIGHT is not of type WEIGHT"); 210 psFree(options); 211 return NULL; 212 } 213 191 214 pmFPAfile *byFPA1 = pmFPAfileDefineFPAMosaic(config, input->fpa, "PPIMAGE.OUTPUT.FPA1"); 192 215 if (!byFPA1) { … … 215 238 // we create a copy of the mosaicked image for psphot so we can write out a clean image 216 239 if (options->doPhotom) { 217 pmFPAfile *psphotInput = pmFPAfileDefineFromFPA (config, byChip->fpa, 1, 1, "PSPHOT.INPUT");240 pmFPAfile *psphotInput = pmFPAfileDefineFromFPA (config, chipImage->fpa, 1, 1, "PSPHOT.INPUT"); 218 241 PS_ASSERT (psphotInput, false); 219 242 … … 251 274 252 275 // save any of these files? 253 output->save = o ptions->BaseFITS;254 byChip->save = options->ChipFITS;276 output->save = outMask->save = outWeight->save = options->BaseFITS; 277 chipImage->save = chipMask->save = chipWeight->save = options->ChipFITS; 255 278 byFPA1->save = options->FPA1FITS; 256 279 byFPA2->save = options->FPA2FITS; 257 280 258 // output is used as a carrier: input to byChip-> require the data to remain at the CHIP level281 // output is used as a carrier: input to chipImage -> require the data to remain at the CHIP level 259 282 output->freeLevel = PS_MIN (output->freeLevel, PM_FPA_LEVEL_CHIP); 260 283 output->dataLevel = output->freeLevel; … … 267 290 outWeight->dataLevel = output->dataLevel; 268 291 292 // Ditto for the chip-mosaicked version 293 chipMask->freeLevel = chipImage->freeLevel; 294 chipWeight->freeLevel = chipImage->freeLevel; 295 chipMask->dataLevel = chipImage->dataLevel; 296 chipWeight->dataLevel = chipImage->dataLevel; 297 269 298 // the input data is the same as the output data : force the free levels to match 270 299 input->freeLevel = PS_MIN (output->freeLevel, input->freeLevel); 271 300 272 301 // define the binned target files (which may just be carriers for some camera configurations) 273 pmFPAfile *bin1 = pmFPAfileDefineFromFPA (config, byChip->fpa, options->xBin1, options->yBin1, "PPIMAGE.BIN1");302 pmFPAfile *bin1 = pmFPAfileDefineFromFPA (config, chipImage->fpa, options->xBin1, options->yBin1, "PPIMAGE.BIN1"); 274 303 if (!bin1) { 275 304 psError(PS_ERR_IO, false, _("Unable to generate new file from PPIMAGE.BIN1")); … … 283 312 } 284 313 285 pmFPAfile *bin2 = pmFPAfileDefineFromFPA (config, byChip->fpa, options->xBin2, options->yBin2, "PPIMAGE.BIN2");314 pmFPAfile *bin2 = pmFPAfileDefineFromFPA (config, chipImage->fpa, options->xBin2, options->yBin2, "PPIMAGE.BIN2"); 286 315 if (!bin2) { 287 316 psError(PS_ERR_IO, false, _("Unable to generate new file from PPIMAGE.BIN2")); … … 354 383 outMask->save = false; 355 384 outWeight->save = false; 385 chipMask->save = false; 386 chipWeight->save = false; 356 387 } 357 388 -
trunk/ppImage/src/ppImagePhotom.c
r13838 r13901 17 17 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT"); 18 18 if (!status) { 19 psError(PSPHOT_ERR_CONFIG, false, "PSPHOT.INPUT I/O file is not defined");20 return false;19 psError(PSPHOT_ERR_CONFIG, false, "PSPHOT.INPUT I/O file is not defined"); 20 return false; 21 21 } 22 22 … … 28 28 // iterate over the cells and readout for this chip 29 29 while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) { 30 psLogMsg ("ppImagePhotom", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);31 if (! cell->process || ! cell->file_exists) { continue; }30 psLogMsg ("ppImagePhotom", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process); 31 if (! cell->process || ! cell->file_exists) { continue; } 32 32 33 // process each of the readouts34 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {35 if (! readout->data_exists) { continue; }33 // process each of the readouts 34 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 35 if (! readout->data_exists) { continue; } 36 36 37 // run the actual photometry analysis38 if (!psphotReadout (config, view)) {39 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout);40 return false;41 }42 }37 // run the actual photometry analysis 38 if (!psphotReadout (config, view)) { 39 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 40 return false; 41 } 42 } 43 43 } 44 44 45 // the PSPHOT.INPUT file is a temporary file used to carry PPIMAGE. OUTPUT.CHIP to psphotReadout45 // the PSPHOT.INPUT file is a temporary file used to carry PPIMAGE.CHIP to psphotReadout 46 46 // XXX not sure that this is needed... 47 47 pmFPAfileActivate (config->files, false, "PSPHOT.INPUT");
Note:
See TracChangeset
for help on using the changeset viewer.
