IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25681


Ignore:
Timestamp:
Sep 29, 2009, 9:59:51 PM (17 years ago)
Author:
eugene
Message:

catch NAN in dflux, soften dflux for more general fits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotMakeResiduals.c

    r25671 r25681  
    11# include "psphotInternal.h"
     2
     3# define RESIDUAL_SOFTENING 0.005
    24
    35bool psphotMakeResiduals (psArray *sources, psMetadata *recipe, pmPSF *psf, psImageMaskType maskVal) {
     
    181183                }
    182184                fluxes->data.F32[i] = flux;
    183                 dfluxes->data.F32[i] = dflux;
     185                dfluxes->data.F32[i] = hypot(dflux, RESIDUAL_SOFTENING);
    184186                if (isnan(flux)) {
     187                    fmasks->data.PS_TYPE_VECTOR_MASK_DATA[i] = badMask;
     188                }
     189                if (isnan(dflux)) {
    185190                    fmasks->data.PS_TYPE_VECTOR_MASK_DATA[i] = badMask;
    186191                }
Note: See TracChangeset for help on using the changeset viewer.