IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 26, 2007, 5:35:47 PM (19 years ago)
Author:
eugene
Message:

various cleanups of I/O operations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSourceSize.c

    r13086 r15040  
    77
    88bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe) {
    9 
    10     FILE *f = fopen ("srcsize.dat", "w");
    119
    1210    // loop over all source
     
    5351        // P(chisq > chisq_obs; Ndof) = gamma_Q (Ndof/2, chisq/2)
    5452        // Ndof = 4 ? (four measurements, no free parameters)
    55         float Ppsf = gsl_sf_gamma_inc_Q (2, 0.5*chisq);
     53        // XXX this value is going to be biased low because of systematic errors.
     54        // we need to calibrate it somehow
     55        source->psfProb = gsl_sf_gamma_inc_Q (2, 0.5*chisq);
    5656
    5757        float fCR = 0.0;
     
    8787            nEXT ++;
    8888        }
    89         fCR = (nCR > 0) ? fCR / nCR : 0.0;
    90         fEXT = (nEXT > 0) ? fEXT / nEXT : 0.0;
    91 
    92         // XXX plot this as a function of flux / magnitude?
    93         // XXX overlay outliers on an image?
    94        
    95         fprintf (f, "%f %f %f   %f %f   %f %f\n", source->peak->xf, source->peak->yf, source->peak->flux,
    96                  chisq, Ppsf, fCR, fEXT);
     89        source->crNsigma  = (nCR > 0)  ? fCR / nCR : 0.0;
     90        source->extNsigma = (nEXT > 0) ? fEXT / nEXT : 0.0;
    9791    }
    98     fclose (f);
    9992    return true;
    10093}
Note: See TracChangeset for help on using the changeset viewer.