IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2013, 1:40:20 PM (13 years ago)
Author:
bills
Message:

Changes to the chip backround and warp background stages.
In chip background stage

Apply an auxillary mask selected for now from hard coded location.
Read input variance and include it in the output data products

In warp background stage

Read and write variance images
Get smf from alternate camRun. For now using a hard coded label
eventually from the warpBackgroundRun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppBackground/src/ppBackgroundRestore.c

    r34813 r35118  
    3535
    3636bool ppBackgroundRestore(pmChip *chip, const pmChip *background, const pmChip *pattern,
    37                          const pmFPAview *oldView, pmConfig *config)
     37                         const pmFPAview *oldView, pmConfig *config, psImageMaskType maskBad)
    3838{
    3939    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    120120    }
    121121
     122    psImage *auxMask = psMetadataLookupPtr(NULL, ro->analysis, "EXPNUM");
     123    if (auxMask) {
     124        if (auxMask->numCols != mask->numCols || auxMask->numRows != mask->numRows) {
     125            psError(PPBACKGROUND_ERR_DATA, true, "auxiliary mask size (%d x %d) does not match input size (%d x %d)",
     126                auxMask->numCols, auxMask->numRows, numCols, numRows);
     127            return false;
     128        }
     129        // Arno's masks are floating point, fix later and zero means bad
     130        #define AUXMASK_DATA F32
     131        for (int y = 0; y < numRows; y++) {
     132            for (int x = 0; x < numCols; x++) {
     133                if (auxMask->data.AUXMASK_DATA[y][x] == 0) {
     134                    mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad;
     135                }
     136            }
     137        }
     138    }
     139
     140
    122141    ro->data_exists = true;
    123142    ro->parent->data_exists = true;
Note: See TracChangeset for help on using the changeset viewer.