Changeset 34072
- Timestamp:
- Jun 25, 2012, 5:15:13 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120601/psphot
- Files:
-
- 2 edited
-
src/psphotReadout.c (modified) (1 diff)
-
test/tap_psphot_varmodel.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120601/psphot/src/psphotReadout.c
r33915 r34072 9 9 } 10 10 11 # if (0) 12 // TEST CODE, can be removed 13 bool psphotDumpFlux (pmConfig *config, const pmFPAview *view, const char *filerule) { 14 15 bool status = false; 16 17 // find the currently selected readout 18 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, 0); // File of interest 19 psAssert (file, "missing file?"); 20 21 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 22 psAssert (readout, "missing readout?"); 23 24 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 25 psAssert (detections, "missing detections?"); 26 27 psArray *sources = detections->allSources; 28 psAssert (sources, "missing sources?"); 29 30 static int npass; 31 char filename[64]; 32 snprintf (filename, 64, "mags.%d.dat", npass); 33 FILE *ftest = fopen (filename, "w"); 34 for (int j = 0; j < sources->n; j++) { 35 pmSource *source = sources->data[j]; 36 37 float psfMag; 38 status = pmSourcePhotometryModel (&psfMag, NULL, source->modelPSF); 39 40 float psfMagNorm; 41 float Io = source->modelPSF->params->data.F32[PM_PAR_I0]; 42 source->modelPSF->params->data.F32[PM_PAR_I0] = 1.0; 43 status = pmSourcePhotometryModel (&psfMagNorm, NULL, source->modelPSF); 44 source->modelPSF->params->data.F32[PM_PAR_I0] = Io; 45 46 // double apTrend = pmTrend2DEval (psf->ApTrend, (float)source->peak->x, (float)source->peak->y); 47 fprintf (ftest, "%d %d %d %f %f %f %f %f %f\n", j, source->peak->x, source->peak->y, source->modelPSF->params->data.F32[PM_PAR_I0], source->modelPSF->params->data.F32[PM_PAR_SXX], source->modelPSF->params->data.F32[PM_PAR_SYY], source->modelPSF->params->data.F32[PM_PAR_SXY], psfMag, psfMagNorm); 48 } 49 fclose (ftest); 50 npass++; 51 52 return true; 53 } 54 # endif 55 11 56 bool psphotReadout(pmConfig *config, const pmFPAview *view, const char *filerule) { 12 57 -
branches/eam_branches/ipp-20120601/psphot/test/tap_psphot_varmodel.pro
r34056 r34072 89 89 sprintf name "test/test.%02d.%02d.%s" $sky {10*$fwhm} $psf_in 90 90 # mkexp $name $sky $fwhm $psf_in 91 data $name.dat 92 read fluxIn 3 MagPredIn 5 93 set MagRealIn = -2.5*log(fluxIn) 94 set dMagIn = MagRealIn - MagPredIn 91 95 92 96 foreach psf_out GAUSS PS1_V1 … … 270 274 section a1 0.0 0.50 1.0 0.25 271 275 lim rv -0.025 0.075; label -fn courier 14; box; 272 plot -c black -pt 0 -sz 0.3 MagPredIn dMagIn276 # plot -c black -pt 0 -sz 0.3 MagPredIn dMagIn 273 277 plot -c red -pt 7 -sz 2.0 imag_V dmag_V 274 278 plot -c darkgreen -pt 3 -sz 2.0 imag_V Dmag_V … … 279 283 sprintf line "OFFSET: %6.3f" $offset 280 284 textline -frac 0.1 0.8 -fn courier 24 "$line" 285 286 subset dmsub = delta if (rv < -13) && (rv > -16) 287 vstat -q dmsub 288 sprintf line "STDEV: %6.3f" $SIGMA 289 textline -frac 0.1 0.7 -fn courier 24 "$line" 281 290 282 291
Note:
See TracChangeset
for help on using the changeset viewer.
