Changeset 27096 for trunk/pswarp/src/pswarpTransformSources.c
- Timestamp:
- Feb 25, 2010, 4:26:50 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformSources.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformSources.c
r26896 r27096 45 45 psArray *outSources = outDetections->allSources; 46 46 if (!outSources) { 47 outDetections->allSources = psArrayAllocEmpty(SOURCE_ARRAY_BUFFER);48 outSources = outDetections->allSources;47 outDetections->allSources = psArrayAllocEmpty(SOURCE_ARRAY_BUFFER); 48 outSources = outDetections->allSources; 49 49 } 50 50 … … 61 61 int xGrid, yGrid; ///< Grid coordinates for local map 62 62 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", 64 64 xIn, yIn); 65 65 psFree(outDetections); … … 76 76 double xOut, yOut; ///< Output coordinates 77 77 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", 79 79 xIn, yIn); 80 80 psFree(outDetections); … … 111 111 112 112 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); 117 117 118 118 #if 0
Note:
See TracChangeset
for help on using the changeset viewer.
