IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12958


Ignore:
Timestamp:
Apr 23, 2007, 8:04:18 AM (19 years ago)
Author:
magnier
Message:

converting to source->maskObj and source->maskView

Location:
branches/eam_02_branch/psModules/src/objects
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_02_branch/psModules/src/objects/pmModel.c

    r12956 r12958  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.9.6.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-23 03:26:23 $
     8 *  @version $Revision: 1.9.6.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-04-23 18:04:18 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    135135                   psImage *mask,
    136136                   pmModel *model,
    137                    pmModelAddMode mode,
     137                   pmModelOpMode mode,
    138138                   bool add
    139139                      )
     
    275275                psImage *mask,
    276276                pmModel *model,
    277                 pmModelAddMode mode)
     277                pmModelOpMode mode)
    278278{
    279279    psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
     
    288288                psImage *mask,
    289289                pmModel *model,
    290                 pmModelAddMode mode)
     290                pmModelOpMode mode)
    291291{
    292292    psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
  • branches/eam_02_branch/psModules/src/objects/pmModel.h

    r12956 r12958  
    55 * @author EAM, IfA
    66 *
    7  * @version $Revision: 1.6.6.3 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2007-04-23 03:26:23 $
     7 * @version $Revision: 1.6.6.4 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2007-04-23 18:04:18 $
    99 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1010 */
     
    105105    psImage *mask,                      ///< The image pixel mask (valid == 0)
    106106    pmModel *model,                     ///< The input pmModel
    107     pmModelAddMode mode              ///< mode to control how the model is added into the image
     107    pmModelOpMode mode               ///< mode to control how the model is added into the image
    108108);
    109109
     
    122122    psImage *mask,                      ///< The image pixel mask (valid == 0)
    123123    pmModel *model,                     ///< The input pmModel
    124     pmModelAddMode mode              ///< mode to control how the model is added into the image
     124    pmModelOpMode mode               ///< mode to control how the model is added into the image
    125125);
    126126
  • branches/eam_02_branch/psModules/src/objects/pmPSF.c

    r12956 r12958  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.19.2.4 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-23 03:26:23 $
     8 *  @version $Revision: 1.19.2.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-04-23 18:04:18 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    437437        psImageKeepCircle (mask, xc, yc, radius, "OR", PM_MASK_MARK);
    438438        pmSourcePhotometryAper (&apMag, model, image, mask);
     439
     440        // XXX since we re-mask on each pass, this could be dropped.
    439441        psImageKeepCircle (mask, xc, yc, radius, "AND", PS_NOT_U8(PM_MASK_MARK));
    440442
  • branches/eam_02_branch/psModules/src/objects/pmPSFtry.c

    r12943 r12958  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.34.6.2 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-04-21 00:03:31 $
     7 *  @version $Revision: 1.34.6.3 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-04-23 18:04:18 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9999{
    100100    bool status;
    101     float x;
    102     float y;
    103101    int Next = 0;
    104102    int Npsf = 0;
     
    120118            return NULL;
    121119        }
    122         x = source->peak->x;
    123         y = source->peak->y;
    124 
    125         // set temporary object mask and fit object
     120
     121        // set object mask to define valid pixels
     122        psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, RADIUS, "OR", PM_MASK_MARK);
     123
    126124        // fit model as EXT, not PSF
    127 
    128         psImageKeepCircle (source->mask, x, y, RADIUS, "OR", PM_MASK_MARK);
    129125        status = pmSourceFitModel (source, source->modelEXT, PM_SOURCE_FIT_EXT);
    130         psImageKeepCircle (source->mask, x, y, RADIUS, "AND", PS_NOT_U8(PM_MASK_MARK));
    131126
    132127        // exclude the poor fits
     
    158153        source->modelPSF = pmModelFromPSF (source->modelEXT, psfTry->psf);
    159154        source->modelPSF->radiusFit = RADIUS;
    160         x = source->peak->x;
    161         y = source->peak->y;
    162 
    163         // set the mask and fit the PSF model
    164         psImageKeepCircle (source->mask, x, y, RADIUS, "OR", PM_MASK_MARK);
     155
     156        // set object mask to define valid pixels
     157        psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, RADIUS, "OR", PM_MASK_MARK);
     158
     159        // fit the PSF model to the source
    165160        status = pmSourceFitModel (source, source->modelPSF, PM_SOURCE_FIT_PSF);
    166         psImageKeepCircle (source->mask, x, y, RADIUS, "AND", PS_NOT_U8(PM_MASK_MARK));
    167161
    168162        // skip poor fits
  • branches/eam_02_branch/psModules/src/objects/pmSource.c

    r12956 r12958  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.25.4.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-23 03:26:23 $
     8 *  @version $Revision: 1.25.4.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-04-23 18:04:18 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    743743}
    744744
    745 pmModel *pmSourceSelectModel (pmSource *source)
    746 {
    747     switch (source->type) {
    748     case PM_SOURCE_TYPE_STAR:
    749         return source->modelPSF;
    750 
    751     case PM_SOURCE_TYPE_EXTENDED:
    752         return source->modelEXT;
    753 
    754     default:
    755         return NULL;
    756     }
    757     return NULL;
    758 }
    759 
    760745// construct a realization of the source model
    761746bool pmSourceCacheModel (pmSource *source) {
     
    763748    // select appropriate model
    764749    pmModel *model = pmSourceGetModel (NULL, source);
    765     if (model == NULL) continue;  // model must be defined
     750    if (model == NULL) return false;  // model must be defined
    766751       
    767752    // if we already have a cached image, re-use that memory
    768     if (source->modelFlux) {
    769         psImageRecycle (source->modelFlux);
    770     } else {
    771         source->modelFlux = psImageCopy (source->pixels);
    772     }
     753    source->modelFlux = psImageCopy (source->modelFlux, source->pixels, PS_TYPE_F32);
    773754    psImageInit (source->modelFlux, 0.0);
    774755
     
    782763bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add) {
    783764
     765    bool status;
     766
     767    if (add) {
     768        psTrace ("psphot", 3, "replacing object at %f,%f\n", source->peak->xf, source->peak->yf);
     769    } else {
     770        psTrace ("psphot", 3, "removing object at %f,%f\n", source->peak->xf, source->peak->yf);
     771    }
     772
    784773    pmModel *model = pmSourceGetModel (NULL, source);
    785     if (model == NULL) continue;  // model must be defined
     774    if (model == NULL) return false;  // model must be defined
    786775
    787776    if (source->modelFlux) {
     
    801790        // XXX need to respect the source and model masks?
    802791        for (int iy = 0; iy < source->modelFlux->numRows; iy++) {
    803             oy = iy + dY;
     792            int oy = iy + dY;
    804793            for (int ix = 0; ix < source->modelFlux->numCols; ix++) {
    805                 ox = ix + dX;
     794                int ox = ix + dX;
    806795                float value = Io*source->modelFlux->data.F32[iy][ix];
    807796                if (add) {
     
    812801            }
    813802        }
     803        return true;
     804    }
     805
     806    if (add) {
     807        status = pmModelAdd (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
    814808    } else {
    815         if (add) {
    816             pmModelAdd (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
    817         } else {
    818             pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
     809        status = pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
     810    }
     811
     812    return true;
     813}
     814
     815bool pmSourceAdd (pmSource *source, pmModelOpMode mode) {
     816    bool status = pmSourceOp (source, mode, true);
     817    return status;
     818}
     819
     820bool pmSourceSub (pmSource *source, pmModelOpMode mode) {
     821    bool status = pmSourceOp (source, mode, false);
     822    return status;
     823}
     824
     825// given a source, which model is currently appropriate?
     826// choose PSF or EXT based on source->type, but fall back on PSF
     827// if the EXT model is NULL
     828pmModel *pmSourceGetModel (bool *isPSF, const pmSource *source)
     829{
     830
     831    pmModel *model;
     832
     833    if (isPSF) {
     834      *isPSF = false;
     835    }
     836
     837    switch (source->type) {
     838    case PM_SOURCE_TYPE_STAR:
     839        model = source->modelPSF;
     840        if (model == NULL)
     841            return NULL;
     842        if (isPSF) {
     843            *isPSF = true;
    819844        }
    820     }   
    821 
    822     if (add) {
    823         psTrace ("psphot", 3, "replacing object at %f,%f\n", source->peak->xf, source->peak->yf);
    824     } else {
    825         psTrace ("psphot", 3, "removing object at %f,%f\n", source->peak->xf, source->peak->yf);
    826     }
    827     return true;
    828 }
    829 
    830 bool pmSourceAdd (pmSource *source, pmSourceOpMode mode) {
    831     pmSourceOp (source, mode, true);
    832 }
    833 
    834 bool pmSourceSub (pmSource *source, pmSourceOpMode mode) {
    835     pmSourceOp (source, mode, false);
    836 }
     845        return model;
     846
     847    case PM_SOURCE_TYPE_EXTENDED:
     848        model = source->modelEXT;
     849        if (!model && source->modelPSF) {
     850            if (isPSF) {
     851                *isPSF = true;
     852            }
     853            return source->modelPSF;
     854        }
     855        return (model);
     856        break;
     857
     858    default:
     859        return NULL;
     860    }
     861    return NULL;
     862}
  • branches/eam_02_branch/psModules/src/objects/pmSource.h

    r12956 r12958  
    33 * @author EAM, IfA; GLG, MHPCC
    44 *
    5  * @version $Revision: 1.10.6.2 $ $Name: not supported by cvs2svn $
    6  * @date $Date: 2007-04-23 03:26:23 $
     5 * @version $Revision: 1.10.6.3 $ $Name: not supported by cvs2svn $
     6 * @date $Date: 2007-04-23 18:04:18 $
    77 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    88 */
     
    210210);
    211211
    212 
    213 // select the model used for this source
    214 pmModel *pmSourceSelectModel (pmSource *source);
     212pmModel *pmSourceGetModel (bool *isPSF, const pmSource *source);
     213
     214bool pmSourceAdd (pmSource *source, pmModelOpMode mode);
     215bool pmSourceSub (pmSource *source, pmModelOpMode mode);
     216
     217bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add);
     218bool pmSourceCacheModel (pmSource *source);
    215219
    216220/// @}
  • branches/eam_02_branch/psModules/src/objects/pmSourceFitModel.c

    r12943 r12958  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.19.4.2 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-21 00:03:31 $
     8 *  @version $Revision: 1.19.4.3 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-04-23 18:04:18 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5757    PS_ASSERT_PTR_NON_NULL(source, false);
    5858    PS_ASSERT_PTR_NON_NULL(source->pixels, false);
    59     PS_ASSERT_PTR_NON_NULL(source->mask, false);
     59    PS_ASSERT_PTR_NON_NULL(source->maskObj, false);
    6060    PS_ASSERT_PTR_NON_NULL(source->weight, false);
    6161
     
    7777        for (psS32 j = 0; j < source->pixels->numCols; j++) {
    7878            // skip masked points
    79             if (source->mask->data.U8[i][j]) {
     79            if (source->maskObj->data.U8[i][j]) {
    8080                continue;
    8181            }
     
    334334    PS_ASSERT_PTR_NON_NULL(source, false);
    335335    PS_ASSERT_PTR_NON_NULL(source->pixels, false);
    336     PS_ASSERT_PTR_NON_NULL(source->mask, false);
     336    PS_ASSERT_PTR_NON_NULL(source->maskObj, false);
    337337    PS_ASSERT_PTR_NON_NULL(source->weight, false);
    338338
     
    354354        for (psS32 j = 0; j < source->pixels->numCols; j++) {
    355355            // skip masked points
    356             if (source->mask->data.U8[i][j]) {
     356            if (source->maskObj->data.U8[i][j]) {
    357357                continue;
    358358            }
  • branches/eam_02_branch/psModules/src/objects/pmSourceIO_CMF.c

    r12943 r12958  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.18.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-21 00:03:31 $
     5 *  @version $Revision: 1.18.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5656    for (i = 0; i < sources->n; i++) {
    5757        pmSource *source = (pmSource *) sources->data[i];
    58         pmModel *model = pmSourceSelectModel (source);
     58
     59        // no difference between PSF and non-PSF model
     60        pmModel *model = pmSourceGetModel (NULL, source);
    5961        if (model == NULL)
    6062            continue;
  • branches/eam_02_branch/psModules/src/objects/pmSourceIO_CMP.c

    r12943 r12958  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.25.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-21 00:03:31 $
     5 *  @version $Revision: 1.25.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    107107    for (i = 0; i < sources->n; i++) {
    108108        pmSource *source = (pmSource *) sources->data[i];
    109         pmModel *model = pmSourceSelectModel (source);
     109
     110        // no difference between PSF and non-PSF model
     111        pmModel *model = pmSourceGetModel (NULL, source);
    110112        if (model == NULL)
    111113            continue;
  • branches/eam_02_branch/psModules/src/objects/pmSourceIO_OBJ.c

    r12943 r12958  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.9.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-21 00:03:31 $
     5 *  @version $Revision: 1.9.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6161    for (int i = 0; i < sources->n; i++) {
    6262        pmSource *source = (pmSource *) sources->data[i];
    63         pmModel *model = pmSourceSelectModel (source);
     63
     64        // no difference between PSF and non-PSF model
     65        pmModel *model = pmSourceGetModel (NULL, source);
    6466        if (model == NULL)
    6567            continue;
  • branches/eam_02_branch/psModules/src/objects/pmSourceIO_PS1_DEV_0.c

    r12943 r12958  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.6.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-21 00:03:31 $
     5 *  @version $Revision: 1.6.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6363    for (i = 0; i < sources->n; i++) {
    6464        pmSource *source = (pmSource *) sources->data[i];
    65         pmModel *model = pmSourceSelectModel (source);
     65
     66        // no difference between PSF and non-PSF model
     67        pmModel *model = pmSourceGetModel (NULL, source);
    6668
    6769        if (model != NULL) {
  • branches/eam_02_branch/psModules/src/objects/pmSourceIO_SMPDATA.c

    r12943 r12958  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.5.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-21 00:03:31 $
     5 *  @version $Revision: 1.5.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6262    for (i = 0; i < sources->n; i++) {
    6363        pmSource *source = (pmSource *) sources->data[i];
    64         pmModel *model = pmSourceSelectModel (source);
     64
     65        // no difference between PSF and non-PSF model
     66        pmModel *model = pmSourceGetModel (NULL, source);
    6567        if (model != NULL) {
    6668            PAR = model->params->data.F32;
  • branches/eam_02_branch/psModules/src/objects/pmSourceIO_SX.c

    r12943 r12958  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.8.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-21 00:03:31 $
     5 *  @version $Revision: 1.8.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5757    for (int i = 0; i < sources->n; i++) {
    5858        pmSource *source = (pmSource *) sources->data[i];
    59         pmModel *model = pmSourceSelectModel (source);
     59
     60        // no difference between PSF and non-PSF model
     61        pmModel *model = pmSourceGetModel (NULL, source);
    6062        if (model == NULL)
    6163            continue;
  • branches/eam_02_branch/psModules/src/objects/pmSourcePhotometry.c

    r12956 r12958  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.22.4.4 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-23 03:26:23 $
     5 *  @version $Revision: 1.22.4.5 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-23 18:04:18 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    109109    // XXX use pmSourceAdd instead?
    110110    if (source->mode & PM_SOURCE_MODE_SUBTRACTED) {
    111         pmModelAdd (source->pixels, source->mask, model, PM_MODEL_OP_FULL);
     111        pmModelAdd (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
    112112    }
    113113
     
    182182    // set aperture mask circle to model radius
    183183    // XXX use a different radius for apertures and fits...
    184     psImageKeepCircle (source->mask, x, y, model->radiusFit, "OR", PM_MASK_MARK);
     184    // XXX can I remove this?  the source should have the mask defined when it is constructed or
     185    // when the fit / aperture radius is changed...
     186    psImageKeepCircle (source->maskObj, x, y, model->radiusFit, "OR", PM_MASK_MARK);
    185187
    186188    // measure the weight of included pixels
    187189    // XXX is this supposed to use the weight or the flux?
    188190    if (mode & PM_SOURCE_PHOT_WEIGHT) {
    189         pmSourcePixelWeight (&source->pixWeight, model, source->pixels, source->mask);
     191        pmSourcePixelWeight (&source->pixWeight, model, source->pixels, source->maskObj);
    190192    }
    191193
    192194    // measure object aperture photometry
    193     status = pmSourcePhotometryAper  (&source->apMag, model, flux, source->mask);
     195    status = pmSourcePhotometryAper  (&source->apMag, model, flux, source->maskObj);
    194196
    195197    // for PSFs, correct both apMag and psfMag to same system, consistent with infinite flux star in aperture RADIUS
     
    208210
    209211    // unmask aperture
    210     psImageKeepCircle (source->mask, x, y, model->radiusFit, "AND", PS_NOT_U8(PM_MASK_MARK));
     212    // XXX can I remove this?  this will probably break things downstream...
     213    psImageKeepCircle (source->maskObj, x, y, model->radiusFit, "AND", PS_NOT_U8(PM_MASK_MARK));
    211214
    212215    // if source was originally subtracted, re-subtract object, leave local sky
     216    // XXX replace with pmSourceSub...
    213217    if (source->mode & PM_SOURCE_MODE_SUBTRACTED) {
    214         pmModelSub (source->pixels, source->mask, model, PM_MODEL_OP_FULL);
     218        pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
    215219    }
    216220
     
    381385    const psImage *Wi = Mi->weight;
    382386
    383     const psImage *Ti = Mi->mask;
    384     const psImage *Tj = Mj->mask;
     387    const psImage *Ti = Mi->maskObj;
     388    const psImage *Tj = Mj->maskObj;
    385389
    386390    Xs = PS_MAX (Pi->col0, Pj->col0);
     
    437441    const psImage *Wi = Mi->weight;
    438442
    439     const psImage *Ti = Mi->mask;
    440     const psImage *Tj = Mj->mask;
     443    const psImage *Ti = Mi->maskObj;
     444    const psImage *Tj = Mj->maskObj;
    441445
    442446    Xs = PS_MAX (Pi->col0, Pj->col0);
     
    485489    const psImage *Pi = Mi->pixels;
    486490    const psImage *Wi = Mi->weight;
    487     const psImage *Ti = Mi->mask;
     491    const psImage *Ti = Mi->maskObj;
    488492
    489493    // note that this is addressing the same image pixels,
     
    545549}
    546550
    547 // given a source, which model is currently appropriate?
    548 // choose PSF or EXT based on source->type, but fall back on PSF
    549 // if the EXT model is NULL
    550 pmModel *pmSourceGetModel (bool *isPSF, const pmSource *source)
    551 {
    552 
    553     pmModel *model;
    554 
    555     switch (source->type) {
    556     case PM_SOURCE_TYPE_STAR:
    557         model = source->modelPSF;
    558         if (model == NULL)
    559             return NULL;
    560         if (isPSF)
    561             *isPSF = true;
    562         return model;
    563 
    564     case PM_SOURCE_TYPE_EXTENDED:
    565         model = source->modelEXT;
    566         if (isPSF)
    567             *isPSF = false;
    568         if (model == NULL) {
    569             model = source->modelPSF;
    570             if (isPSF)
    571                 *isPSF = true;
    572         }
    573         if (model == NULL) {
    574             if (isPSF)
    575                 *isPSF = FALSE;
    576             return NULL;
    577         }
    578         return (model);
    579         break;
    580 
    581     default:
    582         if (isPSF)
    583             *isPSF = false;
    584         return NULL;
    585     }
    586     return NULL;
    587 }
  • branches/eam_02_branch/psModules/src/objects/pmSourcePhotometry.h

    r11253 r12958  
    44 * @author EAM, IfA; GLG, MHPCC
    55 *
    6  * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-01-24 02:54:15 $
     6 * @version $Revision: 1.8.6.1 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2007-04-23 18:04:18 $
    88 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    99 */
     
    5454bool pmSourcePixelWeight (float *pixWeight, pmModel *model, psImage *image, psImage *mask);
    5555bool pmSourceChisq (pmModel *model, psImage *image, psImage *mask, psImage *weight);
    56 pmModel *pmSourceGetModel (bool *isPSF, const pmSource *source);
    5756
    5857double pmSourceWeight(const pmSource *Mi, int term, const bool unweighted_sum);
  • branches/eam_02_branch/psModules/src/objects/pmSourceSky.c

    r12943 r12958  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.10.4.1 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-21 00:03:31 $
     8 *  @version $Revision: 1.10.4.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-04-23 18:04:18 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4949    PS_ASSERT_PTR_NON_NULL(source, false);
    5050    PS_ASSERT_IMAGE_NON_NULL(source->pixels, false);
    51     PS_ASSERT_IMAGE_NON_NULL(source->mask, false);
     51    PS_ASSERT_IMAGE_NON_NULL(source->maskObj, false);
    5252    PS_ASSERT_PTR_NON_NULL(source->peak, false);
    5353    PS_ASSERT_INT_POSITIVE(Radius, false);
     
    6161
    6262    psImage *image = source->pixels;
    63     psImage *mask  = source->mask;
     63    psImage *mask  = source->maskObj;
    6464    pmPeak *peak  = source->peak;
    6565    psRegion srcRegion;
     
    100100    PS_ASSERT_PTR_NON_NULL(source, false);
    101101    PS_ASSERT_IMAGE_NON_NULL(source->weight, false);
    102     PS_ASSERT_IMAGE_NON_NULL(source->mask, false);
     102    PS_ASSERT_IMAGE_NON_NULL(source->maskObj, false);
    103103    PS_ASSERT_PTR_NON_NULL(source->peak, false);
    104104    PS_ASSERT_INT_POSITIVE(Radius, false);
     
    112112
    113113    psImage *image = source->weight;
    114     psImage *mask  = source->mask;
     114    psImage *mask  = source->maskObj;
    115115    pmPeak *peak  = source->peak;
    116116    psRegion srcRegion;
Note: See TracChangeset for help on using the changeset viewer.