IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10194


Ignore:
Timestamp:
Nov 26, 2006, 12:03:23 PM (19 years ago)
Author:
magnier
Message:

added tests to check GaussNewtonDelta

Location:
trunk/psModules/test/objects
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/objects

    • Property svn:ignore
      •  

        old new  
        44Makefile.in
        55temp
        6 tap_*
         6tap_pmGrowthCurve
         7tap_pmSourceFitModel
         8tap_pmSourceFitModel_Delta
         9tap_pmSourcePhotometry
  • trunk/psModules/test/objects/.cvsignore

    r10095 r10194  
    44Makefile.in
    55temp
    6 tap_*
     6tap_pmGrowthCurve
     7tap_pmSourceFitModel
     8tap_pmSourceFitModel_Delta
     9tap_pmSourcePhotometry
  • trunk/psModules/test/objects/Makefile.am

    r10079 r10194  
    1818        tap_pmSourcePhotometry \
    1919        tap_pmGrowthCurve \
    20         tap_pmSourceFitModel
     20        tap_pmSourceFitModel \
     21        tap_pmSourceFitModel_Delta
    2122
    2223test: check
  • trunk/psModules/test/objects/tap_pmSourceFitModel.c

    r10098 r10194  
    88
    99bool fitModels (psRandom *seed, float flux, float radius, float sigma);
    10 
    11 // create a single source (sigma =
    1210bool fitModelFlux (psRandom *seed, float flux, float radius, float sigma);
    1311
     12// tests to check accuracy of fitted models for a range of fit radii, sigma, and flux.
     13// we generate a fake source, then fit the model to it.  the difference or fractional
     14// difference between the true and fitted parameters is saved.
     15// we run these tests 200 times each an examine the resulting distribution of deviations.
     16// the tests fail if the stdevs are more than 2x the expected stdev based on poisson noise
     17// ** is 2x too generous?
    1418int main (void)
    1519{
     
    6872    psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV);
    6973    psVectorStats (stats, par1, NULL, NULL, 0);
    70     // fprintf (stderr, "Io: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dMag);
    7174    ok ((stats->sampleStdev/dMag < 2.0), "Io ref/fit stdev: %f : %f sigma", stats->sampleStdev, stats->sampleStdev/dMag);
    7275    psVectorStats (stats, par2, NULL, NULL, 0);
    73     // fprintf (stderr, "Xo: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dPos);
    7476    ok ((stats->sampleStdev/dPos < 2.0), "Xo ref/fit stdev: %f : %f sigma", stats->sampleStdev, stats->sampleStdev/dPos);
    75     // ok_float_tol (stats->sampleStdev, 0.0, 0.0, "Xo ref-fit stdev: %f", stats->sampleStdev);
    7677    psVectorStats (stats, par3, NULL, NULL, 0);
    77     // fprintf (stderr, "Yo: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dPos);
    7878    ok ((stats->sampleStdev/dPos < 2.0), "Yo ref/fit stdev: %f : %f sigma", stats->sampleStdev, stats->sampleStdev/dPos);
    79     // ok_float_tol (stats->sampleStdev, 0.0, 0.0, "Yo ref-fit stdev: %f", stats->sampleStdev);
    8079    psVectorStats (stats, par4, NULL, NULL, 0);
    81     // fprintf (stderr, "Sx: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dMag);
    8280    ok ((stats->sampleStdev/dMag < 2.0), "Sx ref/fit stdev: %f : %f sigma", stats->sampleStdev, stats->sampleStdev/dMag);
    83     // ok_float_tol (stats->sampleStdev, 0.0, 0.0, "Sx ref/fit stdev: %f", stats->sampleStdev);
    8481    psVectorStats (stats, par5, NULL, NULL, 0);
    85     // fprintf (stderr, "Sy: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dMag);
    8682    ok ((stats->sampleStdev/dMag < 2.0), "Sy ref/fit stdev: %f : %f sigma", stats->sampleStdev, stats->sampleStdev/dMag);
    87     // ok_float_tol (stats->sampleStdev, 0.0, 0.0, "Sy ref/fit stdev: %f", stats->sampleStdev);
    8883
    8984    psFree (par1);
Note: See TracChangeset for help on using the changeset viewer.