Changeset 10194 for trunk/psModules/test/objects
- Timestamp:
- Nov 26, 2006, 12:03:23 PM (19 years ago)
- Location:
- trunk/psModules/test/objects
- Files:
-
- 1 added
- 4 edited
-
. (modified) (1 prop)
-
.cvsignore (modified) (1 diff)
-
Makefile.am (modified) (1 diff)
-
tap_pmSourceFitModel.c (modified) (2 diffs)
-
tap_pmSourceFitModel_Delta.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/objects
- Property svn:ignore
-
old new 4 4 Makefile.in 5 5 temp 6 tap_* 6 tap_pmGrowthCurve 7 tap_pmSourceFitModel 8 tap_pmSourceFitModel_Delta 9 tap_pmSourcePhotometry
-
- Property svn:ignore
-
trunk/psModules/test/objects/.cvsignore
r10095 r10194 4 4 Makefile.in 5 5 temp 6 tap_* 6 tap_pmGrowthCurve 7 tap_pmSourceFitModel 8 tap_pmSourceFitModel_Delta 9 tap_pmSourcePhotometry -
trunk/psModules/test/objects/Makefile.am
r10079 r10194 18 18 tap_pmSourcePhotometry \ 19 19 tap_pmGrowthCurve \ 20 tap_pmSourceFitModel 20 tap_pmSourceFitModel \ 21 tap_pmSourceFitModel_Delta 21 22 22 23 test: check -
trunk/psModules/test/objects/tap_pmSourceFitModel.c
r10098 r10194 8 8 9 9 bool fitModels (psRandom *seed, float flux, float radius, float sigma); 10 11 // create a single source (sigma =12 10 bool fitModelFlux (psRandom *seed, float flux, float radius, float sigma); 13 11 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? 14 18 int main (void) 15 19 { … … 68 72 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV); 69 73 psVectorStats (stats, par1, NULL, NULL, 0); 70 // fprintf (stderr, "Io: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dMag);71 74 ok ((stats->sampleStdev/dMag < 2.0), "Io ref/fit stdev: %f : %f sigma", stats->sampleStdev, stats->sampleStdev/dMag); 72 75 psVectorStats (stats, par2, NULL, NULL, 0); 73 // fprintf (stderr, "Xo: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dPos);74 76 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);76 77 psVectorStats (stats, par3, NULL, NULL, 0); 77 // fprintf (stderr, "Yo: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dPos);78 78 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);80 79 psVectorStats (stats, par4, NULL, NULL, 0); 81 // fprintf (stderr, "Sx: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dMag);82 80 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);84 81 psVectorStats (stats, par5, NULL, NULL, 0); 85 // fprintf (stderr, "Sy: %f +/- %f : %f sig\n", stats->sampleMean, stats->sampleStdev, stats->sampleStdev/dMag);86 82 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);88 83 89 84 psFree (par1);
Note:
See TracChangeset
for help on using the changeset viewer.
