IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 1, 2007, 12:22:03 PM (19 years ago)
Author:
Paul Price
Message:

Adding error checking on astrometry read.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpDefine.c

    r12826 r13109  
    6565    }
    6666    if (bilevelAstrometry) {
    67         pmAstromReadBilevelMosaic (skycell->fpa, phu->header);
    68         pmAstromReadBilevelChip (chip, hdu->header);
     67        if (!pmAstromReadBilevelMosaic (skycell->fpa, phu->header)) {
     68            psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel mosaic astrometry for skycell.");
     69            psFree(view);
     70            return false;
     71        }
     72        if (!pmAstromReadBilevelChip (chip, hdu->header)) {
     73            psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel chip astrometry for skycell.");
     74            psFree(view);
     75            return false;
     76        }
    6977    } else {
    7078        // we use a default FPA pixel scale of 1.0
    71         pmAstromReadWCS (skycell->fpa, chip, hdu->header, 1.0);
     79        if (!pmAstromReadWCS (skycell->fpa, chip, hdu->header, 1.0)) {
     80            psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for skycell.");
     81            psFree(view);
     82            return false;
     83        }
    7284    }
    7385
Note: See TracChangeset for help on using the changeset viewer.