IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 11, 2008, 8:35:04 AM (18 years ago)
Author:
eugene
Message:

total overhaul of mask handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080706/psModules/src/objects/pmSourcePhotometry.c

    r17998 r18472  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2008-06-09 00:43:46 $
     5 *  @version $Revision: 1.42.8.1 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2008-07-11 18:35:04 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6464
    6565// XXX masked region should be (optionally) elliptical
    66 bool pmSourceMagnitudes (pmSource *source, pmPSF *psf, pmSourcePhotometryMode mode,
    67                          psMaskType maskVal, psMaskType mark)
     66bool pmSourceMagnitudes (pmSource *source, pmPSF *psf, pmSourcePhotometryMode mode, psMaskType maskVal)
    6867{
    6968    PS_ASSERT_PTR_NON_NULL(source, false);
     
    230229        mask = source->maskObj;
    231230    }
    232     // set aperture mask circle to model radius
    233     // XXX use a different radius for apertures and fits...
    234     // XXX can I remove this?  the source should have the mask defined when it is constructed or
    235     // when the fit / aperture radius is changed...
    236     psImageKeepCircle (source->maskObj, x, y, model->radiusFit, "OR", mark);
    237231
    238232    // measure the weight of included pixels
    239233    // XXX is this supposed to use the weight or the flux?
    240234    if (mode & PM_SOURCE_PHOT_WEIGHT) {
    241         pmSourcePixelWeight (&source->pixWeight, model, source->pixels, source->maskObj, maskVal | mark);
     235        pmSourcePixelWeight (&source->pixWeight, model, source->pixels, source->maskObj, maskVal);
    242236    }
    243237
    244238    // measure object aperture photometry
    245     status = pmSourcePhotometryAper  (&source->apMag, model, flux, mask, maskVal | mark);
     239    status = pmSourcePhotometryAper  (&source->apMag, model, flux, mask, maskVal);
    246240    if (!status) {
    247241        psTrace ("psModules.objects", 3, "fail mag : bad Ap Mag");
     
    264258        psFree(mask);
    265259    }
    266 
    267     // unmask aperture
    268     // XXX can I remove this?  this will probably break things downstream...
    269     psImageKeepCircle (source->maskObj, x, y, model->radiusFit, "AND", PS_NOT_U8(mark));
    270260
    271261    // if source was originally subtracted, re-subtract object, leave local sky
     
    308298
    309299// return source aperture magnitude
    310 bool pmSourcePhotometryAper (float *apMag, pmModel *model, psImage *image, psImage *mask,
    311                              psMaskType maskVal)
     300bool pmSourcePhotometryAper (float *apMag, pmModel *model, psImage *image, psImage *mask, psMaskType maskVal)
    312301{
    313302    PS_ASSERT_PTR_NON_NULL(apMag, false);
     
    347336
    348337// return source aperture magnitude
    349 bool pmSourcePixelWeight (float *pixWeight, pmModel *model, psImage *image, psImage *mask,
    350                           psMaskType maskVal)
     338bool pmSourcePixelWeight (float *pixWeight, pmModel *model, psImage *image, psImage *mask, psMaskType maskVal)
    351339{
    352340    PS_ASSERT_PTR_NON_NULL(pixWeight, false);
Note: See TracChangeset for help on using the changeset viewer.