IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19509


Ignore:
Timestamp:
Sep 11, 2008, 3:05:59 PM (18 years ago)
Author:
eugene
Message:

check return values, lower verbosity on CDij vs PC00i00j

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryWCS.c

    r19306 r19509  
    77 *  @author EAM, IfA
    88 *
    9  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-09-02 19:05:33 $
     9 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-09-12 01:05:59 $
    1111 *
    1212 *  Copyright 2006 Institute for Astronomy, University of Hawaii
     
    117117{
    118118    pmAstromWCS *wcs = pmAstromWCSBilevelChipFromFPA (chip, tol);
     119    if (!wcs) {
     120        psError(PS_ERR_UNKNOWN, false, "failure to determine WCS terms from fpa");
     121        return false;
     122    }
     123
    119124    pmAstromWCStoHeader (header, wcs);
    120125
     
    128133{
    129134    pmAstromWCS *wcs = pmAstromWCSBilevelMosaicFromFPA (fpa, tol);
     135    if (!wcs) {
     136        psError(PS_ERR_UNKNOWN, false, "failure to determine WCS terms from fpa");
     137        return false;
     138    }
    130139
    131140    // we need to specify the dimensions of the FPA
     
    230239    if (cdKeys && pcKeys) {
    231240        // XXX make this an option
    232         psLogMsg ("psastro", 2, "warning: both CDi_j and PC00i00j defined in headers, using PC00i00j terms\n");
     241        psLogMsg ("psastro", 5, "warning: both CDi_j and PC00i00j defined in headers, using PC00i00j terms\n");
    233242    }
    234243    if (!cdKeys && !pcKeys) {
     
    615624    // given transformation, solve for coordinates which yields output coordinates of 0,0
    616625    psPlane *center = psPlaneTransformGetCenter (toTPA, tol);
     626    if (!center) {
     627        psError(PS_ERR_UNKNOWN, false, "Unable to solve for TPA center.");
     628        psFree (toTPA);
     629        psFree (wcs);
     630        return NULL;
     631    }
    617632
    618633    // create wcs transform from toFPA, resulting transformation has units of microns/pixel
     
    671686    // given transformation, solve for coordinates which yields output coordinates of 0,0
    672687    psPlane *center = psPlaneTransformGetCenter (chip->toFPA, tol);
     688    if (!center) {
     689        psError(PS_ERR_UNKNOWN, false, "Unable to solve for TPA center.");
     690        psFree (wcs);
     691        return NULL;
     692    }
    673693
    674694    // adjust wcs transform to use center as reference coordinate
     
    707727    // given transformation, solve for coordinates which yields output coordinates of 0,0
    708728    psPlane *center = psPlaneTransformGetCenter (fpa->toTPA, tol);
     729    if (!center) {
     730        psError(PS_ERR_UNKNOWN, false, "Unable to solve for TPA center.");
     731        psFree (wcs);
     732        return NULL;
     733    }
    709734
    710735    // adjust wcs transform to use center as reference coordinate
Note: See TracChangeset for help on using the changeset viewer.