IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 5, 2010, 9:33:17 PM (15 years ago)
Author:
eugene
Message:

support for compressed metadata config files; removed commented-out code in pmNonLinear.c; add functions to set file and data status in pmFPAfiles; do not fail in pmFPAfileIO on inactive internal files; S/N for low-sig sources is always positive; do not copy NULL pixels in pmSourceCopy

Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSource.c

    r29546 r29935  
    189189    // pixels.  Modifying these pixels (ie, subtracting the model) will affect the pixels seen
    190190    // by all copies.
    191     source->pixels   = psImageCopyView(NULL, in->pixels);
    192     source->variance   = psImageCopyView(NULL, in->variance);
     191    source->pixels   = in->pixels   ? psImageCopyView(NULL, in->pixels)   : NULL;
     192    source->variance = in->variance ? psImageCopyView(NULL, in->variance) : NULL;
    193193    source->maskView = in->maskView ? psImageCopyView(NULL, in->maskView) : NULL;
    194194
  • trunk/psModules/src/objects/pmSourcePhotometry.c

    r29546 r29935  
    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.