IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 26, 2010, 3:52:55 PM (16 years ago)
Author:
rhenders
Message:

isnormal already checks for value==0; now filtering out all dodgy flux values

File:
1 edited

Legend:

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

    r27760 r27778  
    2323
    2424    //    printf("mag=%f\texpTime=%f\tzeroPoint=%f\tflux=%f\n", magnitude, exposureTime, zeroPoint, flux);
    25     return (isnormal(*flux) && *flux > 0.0) ? true : false;
     25    return (isnormal(*flux)) ? true : false;
    2626}
    2727
     
    286286                    imageID[s] = pspsImageId;
    287287                    obsTimes[s] = obsTime;
    288                     ippToPsps_getFlux(zeroPoint, exposureTime, instMagErr[s], &instFluxErr[s]);
    289                     ippToPsps_getFlux(zeroPoint, exposureTime, peakMag[s], &peakFlux[s]);
    290288
    291289                    // check for invalid flux values (if not already labelled as a duplicate)
    292                     if (!ippToPsps_getFlux(zeroPoint, exposureTime, instMag[s], &instFlux[s]) && !isDuplicate) {
     290                    if ((!ippToPsps_getFlux(zeroPoint, exposureTime, instMagErr[s], &instFluxErr[s]) ||
     291                                !ippToPsps_getFlux(zeroPoint, exposureTime, peakMag[s], &peakFlux[s]) ||
     292                                !ippToPsps_getFlux(zeroPoint, exposureTime, instMag[s], &instFlux[s])) && !isDuplicate) {
    293293                        removeList[numOfDuplicates+numInvalidFlux] = s+1;
    294294                        numInvalidFlux++;
     
    361361    status=0;
    362362    if (fits_movnam_hdu(this->fitsOut, BINARY_TBL, "FrameMeta", 0, &status))
    363             psError(PS_ERR_IO, false, "Can't move back to FrameMeta extension to write number of OTAs\n");
     363        psError(PS_ERR_IO, false, "Can't move back to FrameMeta extension to write number of OTAs\n");
    364364    else
    365365        fits_write_col(this->fitsOut, TSHORT, FRAMEMETA_NOTA, 1, 1, 1, &nOta, &status);
Note: See TracChangeset for help on using the changeset viewer.