IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotFitSourcesLinear.c

    r20938 r21183  
    1010// the analysis is performed wrt the simulated pixel values
    1111
    12 static bool SetBorderMatrixElements (psSparseBorder *border, pmReadout *readout, psArray *sources, bool constant_weights, int SKY_FIT_ORDER, psMaskType markVal);
     12static bool SetBorderMatrixElements (psSparseBorder *border, pmReadout *readout, psArray *sources, bool constant_weights, int SKY_FIT_ORDER, psImageMaskType markVal);
    1313
    1414bool psphotFitSourcesLinear (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, bool final) {
     
    2323
    2424    // bit-masks to test for good/bad pixels
    25     psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT");
     25    psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT");
    2626    assert (maskVal);
    2727
    2828    // bit-mask to mark pixels not used in analysis
    29     psMaskType markVal = psMetadataLookupU8(&status, recipe, "MARK.PSPHOT");
     29    psImageMaskType markVal = psMetadataLookupImageMask(&status, recipe, "MARK.PSPHOT");
    3030    assert (markVal);
    3131
     
    233233// on the pixels which correspond to all of the sources of interest.  These elements fill in
    234234// the border matrix components in the sparse matrix equation.
    235 static bool SetBorderMatrixElements (psSparseBorder *border, pmReadout *readout, psArray *sources, bool constant_weights, int SKY_FIT_ORDER, psMaskType markVal) {
     235static bool SetBorderMatrixElements (psSparseBorder *border, pmReadout *readout, psArray *sources, bool constant_weights, int SKY_FIT_ORDER, psImageMaskType markVal) {
    236236
    237237    // generate the image-wide weight terms
     
    248248        float x = model->params->data.F32[PM_PAR_XPOS];
    249249        float y = model->params->data.F32[PM_PAR_YPOS];
    250         psImageMaskCircle (source->maskView, x, y, model->radiusFit, "AND", PS_NOT_U8(markVal));
     250        psImageMaskCircle (source->maskView, x, y, model->radiusFit, "AND", PS_NOT_IMAGE_MASK(markVal));
    251251    }
    252252
     
    254254    psF32 **image  = readout->image->data.F32;
    255255    psF32 **weight = readout->weight->data.F32;
    256     psU8  **mask   = readout->mask->data.U8;
     256    psImageMaskType  **mask   = readout->mask->data.PS_TYPE_IMAGE_MASK_DATA;
    257257
    258258    double w, x, y, x2, xy, y2, xc, yc, wt, f, fo, fx, fy;
     
    288288
    289289    // turn off MARK for all image pixels
    290     psImageMaskRegion (readout->mask, fullArray, "AND", PS_NOT_U8(markVal));
     290    psImageMaskRegion (readout->mask, fullArray, "AND", PS_NOT_IMAGE_MASK(markVal));
    291291
    292292    // set the Border T elements
Note: See TracChangeset for help on using the changeset viewer.