Changeset 27838 for branches/tap_branches/pswarp/src/pswarpDefine.c
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pswarp/src/pswarpDefine.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/pswarp/src/pswarpDefine.c
r25741 r27838 49 49 { 50 50 if (!pmFPAReadHeaderSet(skycell->fpa, skycell->fits, config)) { 51 psError( PS_ERR_UNKNOWN, false, "Unable to read headers for skycell.");51 psError(psErrorCodeLast(), false, "Unable to read headers for skycell."); 52 52 psFree(view); 53 53 return false; … … 59 59 pmHDU *hdu = pmHDUFromCell(source); ///< HDU for source 60 60 if (!hdu || !hdu->header) { 61 psError(P S_ERR_UNEXPECTED_NULL, false, "Unable to find header for sky cell.");61 psError(PM_ERR_PROG, false, "Unable to find header for sky cell."); 62 62 psFree(view); 63 63 return false; … … 65 65 int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); ///< Number of columns 66 66 int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); ///< Number of rows 67 if ((numCols == 0) || (numRows == 0)) {68 psError(PS _ERR_UNKNOWN, false, "skycell has invalid dimensions %d x %d", numCols, numRows);67 if ((numCols == 0) || (numRows == 0)) { 68 psError(PSWARP_ERR_DATA, false, "skycell has invalid dimensions %d x %d", numCols, numRows); 69 69 psFree(view); 70 70 return false; … … 77 77 psFree(readout); // Drop reference 78 78 79 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.XBIN"); 80 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.YBIN"); 81 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.XSIZE"); 82 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.YSIZE"); 83 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.XPARITY"); 84 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.YPARITY"); 85 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.X0"); 86 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.Y0"); 79 bool status = false; 80 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XBIN"); 81 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YBIN"); 82 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XSIZE"); 83 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YSIZE"); 84 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XPARITY"); 85 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YPARITY"); 86 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.X0"); 87 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.Y0"); 87 88 } 88 89 … … 105 106 if (bilevelAstrometry) { 106 107 if (!pmAstromReadBilevelMosaic(output->fpa, phu->header)) { 107 psError( PS_ERR_UNKNOWN, false, "Unable to read bilevel mosaic astrometry for skycell.");108 psError(psErrorCodeLast(), false, "Unable to read bilevel mosaic astrometry for skycell."); 108 109 psFree(view); 109 110 return false; 110 111 } 111 112 if (!pmAstromReadBilevelChip(outputChip, hdu->header)) { 112 psError( PS_ERR_UNKNOWN, false, "Unable to read bilevel chip astrometry for skycell.");113 psError(psErrorCodeLast(), false, "Unable to read bilevel chip astrometry for skycell."); 113 114 psFree(view); 114 115 return false; … … 117 118 // we use a default FPA pixel scale of 1.0 118 119 if (!pmAstromReadWCS(output->fpa, outputChip, hdu->header, 1.0)) { 119 psError( PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for skycell.");120 psError(psErrorCodeLast(), false, "Unable to read WCS astrometry for skycell."); 120 121 psFree(view); 121 122 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
