IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12771


Ignore:
Timestamp:
Apr 5, 2007, 5:38:16 PM (19 years ago)
Author:
Paul Price
Message:

Adding variance and mask output.

Location:
trunk/pswarp/src
Files:
5 edited

Legend:

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

    r12567 r12771  
    4747    }
    4848
     49
    4950    psArray *array;
    5051
     
    5859    psFree (array);
    5960
     61
     62    // Parse the recipe and format into the arguments
     63    {
     64
     65        // Select the appropriate recipe
     66        psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
     67        if (!recipe) {
     68            psError(PSWARP_ERR_CONFIG, true, "Can't find %s recipe!\n", PSWARP_RECIPE);
     69            return false;
     70        }
     71
     72        // Get grid size
     73        bool status;                        // Status of MD lookup
     74        int nGridX = psMetadataLookupS32 (&status, recipe, "GRID.NX");
     75        if (!status) nGridX = 128;
     76        int nGridY = psMetadataLookupS32 (&status, recipe, "GRID.NY");
     77        if (!status) nGridY = 128;
     78
     79        // Get interpolation mode
     80        psImageInterpolateMode interpolationMode; // Mode for interpolation
     81        const char *name = psMetadataLookupStr (&status, recipe, "INTERPOLATION.MODE"); // Name of interp mode
     82        if (!name) {
     83            interpolationMode = PS_INTERPOLATE_BILINEAR;
     84            psLogMsg ("pswarp", 3, "defaulting to bilinear interpolation\n");
     85        } else {
     86            interpolationMode = psImageInterpolateModeFromString (name);
     87            if (interpolationMode == PS_INTERPOLATE_NONE) {
     88                interpolationMode = PS_INTERPOLATE_BILINEAR;
     89                psLogMsg ("pswarp", 3,
     90                          "Unknown interpolation mode %s, defaulting to bilinear interpolation\n", name);
     91            }
     92        }
     93
     94        // Get mask parameters
     95        psMaskType maskIn = psMetadataLookupU8(&status, recipe, "MASK.IN"); // Mask for input data
     96        if (!status) {
     97            maskIn = 0x00;
     98            psWarning("MASK.IN is not set in the %s recipe --- defaulting to %x.", PSWARP_RECIPE, maskIn);
     99        }
     100        psMaskType maskPoor = psMetadataLookupU8(&status, recipe, "MASK.POOR"); // Mask for "poor" warped data
     101        if (!status) {
     102            maskPoor = 0x00;
     103            psWarning("MASK.POOR is not set in the %s recipe --- defaulting to %x.", PSWARP_RECIPE, maskPoor);
     104        }
     105        psMaskType maskBad = psMetadataLookupU8(&status, recipe, "MASK.IN"); // Mask for bad warped data
     106        if (!status) {
     107            maskBad = 0x00;
     108            psWarning("MASK.BAD is not set in the %s recipe --- defaulting to %x.", PSWARP_RECIPE, maskBad);
     109        }
     110        float poorFrac = psMetadataLookupF32(&status, recipe, "POOR.FRAC"); // Frac of bad flux for a "poor"
     111        if (!status) {
     112            poorFrac = 0.0;
     113            psWarning("POOR.FRAC is not set in the %s recipe --- defaulting to %f.", PSWARP_RECIPE, poorFrac);
     114        }
     115
     116        // Set recipe values in the arguments
     117        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "GRID.NX", 0,
     118                         "Iso-astrom grid spacing in x", nGridX);
     119        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "GRID.NY", 0,
     120                         "Iso-astrom grid spacing in x", nGridX);
     121        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "INTERPOLATION.MODE", 0,
     122                         "Interpolation mode", interpolationMode);
     123        psMetadataAddU8(config->arguments, PS_LIST_TAIL, "MASK.IN", 0,
     124                         "Mask for input data", maskIn);
     125        psMetadataAddU8(config->arguments, PS_LIST_TAIL, "MASK.POOR", 0,
     126                         "Mask for poor warped data", maskPoor);
     127        psMetadataAddU8(config->arguments, PS_LIST_TAIL, "MASK.BAD", 0,
     128                         "Mask for bad warped data", maskBad);
     129        psMetadataAddF32(config->arguments, PS_LIST_TAIL, "POOR.FRAC", 0,
     130                         "Fraction of bad flux for a pixel to be marked as poor", poorFrac);
     131    }
     132
    60133    psTrace("pswarp", 1, "Done with pswarpArguments...\n");
    61134    return (config);
  • trunk/pswarp/src/pswarpDataLoad.c

    r12526 r12771  
    1717    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSWARP.INPUT");
    1818    if (!input) {
    19         psError(PSWARP_ERR_CONFIG, true, "Can't find input data!\n");
    20         return false;
     19        psError(PSWARP_ERR_CONFIG, true, "Can't find input data!\n");
     20        return false;
    2121    }
    2222
     
    2424    pmFPAfile *astrom = psMetadataLookupPtr (NULL, config->files, "PSWARP.ASTROM");
    2525    if (!astrom) {
    26         astrom = input;
     26        astrom = input;
    2727    }
    28  
     28
    2929    // select the output readout
    3030    view = pmFPAviewAlloc (0);
     
    3434    pmReadout  *output = pmFPAfileThisReadout (config->files, view, "PSWARP.OUTPUT");
    3535    if (!output) {
    36         psError(PSWARP_ERR_CONFIG, true, "Can't find output data!\n");
    37         return false;
     36        psError(PSWARP_ERR_CONFIG, true, "Can't find output data!\n");
     37        return false;
    3838    }
    3939    psFree (view);
     
    4242    pmFPAfileActivate (config->files, false, "PSWARP.SKYCELL");
    4343    pmFPAfileActivate (config->files, false, "PSWARP.OUTPUT");
     44    pmFPAfileActivate (config->files, false, "PSWARP.OUTPUT.MASK");
     45    pmFPAfileActivate (config->files, false, "PSWARP.OUTPUT.WEIGHT");
    4446
    4547    view = pmFPAviewAlloc (0);
     
    5254    pmHDU *phu = pmFPAviewThisPHU (view, astrom->fpa);
    5355    if (phu) {
    54         char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
    55         if (ctype) {
    56             bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
    57         }
     56        char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
     57        if (ctype) {
     58            bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
     59        }
    5860    }
    5961    if (bilevelAstrometry) {
    60         pmAstromReadBilevelMosaic (input->fpa, phu->header);
    61     } 
     62        pmAstromReadBilevelMosaic (input->fpa, phu->header);
     63    }
    6264
    6365    // files associated with the science image
     
    6769        psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    6870        if (!chip->process || !chip->file_exists) { continue; }
    69         pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     71        pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    7072
    7173        // read WCS data from the corresponding header
    72         pmHDU *hdu = pmFPAviewThisHDU (view, astrom->fpa);
    73         if (bilevelAstrometry) {
    74             pmAstromReadBilevelChip (chip, hdu->header);
    75         } else {
    76             // we use a default FPA pixel scale of 1.0
    77             pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0);
    78         }
     74        pmHDU *hdu = pmFPAviewThisHDU (view, astrom->fpa);
     75        if (bilevelAstrometry) {
     76            pmAstromReadBilevelChip (chip, hdu->header);
     77        } else {
     78            // we use a default FPA pixel scale of 1.0
     79            pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0);
     80        }
    7981
    80         while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
     82        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    8183            psTrace ("pswarp", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    8284            if (!cell->process || !cell->file_exists) { continue; }
    83             pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     85            pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    8486
    85             // process each of the readouts
    86             while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
    87                 pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    88                 if (! readout->data_exists) { continue; }
     87            // process each of the readouts
     88            while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
     89                pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     90                if (! readout->data_exists) { continue; }
    8991
    90                 // XXX _Opt version uses locally-linear map
    91                 // pswarpTransformReadout (output, readout, config);
    92                 pswarpTransformReadout_Opt (output, readout, config);
     92                // XXX _Opt version uses locally-linear map
     93                // pswarpTransformReadout (output, readout, config);
     94                pswarpTransformReadout_Opt (output, readout, config);
    9395
    94                 pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    95             }
    96             pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    97         }
    98         pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     96                pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     97            }
     98            pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     99        }
     100        pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    99101    }
    100102    pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
  • trunk/pswarp/src/pswarpDataSave.c

    r10946 r12771  
    1616    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSWARP.INPUT");
    1717    if (!input) {
    18         psError(PSWARP_ERR_CONFIG, true, "Can't find input data!\n");
    19         return false;
     18        psError(PSWARP_ERR_CONFIG, true, "Can't find input data!\n");
     19        return false;
    2020    }
    2121
     
    2323    pmFPAfileActivate (config->files, false, NULL);
    2424    pmFPAfileActivate (config->files, true, "PSWARP.OUTPUT");
     25    pmFPAfileActivate (config->files, true, "PSWARP.OUTPUT.MASK");
     26    pmFPAfileActivate (config->files, true, "PSWARP.OUTPUT.WEIGHT");
    2527    pmFPAview *view = pmFPAviewAlloc (0);
    2628
     
    3133        psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    3234        if (!chip->process || !chip->file_exists) { continue; }
    33         pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     35        pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    3436
    35         while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
     37        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    3638            psTrace ("pswarp", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    3739            if (!cell->process || !cell->file_exists) { continue; }
    38             pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     40            pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    3941
    40             // process each of the readouts
    41             while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
    42                 pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    43                 if (! readout->data_exists) { continue; }
     42            // process each of the readouts
     43            while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
     44                pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     45                if (! readout->data_exists) { continue; }
    4446
    45                 // pswarpConvertReadout (readout, config);
     47                // pswarpConvertReadout (readout, config);
    4648
    47                 pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    48             }
    49             pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    50         }
    51         pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     49                pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     50            }
     51            pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     52        }
     53        pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    5254    }
    5355    pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
  • trunk/pswarp/src/pswarpParseCamera.c

    r12526 r12771  
    1111    pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "PSWARP.INPUT", "INPUT");
    1212    if (!input) {
    13         psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.INPUT");
    14         return false;
     13        psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.INPUT");
     14        return false;
    1515    }
    1616
     
    1919    pmFPAfileDefineFromArgs (&status, config, "PSWARP.ASTROM", "ASTROM");
    2020    if (status) {
    21         psLogMsg ("pswarp", 3, "using supplied astrometry\n");
     21        psLogMsg ("pswarp", 3, "using supplied astrometry\n");
    2222    } else {
    23         psLogMsg ("pswarp", 3, "using header astrometry\n");
     23        psLogMsg ("pswarp", 3, "using header astrometry\n");
    2424    }
    2525
    2626    // the mask is not required - but must conform to input camera
    27     if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.MASK", "MASK")) {
    28         psLogMsg ("pswarp", 3, "no mask supplied\n");
    29     }
     27    pmFPAfile *inMask = pmFPAfileBindFromArgs(NULL, input, config, "PSWARP.MASK", "MASK");
     28    if (!inMask) {
     29        psLogMsg ("pswarp", 3, "no mask supplied\n");
     30    }
    3031
    31     if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.WEIGHT", "WEIGHT")) {
    32         psLogMsg ("pswarp", 3, "no weight supplied\n");
    33     }
     32    pmFPAfile *inWeight = pmFPAfileBindFromArgs(NULL, input, config, "PSWARP.WEIGHT", "WEIGHT");
     33    if (!inWeight) {
     34        psLogMsg ("pswarp", 3, "no weight supplied\n");
     35    }
    3436
    3537    // the input skycell is a required argument: it defines the output image
     
    3739    status = pswarpDefineSkycell (&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL");
    3840    if (!status) {
    39         psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.SKYCELL");
    40         return false;
     41        psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.SKYCELL");
     42        return false;
    4143    }
    4244
     
    4547    // if (!pmFPAfileDefineFromFPA (skyConfig, skycell->fpa, 1, 1, "PSWARP.OUTPUT")) {
    4648    if (!pmFPAfileDefineOutput (skyConfig, skycell->fpa, "PSWARP.OUTPUT")) {
    47         psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT");
    48         return false;
     49        psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT");
     50        return false;
     51    }
     52    if (inMask) {
     53        if (!pmFPAfileDefineOutput (skyConfig, skycell->fpa, "PSWARP.OUTPUT.MASK")) {
     54            psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.MASK");
     55            return false;
     56        }
     57    }
     58    if (inWeight) {
     59        if (!pmFPAfileDefineOutput (skyConfig, skycell->fpa, "PSWARP.OUTPUT.WEIGHT")) {
     60            psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.WEIGHT");
     61            return false;
     62        }
    4963    }
    5064
    5165    // Chip selection: turn on only the chips specified
    52     char *chipLine = psMetadataLookupStr(NULL, config->arguments, "CHIP_SELECTIONS"); 
     66    char *chipLine = psMetadataLookupStr(NULL, config->arguments, "CHIP_SELECTIONS");
    5367    psArray *chips = psStringSplitArray (chipLine, ",", false);
    5468    if (chips->n > 0) {
    55         pmFPASelectChip (input->fpa, -1, true); // deselect all chips
    56         for (int i = 0; i < chips->n; i++) {
    57             int chipNum = atoi(chips->data[i]);
    58             if (! pmFPASelectChip(input->fpa, chipNum, false)) {
    59                 psError(PSWARP_ERR_CONFIG, true, "Chip number %d doesn't exist in camera.\n", chipNum);
    60                 return false;
    61             }
     69        pmFPASelectChip (input->fpa, -1, true); // deselect all chips
     70        for (int i = 0; i < chips->n; i++) {
     71            int chipNum = atoi(chips->data[i]);
     72            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
     73                psError(PSWARP_ERR_CONFIG, true, "Chip number %d doesn't exist in camera.\n", chipNum);
     74                return false;
     75            }
    6276        }
    6377    }
  • trunk/pswarp/src/pswarpTransformReadout_Opt.c

    r12744 r12771  
    22
    33// NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
    4 bool pswarpTransformReadout_Opt (pmReadout *output, pmReadout *input, pmConfig *config) {
    5 
    6     bool status;
    7     int minX, minY, maxX, maxY;
    8     int gridXo, gridX, gridY, nextGridXo, nextGridX, nextGridY;
    9     pswarpMap *map = NULL;
    10     psImageInterpolateMode interpolationMode = PS_INTERPOLATE_NONE;
    11 
     4bool pswarpTransformReadout_Opt (pmReadout *output, pmReadout *input, pmConfig *config)
     5{
    126    // XXX this implementation currently ignores the use of the region
    137    psImage *region = NULL;
     
    159    psTimerStart ("warp");
    1610
    17     // select the current recipe
    18     psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
    19     if (!recipe) {
    20         psError(PSWARP_ERR_CONFIG, true, "Can't find PSWARP recipe!\n");
    21         return false;
    22     }
    23 
    24     int nGridX = psMetadataLookupS32 (&status, recipe, "GRID.NX");
    25     if (!status) nGridX = 128;
    26     int nGridY = psMetadataLookupS32 (&status, recipe, "GRID.NY");
    27     if (!status) nGridY = 128;
    28 
    29     char *name = psMetadataLookupStr (&status, recipe, "INTERPOLATION.MODE");
    30     if (!name) {
    31         interpolationMode = PS_INTERPOLATE_BILINEAR;
    32         psLogMsg ("pswarp", 3, "defaulting to bilinear interpolation\n");
    33     } else {
    34         interpolationMode = psImageInterpolateModeFromString (name);
    35         if (interpolationMode == PS_INTERPOLATE_NONE) {
    36             interpolationMode = PS_INTERPOLATE_BILINEAR;
    37             psLogMsg ("pswarp", 3, "unknown interpolation mode %s, defaulting to bilinear interpolation\n", name);
    38         }
    39     }
    40 
    41     psPlane *inPix = psPlaneAlloc();    // Coordinates on the input detector
    42     psImage *inImage = input->image;
    43     psF32 **outData = output->image->data.F32;
     11    // Get grid size
     12    int nGridX = psMetadataLookupS32(NULL, config->arguments, "GRID.NX");
     13    int nGridY = psMetadataLookupS32(NULL, config->arguments, "GRID.NY");
     14    psImageInterpolateMode interpolationMode = psMetadataLookupS32(NULL, config->arguments,
     15                                                                   "INTERPOLATION.MODE");
     16    psMaskType maskIn = psMetadataLookupU8(NULL, config->arguments, "MASK.IN"); // Mask for input data
     17    psMaskType maskPoor = psMetadataLookupU8(NULL, config->arguments, "MASK.POOR"); // Mask for "poor" data
     18    psMaskType maskBad = psMetadataLookupU8(NULL, config->arguments, "MASK.IN"); // Mask for bad data
     19    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); // Flux fraction for "poor"
    4420
    4521    // we need to apply the offset to convert parent coordinates to child coordinates for
     
    5430
    5531    // find the output pixel range
     32    int minX, minY, maxX, maxY;
    5633    pswarpMatchRange (&minX, &minY, &maxX, &maxY, input, output);
    5734
     
    6441    psLogMsg ("pswarp", 3, "maximum error using this grid sampling: %f\n", maxError);
    6542
     43    int gridX, gridY, nextGridX, nextGridY;
    6644    pswarpMapGridSetGrid (grid, minX, minY, &gridX, &gridY);
    6745    nextGridY = pswarpMapGridNextGrid_Y (grid, gridY);
    68     map = grid->maps[gridX][gridY];
     46    pswarpMap *map = grid->maps[gridX][gridY];
    6947
    7048    assert ((int)(minX - outCol0) >= 0);
     
    7351    assert ((int)(maxY - outRow0) <= output->image->numRows);
    7452
    75     gridXo = gridX;
    76     nextGridXo = pswarpMapGridNextGrid_X (grid, gridX);
     53    int gridXo = gridX;
     54    int nextGridXo = pswarpMapGridNextGrid_X (grid, gridX);
    7755
    78     psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, inImage,
    79                                                                        NULL, NULL, 0, NAN, NAN, 0, 0, 0.0);
     56    psImage *inImage = input->image;    // Input image
     57    psImage *inVar   = input->weight;   // Input weight map
     58    psImage *inMask  = input->mask;     // Input mask
     59
     60    // Interpolation options
     61    psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(interpolationMode, inImage,
     62                                                                       inVar, inMask, maskIn, NAN, NAN,
     63                                                                       maskPoor, maskBad, poorFrac);
     64
     65    psPlane *inPix = psPlaneAlloc();    // Coordinates on the input detector
     66    psF32 **outImageData = output->image->data.F32; // Output image pixels
     67    psF32 **outVarData;                 // Output variance pixels
     68    psMaskType **outMaskData;           // Output mask pixels
     69    if (inVar) {
     70        if (!output->weight) {
     71            output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
     72        }
     73        outVarData = output->weight->data.F32;
     74    }
     75    if (inMask) {
     76        if (!output->mask) {
     77            output->mask = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_MASK);
     78        }
     79        outMaskData = output->mask->data.PS_TYPE_MASK_DATA;
     80    }
    8081
    8182    // Iterate over the output image pixels (parent frame)
     
    112113            // XXX apply scale and offset?
    113114            // psImagePixelInterpolate determines the value at pixel coordinate (x,y) in child coordinates
    114             double value;
    115             if (!psImageInterpolate(&value, NULL, NULL, inPix->x - inCol0, inPix->y - inRow0, interp)) {
     115            double imageValue, varValue;
     116            psMaskType maskValue;
     117            if (!psImageInterpolate(&imageValue, &varValue, &maskValue,
     118                                    inPix->x - inCol0, inPix->y - inRow0, interp)) {
    116119                psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
    117120                psFree(interp);
     
    120123                return false;
    121124            }
    122             outData[y-outRow0][x-outCol0] = value;
     125            outImageData[y-outRow0][x-outCol0] = imageValue;
     126            if (inVar) {
     127                outVarData[y-outRow0][x-outCol0] = varValue;
     128            }
     129            if (inMask) {
     130                outMaskData[y-outRow0][x-outCol0] = maskValue;
     131            }
    123132        }
    124133    }
Note: See TracChangeset for help on using the changeset viewer.