IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28700


Ignore:
Timestamp:
Jul 22, 2010, 4:33:34 PM (16 years ago)
Author:
rhenders
Message:

Fixed problem with flux errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/src/ippToPspsBatchDetection.c

    r28698 r28700  
    1717
    1818    *flux = powf(10.0, -0.4*magnitude) / exposureTime;
    19     if (fluxErr) *fluxErr = (magnitudeErr * *flux)/1.085736;
    20 //if (fluxErr)    printf("Mag = %03.03f, Flux = %03.03f, Mag err = %03.03f, Flux Err = %03.03f\n", magnitude, *flux, magnitudeErr, *fluxErr);
    21     return (!isfinite(*flux) || *flux < 0.000001) ? false : true;
     19    if (!isfinite(*flux) || *flux < 0.000001) return false;
     20    if (fluxErr) *fluxErr = fabsf((magnitudeErr * *flux)/1.085736);
     21    //  if (fluxErr)    printf("Mag = %03.03f, Flux = %03.03f, Mag err = %03.03f, Flux Err = %03.03f\n", magnitude, *flux, magnitudeErr, *fluxErr);
     22         
     23    return true;
    2224}
    2325
     
    294296                    obsTimes[s] = obsTime;
    295297
    296 //                    ippToPsps_getFlux(exposureTime, instMagErr[s], &instFluxErr[s]);
    297 
    298298                    // calculate flux and flux errors from magnitudes
    299299                    peakFluxOk = ippToPsps_getFlux(exposureTime, peakMag[s], &peakFlux[s], 0.0, NULL);
Note: See TracChangeset for help on using the changeset viewer.