Changeset 19873 for trunk/pswarp/src/pswarpLoop.c
- Timestamp:
- Oct 2, 2008, 3:49:49 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoop.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r18924 r19873 288 288 psFree(cells); 289 289 290 psRegion *trimsec = psMetadataLookupPtr(NULL, outCell->concepts, "CELL.TRIMSEC"); // Trim section 291 trimsec->x0 = trimsec->x1 = trimsec->y0 = trimsec->y1 = 0; // All pixels 292 290 293 if (!psMetadataCopy(outFPA->concepts, input->fpa->concepts)) { 291 294 psError(PS_ERR_UNKNOWN, false, "Unable to copy FPA concepts from input to output."); 292 295 psFree(stats); 293 296 psFree(view); 297 return false; 298 } 299 300 pmHDU *hdu = outFPA->hdu; // HDU for the output warped image 301 302 // Copy header from target 303 { 304 pmFPAview *skyView = pmFPAviewAlloc(0); // View into skycell 305 skyView->chip = skyView->cell = 0; 306 pmCell *cell = pmFPAfileThisCell(config->files, skyView, "PSWARP.SKYCELL"); // Skycell cell 307 pmHDU *skyHDU = pmHDUFromCell(cell); // HDU 308 if (!skyHDU) { 309 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find skycell HDU."); 310 psFree(skyView); 311 psFree(view); 312 return false; 313 } 314 hdu->header = psMetadataCopy(hdu->header, skyHDU->header); 315 } 316 317 if (!pmAstromWriteWCS(hdu->header, outFPA, outChip, WCS_NONLIN_TOL)) { 318 psError(PS_ERR_UNKNOWN, false, "Unable to generate WCS header."); 319 psFree(stats); 294 320 return false; 295 321 } … … 345 371 psWarning("Unable to perform statistics on warped image."); 346 372 } 347 }348 349 pmHDU *hdu = outFPA->hdu; // HDU for the output warped image350 if (!hdu->header) {351 hdu->header = psMetadataAlloc();352 }353 354 if (!pmAstromWriteWCS(hdu->header, outFPA, outChip, WCS_NONLIN_TOL)) {355 psError(PS_ERR_UNKNOWN, false, "Unable to generate WCS header.");356 psFree(stats);357 return false;358 373 } 359 374
Note:
See TracChangeset
for help on using the changeset viewer.
