- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/magic
- Property svn:ignore
-
old new 1 1 magic 2 2 ssa-core-cpp 3 Makefile4 3 Makefile.bak
-
- Property svn:ignore
-
branches/simtest_nebulous_branches/magic/censorObjects/src/censorLoop.c
r24714 r27840 22 22 */ 23 23 bool censorLoop (pmConfig *config) { 24 25 24 pmChip *chip; 26 25 pmCell *cell; … … 28 27 29 28 psTimerStart ("censor"); 29 30 31 30 32 31 33 // select the current recipe … … 51 53 52 54 pmFPAview *view = pmFPAviewAlloc (0); 55 53 56 bool badMaskFile = false; 54 57 … … 59 62 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE; 60 63 64 // check PHU header to see if we are using mosaic-level or per-chip astrometry 65 bool bilevelAstrometry = false; 66 pmHDU *phu = pmFPAviewThisPHU (view, input->fpa); 67 if (phu) { 68 char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1"); 69 if (ctype) bilevelAstrometry = !strcmp (&ctype[4], "-DIS"); 70 } 71 if (bilevelAstrometry) { 72 pmAstromReadBilevelMosaic (input->fpa, phu->header); 73 } 74 61 75 while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) { 62 76 psTrace ("censor", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process); 63 77 if (!chip->process || !chip->file_exists) { continue; } 64 78 65 79 // check on the mask file at this level if possible 66 80 badMaskFile = censorBadFileByView(badMaskFile, inMask, config, view); 67 81 68 82 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE; 83 84 // read WCS data from the corresponding header 85 86 pmHDU *hdu = pmFPAviewThisHDU (view, input->fpa); 87 88 if (bilevelAstrometry) { 89 if (!pmAstromReadBilevelChip (chip, hdu->header)) { 90 psWarning("Could not get WCS information from header for chip %d, skipping", view->chip); 91 continue; 92 } 93 } else { 94 if (!pmAstromReadWCS(input->fpa, chip, hdu->header, 1.0)) { 95 psWarning( "Unable to read WCS astrometry from chip %d, skipping", view->chip); 96 continue; 97 } 98 } 69 99 70 100 while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.
