IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 17, 2007, 10:17:21 AM (19 years ago)
Author:
magnier
Message:

added errors to psImageMap, NaN for unconstrained pixels in output map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070830/psLib/src/imageops/psImageMap.c

    r14774 r14864  
    77 *  @author Eugene Magnier, IfA
    88 *
    9  *  @version $Revision: 1.1.2.5 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-09-07 20:19:35 $
     9 *  @version $Revision: 1.1.2.6 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-09-17 20:17:21 $
    1111 *
    1212 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    3939
    4040    psFree (map->map);
    41     // psFree (map->field); XXX ??? this should be freed here, but that causes an error...
     41    psFree (map->error);
     42    psFree (map->field); // XXX ??? this should be freed here, but that causes an error...
    4243    psFree (map->stats);
    4344    psFree (map->binning);
     
    5758    map->field   = psMemIncrRefCounter (field);
    5859    map->stats   = psMemIncrRefCounter (stats);
     60
    5961    map->map     = psImageAlloc (binning->nXruff, binning->nYruff, PS_TYPE_F32);
     62    psImageInit (map->map, 0.0);
     63
     64    map->error   = psImageAlloc (binning->nXruff, binning->nYruff, PS_TYPE_F32);
     65    psImageInit (map->error, 0.0);
    6066
    6167    psImageBinningSetScale (map->binning, PS_IMAGE_BINNING_CENTER);
     
    7379
    7480    psImageRecycle (map->map, nXruff, nYruff, PS_TYPE_F32);
     81    psImageRecycle (map->error, nXruff, nYruff, PS_TYPE_F32);
    7582
    7683    psImageBinningSetScale (map->binning, PS_IMAGE_BINNING_CENTER);
     
    257264}
    258265
     266// x,y are in fractional pixel coords of the fine image (pixel center: 0.5)
    259267double psImageMapEval (psImageMap *map, float x, float y) {
    260268
    261269    double result;
    262270
    263     result = psImageUnbinPixel(x, y, map->map, map->binning);
     271    result = psImageUnbinPixel_V2(x, y, map->map, map->binning);
    264272
    265273    return result;
     
    276284
    277285    for (int i = 0; i < x->n; i++) {
    278         result->data.F32[i] = psImageUnbinPixel(x->data.F32[i], y->data.F32[i], map->map, map->binning);
     286        result->data.F32[i] = psImageUnbinPixel_V2(x->data.F32[i], y->data.F32[i], map->map, map->binning);
    279287    }
    280288
Note: See TracChangeset for help on using the changeset viewer.