IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 24, 2010, 12:10:33 PM (15 years ago)
Author:
eugene
Message:

negative flux sources should have positive S/N

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101103/psModules/src/objects/pmSourcePhotometry.c

    r29546 r29823  
    107107    // XXX handle negative flux, low-significance
    108108    if (model->dparams->data.F32[PM_PAR_I0] > 0) {
    109         SN = model->params->data.F32[PM_PAR_I0] / model->dparams->data.F32[PM_PAR_I0];
     109        SN = fabs(model->params->data.F32[PM_PAR_I0] / model->dparams->data.F32[PM_PAR_I0]);
    110110        source->errMag = 1.0 / SN;
    111111    } else {
     
    331331    }
    332332    if (apFluxOut) *apFluxOut = apFlux;
    333     if (apFluxErr) *apFluxErr = sqrt(apFluxVar);
     333    if (apFluxErr) *apFluxErr = sqrt(fabs(apFluxVar));
    334334
    335335    if (apFlux <= 0) {
Note: See TracChangeset for help on using the changeset viewer.