Changeset 12523 for trunk/pswarp/src/pswarpDataLoad.c
- Timestamp:
- Mar 21, 2007, 12:09:22 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpDataLoad.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpDataLoad.c
r12505 r12523 9 9 bool pswarpDataLoad (pmConfig *config) { 10 10 11 bool status;12 11 pmChip *chip; 13 12 pmCell *cell; 14 13 pmReadout *readout; 15 14 pmFPAview *view; 16 17 // select the current recipe18 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);19 if (!recipe) {20 psError(PSWARP_ERR_CONFIG, false, "Can't find PSASTRO recipe needed for pixel scale!\n");21 return false;22 }23 24 // physical pixel scale in microns per pixel25 double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");26 if (!status) {27 psError(PS_ERR_IO, false, "Failed to lookup pixel scale");28 return false;29 }30 15 31 16 // select the input data sources … … 61 46 view = pmFPAviewAlloc (0); 62 47 48 // XXX need to read only the headers for the skycell 49 // XXX these pmAstromReadBilevel functions seem to be broken 50 63 51 // find the FPA phu 64 // XXX wrap the test below into a function65 // XXX need to read only the headers for the skycell66 // XXX need to optionally load the astrometry datafile67 52 bool bilevelAstrometry = false; 68 53 pmHDU *phu = pmFPAviewThisPHU (view, astrom->fpa); 69 54 if (phu) { 70 char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");71 if (ctype) {72 bilevelAstrometry = !strcmp (&ctype[4], "-DIS");73 }55 char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1"); 56 if (ctype) { 57 bilevelAstrometry = !strcmp (&ctype[4], "-DIS"); 58 } 74 59 } 75 60 if (bilevelAstrometry) { 76 pmAstromReadBilevelMosaic (input->fpa, phu->header, pixelScale);61 pmAstromReadBilevelMosaic (input->fpa, phu->header); 77 62 } 78 63 … … 88 73 pmHDU *hdu = pmFPAviewThisHDU (view, astrom->fpa); 89 74 if (bilevelAstrometry) { 90 pmAstromReadBilevelChip (chip, hdu->header);75 pmAstromReadBilevelChip (chip, hdu->header); 91 76 } else { 92 pmAstromReadWCS (input->fpa, chip, hdu->header, pixelScale); 77 // we use a default FPA pixel scale of 1.0 78 pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0); 93 79 } 94 80
Note:
See TracChangeset
for help on using the changeset viewer.
