Changeset 34086 for trunk/psphot/src/psphotReadout.c
- Timestamp:
- Jun 26, 2012, 11:33:10 AM (14 years ago)
- Location:
- trunk/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120601/psphot (added) merged: 34002,34032,34049,34051,34053,34055-34056,34060-34061,34071-34073,34076,34078
- Property svn:mergeinfo changed
-
trunk/psphot/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120601/psphot/src (added) merged: 34049,34051,34053,34060-34061,34071-34073,34078
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotReadout.c
r33915 r34086 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
Note:
See TracChangeset
for help on using the changeset viewer.
