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/pswarpDataLoad.c

    r12771 r13109  
    6060    }
    6161    if (bilevelAstrometry) {
    62         pmAstromReadBilevelMosaic (input->fpa, phu->header);
     62        if (!pmAstromReadBilevelMosaic(input->fpa, phu->header)) {
     63            psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel mosaic astrometry for input FPA.");
     64            psFree(view);
     65            return false;
     66        }
    6367    }
    6468
     
    7478        pmHDU *hdu = pmFPAviewThisHDU (view, astrom->fpa);
    7579        if (bilevelAstrometry) {
    76             pmAstromReadBilevelChip (chip, hdu->header);
     80            if (!pmAstromReadBilevelChip (chip, hdu->header)) {
     81                psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel chip astrometry for input FPA.");
     82                psFree(view);
     83                return false;
     84            }
    7785        } else {
    7886            // we use a default FPA pixel scale of 1.0
    79             pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0);
     87            if (!pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0)) {
     88                psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for input FPA.");
     89                psFree(view);
     90                return false;
     91            }
    8092        }
    8193
Note: See TracChangeset for help on using the changeset viewer.