- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pswarp/src/pswarpDefine.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/pswarp/src/pswarpDefine.c
r21323 r27840 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(PSWARP_ERR_DATA, false, "skycell has invalid dimensions %d x %d", numCols, numRows); 69 psFree(view); 70 return false; 71 } 67 72 68 73 pmCell *target = pmFPAviewThisCell(view, output->fpa); ///< Target cell … … 72 77 psFree(readout); // Drop reference 73 78 74 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.XBIN"); 75 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.YBIN"); 76 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.XSIZE"); 77 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.YSIZE"); 78 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.XPARITY"); 79 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.YPARITY"); 80 psMetadataItemSupplement(target->concepts, source->concepts, "CELL.X0"); 81 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"); 82 88 } 83 89 … … 100 106 if (bilevelAstrometry) { 101 107 if (!pmAstromReadBilevelMosaic(output->fpa, phu->header)) { 102 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."); 103 109 psFree(view); 104 110 return false; 105 111 } 106 112 if (!pmAstromReadBilevelChip(outputChip, hdu->header)) { 107 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."); 108 114 psFree(view); 109 115 return false; … … 112 118 // we use a default FPA pixel scale of 1.0 113 119 if (!pmAstromReadWCS(output->fpa, outputChip, hdu->header, 1.0)) { 114 psError( PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for skycell.");120 psError(psErrorCodeLast(), false, "Unable to read WCS astrometry for skycell."); 115 121 psFree(view); 116 122 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
