Changeset 7639
- Timestamp:
- Jun 22, 2006, 10:38:23 AM (20 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 7 edited
-
ppImage.c (modified) (1 diff)
-
ppImage.h (modified) (1 diff)
-
ppImageAstrom.c (modified) (2 diffs)
-
ppImageCleanup.c (modified) (1 diff)
-
ppImageLoop.c (modified) (5 diffs)
-
ppImageMosaic.c (modified) (1 diff)
-
ppImagePhotom.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImage.c
r7581 r7639 35 35 return EXIT_SUCCESS; 36 36 } 37 38 void ppImageFileCheck (pmConfig *config) { 39 40 // add the output names to the output-type files 41 psMetadataItem *item = NULL; 42 psMetadataIterator *iter = psMetadataIteratorAlloc (config->files, PS_LIST_HEAD, NULL); 43 while ((item = psMetadataGetAndIncrement (iter)) != NULL) { 44 pmFPAfile *file = item->data.V; 45 pmFPA *fpa = file->fpa; 46 fprintf (stderr, "file %s\n", file->name); 47 if (!fpa) { 48 fprintf (stderr, " has no FPA\n"); 49 continue; 50 } 51 if (fpa->hdu) { 52 if (fpa->hdu->images) fprintf (stderr, " (%d,%d) images\n", -1, -1); 53 if (fpa->hdu->weights) fprintf (stderr, " (%d,%d) weights\n", -1, -1); 54 if (fpa->hdu->masks) fprintf (stderr, " (%d,%d) masks\n", -1, -1); 55 if (fpa->hdu->header) fprintf (stderr, " (%d,%d) header\n", -1, -1); 56 continue; 57 } 58 fprintf (stderr, " has no fpa data (%d,%d)\n", -1, -1); 59 for (int i = 0; i < fpa->chips->n; i++) { 60 pmChip *chip = fpa->chips->data[i]; 61 if (chip->hdu) { 62 if (chip->hdu->images) fprintf (stderr, " (%d,%d) images\n", i, -1); 63 if (chip->hdu->weights) fprintf (stderr, " (%d,%d) weights\n", i, -1); 64 if (chip->hdu->masks) fprintf (stderr, " (%d,%d) masks\n", i, -1); 65 if (chip->hdu->header) fprintf (stderr, " (%d,%d) header\n", i, -1); 66 continue; 67 } 68 fprintf (stderr, " has no chip data (%d,%d)\n", i, -1); 69 for (int j = 0; j < chip->cells->n; j++) { 70 pmCell *cell = chip->cells->data[j]; 71 if (cell->hdu) { 72 if (cell->hdu->images) fprintf (stderr, " (%d,%d) images\n", i, j); 73 if (cell->hdu->weights) fprintf (stderr, " (%d,%d) weights\n", i, j); 74 if (cell->hdu->masks) fprintf (stderr, " (%d,%d) masks\n", i, j); 75 if (cell->hdu->header) fprintf (stderr, " (%d,%d) header\n", i, j); 76 continue; 77 } 78 fprintf (stderr, " has no cell data (%d,%d)\n", i, j); 79 } 80 } 81 } 82 psFree (iter); 83 } -
trunk/ppImage/src/ppImage.h
r7621 r7639 43 43 bool ppImageMosaicFPA (pmConfig *config, char *outFile, char *inFile); 44 44 45 void ppImageFileCheck (pmConfig *config); 46 45 47 #endif -
trunk/ppImage/src/ppImageAstrom.c
r7621 r7639 20 20 input->mode = PM_FPA_MODE_REFERENCE; 21 21 22 pmFPAfileDefineOutput (config, input->fpa, "PS PHOT.OUTPUT");22 pmFPAfileDefineOutput (config, input->fpa, "PSASTRO.OUTPUT"); 23 23 } 24 25 psastroConvertFPA (input->fpa, recipe); 24 26 25 27 // interpret the available initial astrometric information … … 39 41 } 40 42 43 psastroDataSave (config); 44 45 psFree (refs); 41 46 return true; 42 47 } -
trunk/ppImage/src/ppImageCleanup.c
r7581 r7639 12 12 pmConfigDone(); 13 13 pmModelGroupCleanup(); 14 //fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage");15 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "ppImage");14 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage"); 15 // fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "ppImage"); 16 16 return; 17 17 } -
trunk/ppImage/src/ppImageLoop.c
r7621 r7639 7 7 pmCell *cell; 8 8 pmReadout *readout; 9 psMemId ID; 9 10 10 11 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PPIMAGE.INPUT"); … … 22 23 psLogMsg ("ppImageLoop", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process); 23 24 if (!chip->process || !chip->file_exists) { continue; } 25 26 ID = psMemGetId(); 24 27 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) return false; 25 28 … … 36 39 // perform the detrend analysis 37 40 if (!ppImageDetrendReadout (config, options, view)) return false; 38 41 39 42 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) return false; 40 43 } … … 50 53 51 54 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) return false; 55 56 fprintf (stderr, "done chip\n"); 57 // fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (ID, NULL, stdout, false), "chips"); 58 // ppImageFileCheck (config); 52 59 } 53 60 … … 57 64 // we perform astrometry on all chips after sources have been detected 58 65 if (options->doAstromChip || options->doAstromMosaic) ppImageAstrom (config); 59 66 60 67 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) return false; 61 68 -
trunk/ppImage/src/ppImageMosaic.c
r7621 r7639 42 42 } 43 43 44 for (int i = 0; i < in->fpa->chips->n; i++) { 45 pmChip *chip = in->fpa->chips->data[i]; 46 for (int j = 0; j < chip->cells->n; j++) { 47 pmCell *cell = chip->cells->data[j]; 48 psMetadataPrint (stdout, cell->concepts, 2); 49 } 50 } 51 44 52 pmFPAview *view = pmFPAviewAlloc (0); 45 53 pmFPAAddSourceFromView (out->fpa, view, out->format); -
trunk/ppImage/src/ppImagePhotom.c
r7621 r7639 31 31 input->mode = PM_FPA_MODE_REFERENCE; 32 32 33 pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.OUTPUT"); 33 pmFPAfile *outfile = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.OUTPUT"); 34 outfile->freeLevel = PM_FPA_LEVEL_FPA; 34 35 } 35 36 … … 80 81 // run the actual photometry analysis 81 82 psphotReadout (config, view); 83 fprintf (stderr, "psphot done\n"); 82 84 } 83 85 }
Note:
See TracChangeset
for help on using the changeset viewer.
