Changeset 6556 for branches/rel10_ifa/psModules/src/objects/pmSourceIO_SX.c
- Timestamp:
- Mar 8, 2006, 5:14:23 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/objects/pmSourceIO_SX.c
r6545 r6556 1 # include "pmSource.h" 1 /** @file pmSourceIO.c 2 * 3 * @author EAM, IfA 4 * 5 * @version $Revision: 1.1.2.2 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-03-09 03:14:23 $ 7 * 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 9 * 10 */ 11 12 #include <stdio.h> 13 #include <math.h> 14 #include <string.h> 15 #include "pslib.h" 16 #include "psLine.h" 17 #include "psEllipse.h" 18 #include "pmHDU.h" 19 #include "pmFPA.h" 20 #include "pmPeaks.h" 21 #include "pmMoments.h" 22 #include "pmGrowthCurve.h" 23 #include "pmModel.h" 24 #include "pmPSF.h" 25 #include "pmSource.h" 26 #include "pmModelGroup.h" 27 #include "pmSourceIO.h" 2 28 3 29 // elixir-mode / sextractor-style output list with fixed line width … … 6 32 7 33 psF32 *PAR, *dPAR; 8 float dmag; 34 EllipseShape shape; 35 EllipseAxes axes; 9 36 10 37 psLine *line = psLineAlloc (110); // 110 is sextractor line length … … 19 46 for (int i = 0; i < sources->n; i++) { 20 47 pmSource *source = (pmSource *) sources->data[i]; 21 pmModel *model = pm ModelSelect(source);48 pmModel *model = pmSourceSelectModel (source); 22 49 if (model == NULL) 23 50 continue; … … 28 55 // pmSourceSextractType (source, &type, &flags); 29 56 30 dmag = dPAR[1] / PAR[1]; 57 shape.sx = PAR[4]; 58 shape.sy = PAR[5]; 59 shape.sxy = PAR[6]; 60 axes = EllipseShapeToAxes (shape); 31 61 32 62 psLineInit (line); 33 psLineAdd (line, "%5.2f", 0.0); // should be type63 psLineAdd (line, "%5.2f", 0.0); // should be type 34 64 psLineAdd (line, "%11.3f", PAR[2]); 35 65 psLineAdd (line, "%11.3f", PAR[3]); 36 psLineAdd (line, "%9.4f", source->fitMag);37 psLineAdd (line, "%9.4f", dmag);66 psLineAdd (line, "%9.4f", source->psfMag); 67 psLineAdd (line, "%9.4f", source->errMag); 38 68 psLineAdd (line, "%13.4f", PAR[0]); 39 psLineAdd (line, "%9.2f", 0.0); // should be FWHMx40 psLineAdd (line, "%9.2f", 0.0); // should be FWHMy41 psLineAdd (line, "%6.1f", 0.0); // should be Theta42 psLineAdd (line, "%9.4f", 99.999); // should be MAG_ISO43 psLineAdd (line, "%9.4f", source->apMag);44 psLineAdd (line, "%4d\n", 0); // should be flags69 psLineAdd (line, "%9.2f", axes.major); 70 psLineAdd (line, "%9.2f", axes.minor); 71 psLineAdd (line, "%6.1f", axes.theta); 72 psLineAdd (line, "%9.4f", source->extMag); 73 psLineAdd (line, "%9.4f", source->apMag); 74 psLineAdd (line, "%4d\n", 0); // should be flags 45 75 fwrite (line->line, 1, line->Nline, f); 46 76 }
Note:
See TracChangeset
for help on using the changeset viewer.
