IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 25, 2010, 4:26:50 PM (16 years ago)
Author:
Paul Price
Message:

Reworking error codes to get consistent exit codes.

File:
1 edited

Legend:

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

    r26896 r27096  
    4545    psArray *outSources = outDetections->allSources;
    4646    if (!outSources) {
    47         outDetections->allSources = psArrayAllocEmpty(SOURCE_ARRAY_BUFFER);
    48         outSources = outDetections->allSources;
     47        outDetections->allSources = psArrayAllocEmpty(SOURCE_ARRAY_BUFFER);
     48        outSources = outDetections->allSources;
    4949    }
    5050
     
    6161        int xGrid, yGrid;           ///< Grid coordinates for local map
    6262        if (!pswarpMapGridSetGrid(sourceGrid, xIn + 0.5, yIn + 0.5, &xGrid, &yGrid)) {
    63             psError(PS_ERR_UNKNOWN, false, "Unable to get grid coordinates for source at %f,%f\n",
     63            psError(psErrorCodeLast(), false, "Unable to get grid coordinates for source at %f,%f\n",
    6464                    xIn, yIn);
    6565            psFree(outDetections);
     
    7676        double xOut, yOut;          ///< Output coordinates
    7777        if (!pswarpMapApply(&xOut, &yOut, map, xIn + 0.5, yIn + 0.5)) {
    78             psError(PS_ERR_UNKNOWN, false, "Unable to transform coordinates for source at %f,%f\n",
     78            psError(psErrorCodeLast(), false, "Unable to transform coordinates for source at %f,%f\n",
    7979                    xIn, yIn);
    8080            psFree(outDetections);
     
    111111
    112112        new->modelPSF = pmModelAlloc(source->modelPSF->type);
    113         new->modelPSF->params->data.F32[PM_PAR_I0]=
    114           (isfinite(new->psfMag) ? pow(10.0, -0.4*new->psfMag) : NAN);
    115         new->modelPSF->dparams->data.F32[PM_PAR_I0]=
    116           (isfinite(new->psfMag) ? new->errMag*pow(10.0, -0.4*new->psfMag) : NAN);
     113        new->modelPSF->params->data.F32[PM_PAR_I0]=
     114          (isfinite(new->psfMag) ? pow(10.0, -0.4*new->psfMag) : NAN);
     115        new->modelPSF->dparams->data.F32[PM_PAR_I0]=
     116          (isfinite(new->psfMag) ? new->errMag*pow(10.0, -0.4*new->psfMag) : NAN);
    117117
    118118#if 0
Note: See TracChangeset for help on using the changeset viewer.