Changeset 12536 for trunk/psastro/src/psastroMosaicAstrom.c
- Timestamp:
- Mar 21, 2007, 9:30:37 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroMosaicAstrom.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroMosaicAstrom.c
r12492 r12536 4 4 // XXX require this fpa to have multiple chip extensions and a PHU? 5 5 bool psastroMosaicAstrom (pmConfig *config, psArray *refs) { 6 7 bool status;8 6 9 7 // select the current recipe … … 13 11 return false; 14 12 } 15 16 // physical pixel scale in microns per pixel17 double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");18 if (!status) {19 psError(PS_ERR_IO, false, "Failed to lookup pixel scale");20 return false;21 }22 13 23 14 // select the input data sources … … 101 92 if (psTraceGetLevel("psastro.dump") > 0) { psastroDumpMatches (fpa, "match.6.dat"); } 102 93 103 // save WCS and analysis metadata in update header XXX this is still wrong: the pmFPAExtent 104 // function returns the FP dimensions in pixel units relative to the 0,0 corner of chip 105 // 0,0. I need to have a function which loops over all cells, determines the pixel 106 // dimensions for each cell, converts them to chip pixels, then uses the fpa astrometry 107 // structures to get the total dimensions of the fpa in fpa units. equivalent to 108 // pmFPAExtent 109 psRegion *region = pmFPAExtent (fpa); 110 region->x0 *= pixelScale; 111 region->x1 *= pixelScale; 112 region->y0 *= pixelScale; 113 region->y1 *= pixelScale; 114 115 // XXX also need to add DATE/TIME info and NAXIS1, NAXIS2 94 // save WCS and analysis metadata in update header. 116 95 psMetadata *updates = psMetadataAlloc(); 117 psMetadataAddS32 (updates, PS_LIST_TAIL, "NAXIS1", PS_META_REPLACE, "fpa dimensions (mm)", region->x1 - region->x0);118 psMetadataAddS32 (updates, PS_LIST_TAIL, "NAXIS2", PS_META_REPLACE, "fpa dimensions (mm)", region->y1 - region->y0);119 psFree (region);120 121 96 if (!pmAstromWriteBilevelMosaic (updates, fpa, NONLIN_TOL)) { 122 97 psAbort ("failed to save header terms");
Note:
See TracChangeset
for help on using the changeset viewer.
