Changeset 12523 for trunk/pswarp/src/pswarpDefine.c
- Timestamp:
- Mar 21, 2007, 12:09:22 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpDefine.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpDefine.c
r12505 r12523 4 4 bool pswarpDefine (pmConfig *config) { 5 5 6 bool status;7 psMetadata *recipe = NULL;8 9 // load the pixel scale from the PSASTRO recipe10 recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);11 if (!recipe) {12 psError(PSWARP_ERR_CONFIG, false, "Can't find PSASTRO recipe needed for pixel scale!\n");13 return false;14 }15 // physical pixel scale in microns per pixel16 double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");17 if (!status) {18 psError(PS_ERR_IO, false, "Failed to lookup pixel scale");19 return false;20 }21 22 6 // load the PSWARP recipe 23 recipe= psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);7 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE); 24 8 if (!recipe) { 25 9 psError(PSWARP_ERR_CONFIG, true, "Can't find PSWARP recipe!\n"); … … 46 30 bool bilevelAstrometry = false; 47 31 if (phu) { 48 char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");49 if (ctype) {50 bilevelAstrometry = !strcmp (&ctype[4], "-DIS");51 }32 char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1"); 33 if (ctype) { 34 bilevelAstrometry = !strcmp (&ctype[4], "-DIS"); 35 } 52 36 } 53 37 if (bilevelAstrometry) { 54 pmAstromReadBilevelMosaic (skycell->fpa, phu->header, pixelScale);55 pmAstromReadBilevelChip (chip, hdu->header);38 pmAstromReadBilevelMosaic (skycell->fpa, phu->header); 39 pmAstromReadBilevelChip (chip, hdu->header); 56 40 } else { 57 pmAstromReadWCS (skycell->fpa, chip, hdu->header, pixelScale); 41 // we use a default FPA pixel scale of 1.0 42 pmAstromReadWCS (skycell->fpa, chip, hdu->header, 1.0); 58 43 } 59 44
Note:
See TracChangeset
for help on using the changeset viewer.
