Changeset 8882 for trunk/psModules/src/objects
- Timestamp:
- Sep 22, 2006, 2:29:31 AM (20 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 6 edited
-
pmModel.h (modified) (2 diffs)
-
pmPSFtry.c (modified) (3 diffs)
-
pmSourceIO_CMP.c (modified) (3 diffs)
-
pmSourceIO_OBJ.c (modified) (3 diffs)
-
pmSourceIO_RAW.c (modified) (3 diffs)
-
pmSourceIO_SX.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmModel.h
r6872 r8882 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 4-17 18:01:05$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-09-22 12:24:38 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 } 50 50 pmModel; 51 52 /** Symbolic names for the elements of [d]params 53 * Note: these are #defines not enums as a given element of [d]params 54 * may/will correspond to different parameters in different contexts 55 */ 56 #define PM_PAR_SKY 0 // Sky 57 #define PM_PAR_FLUX 1 // Flux 58 #define PM_PAR_XPOS 2 // X centre of object 59 #define PM_PAR_YPOS 3 // Y centre of object 60 #define PM_PAR_SXX 4 // shape X^2 moment 61 #define PM_PAR_SYY 5 // shape Y^2 moment 62 #define PM_PAR_SXY 6 // shape XY moment 63 #define PM_PAR_7 7 // ??? Unknown parameter 64 #define PM_PAR_8 8 // ??? Unknown parameter 51 65 52 66 /** pmModelAlloc() -
trunk/psModules/src/objects/pmPSFtry.c
r8815 r8882 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-09- 15 09:49:01$7 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-09-22 12:24:38 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 191 191 psTrace ("psphot.psftry", 3, "keeping %d of %ld PSF candidates (PSF)\n", Npsf, sources->n); 192 192 193 // measure the chi-square trend as a function of flux (PAR[ 1])193 // measure the chi-square trend as a function of flux (PAR[PM_PAR_FLUX]) 194 194 // this should be linear for Poisson errors and quadratic for constant sky errors 195 195 psVector *flux = psVectorAlloc (psfTry->sources->n, PS_TYPE_F64); … … 206 206 mask->data.U8[i] = 1; 207 207 } else { 208 flux->data.F64[i] = model->params->data.F32[ 1];208 flux->data.F64[i] = model->params->data.F32[PM_PAR_FLUX]; 209 209 chisq->data.F64[i] = model[0].chisq/model[0].nDOF; 210 210 mask->data.U8[i] = 0; -
trunk/psModules/src/objects/pmSourceIO_CMP.c
r8815 r8882 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-09- 15 09:49:01$5 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-09-22 12:24:38 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 116 116 117 117 type = pmSourceDophotType (source); 118 lsky = (PAR[ 0] < 1.0) ? 0.0 : log10(PAR[0]);119 120 shape.sx = PAR[ 4];121 shape.sy = PAR[ 5];122 shape.sxy = PAR[ 6];118 lsky = (PAR[PM_PAR_SKY] < 1.0) ? 0.0 : log10(PAR[PM_PAR_SKY]); 119 120 shape.sx = PAR[PM_PAR_SXX]; 121 shape.sy = PAR[PM_PAR_SYY]; 122 shape.sxy = PAR[PM_PAR_SXY]; 123 123 axes = psEllipseShapeToAxes (shape); 124 124 125 125 psLineInit (line); 126 psLineAdd (line, "%6.1f ", PAR[ 2]);127 psLineAdd (line, "%6.1f ", PAR[ 3]);126 psLineAdd (line, "%6.1f ", PAR[PM_PAR_XPOS]); 127 psLineAdd (line, "%6.1f ", PAR[PM_PAR_YPOS]); 128 128 psLineAdd (line, "%6.3f ", PS_MIN (99.0, source->psfMag + ZERO_POINT)); 129 129 psLineAdd (line, "%03d ", PS_MIN (999, (int)(1000*source->errMag))); … … 253 253 dPAR = model->dparams->data.F32; 254 254 255 PAR[ 0]= pow (atof (array->data[5]), 10.0);256 PAR[ 2]= atof (array->data[0]);257 PAR[ 3]= atof (array->data[1]);255 PAR[PM_PAR_SKY] = pow (atof (array->data[5]), 10.0); 256 PAR[PM_PAR_XPOS] = atof (array->data[0]); 257 PAR[PM_PAR_YPOS] = atof (array->data[1]); 258 258 source->psfMag = atof (array->data[2]); 259 259 source->extMag = atof (array->data[6]); -
trunk/psModules/src/objects/pmSourceIO_OBJ.c
r8815 r8882 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-09- 15 09:49:01$5 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-09-22 12:24:38 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 62 62 dPAR = model->dparams->data.F32; 63 63 64 dmag = dPAR[ 1] / PAR[1];64 dmag = dPAR[PM_PAR_FLUX] / PAR[PM_PAR_FLUX]; 65 65 type = pmSourceDophotType (source); 66 66 if ((source->apMag < 99.0) && (source->psfMag < 99.0)) { … … 70 70 } 71 71 72 shape.sx = PAR[ 4];73 shape.sy = PAR[ 5];74 shape.sxy = PAR[ 6];72 shape.sx = PAR[PM_PAR_SXX]; 73 shape.sy = PAR[PM_PAR_SYY]; 74 shape.sxy = PAR[PM_PAR_SXY]; 75 75 axes = psEllipseShapeToAxes (shape); 76 76 77 77 psLineInit (line); 78 78 psLineAdd (line, "%3d", type); 79 psLineAdd (line, "%8.2f", PAR[ 2]);80 psLineAdd (line, "%8.2f", PAR[ 3]);79 psLineAdd (line, "%8.2f", PAR[PM_PAR_XPOS]); 80 psLineAdd (line, "%8.2f", PAR[PM_PAR_YPOS]); 81 81 psLineAdd (line, "%8.3f", source->psfMag); 82 82 psLineAdd (line, "%6.3f", dmag); 83 psLineAdd (line, "%9.2f", PAR[ 0]);83 psLineAdd (line, "%9.2f", PAR[PM_PAR_SKY]); 84 84 psLineAdd (line, "%9.3f", axes.major); 85 85 psLineAdd (line, "%9.3f", axes.minor); -
trunk/psModules/src/objects/pmSourceIO_RAW.c
r8815 r8882 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-09- 15 09:49:01$5 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-09-22 12:24:38 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 84 84 85 85 // dPos is positional error, dMag is mag error 86 dPos = hypot (dPAR[ 2], dPAR[3]);86 dPos = hypot (dPAR[PM_PAR_XPOS], dPAR[PM_PAR_YPOS]); 87 87 88 88 fprintf (f, "%7.1f %7.1f %7.1f %8.4f %7.4f %7.4f ", 89 PAR[2], PAR[3], PAR[0], source->psfMag, source->errMag, dPos); 89 PAR[PM_PAR_XPOS], PAR[PM_PAR_YPOS], PAR[PM_PAR_SKY], 90 source->psfMag, source->errMag, dPos); 90 91 91 92 for (j = 4; j < model->params->n; j++) { … … 142 143 // dPos is shape error 143 144 // XXX these are hardwired for SGAUSS 144 dPos = hypot ((dPAR[ 4] / PAR[4]), (dPAR[5] / PAR[5]));145 dPos = hypot ((dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]), (dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY])); 145 146 146 147 fprintf (f, "%7.1f %7.1f %7.1f %8.4f %7.4f %7.4f ", 147 PAR[2], PAR[3], PAR[0], source->extMag, source->errMag, dPos); 148 PAR[PM_PAR_XPOS], PAR[PM_PAR_YPOS], PAR[PM_PAR_SKY], 149 source->extMag, source->errMag, dPos); 148 150 149 151 for (j = 4; j < model->params->n; j++) { -
trunk/psModules/src/objects/pmSourceIO_SX.c
r8815 r8882 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-09- 15 09:49:01$5 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-09-22 12:24:38 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 // pmSourceSextractType (source, &type, &flags); 61 61 62 shape.sx = PAR[ 4];63 shape.sy = PAR[ 5];64 shape.sxy = PAR[ 6];62 shape.sx = PAR[PM_PAR_SXX]; 63 shape.sy = PAR[PM_PAR_SYY]; 64 shape.sxy = PAR[PM_PAR_SXY]; 65 65 axes = psEllipseShapeToAxes (shape); 66 66 67 67 psLineInit (line); 68 68 psLineAdd (line, "%5.2f", 0.0); // should be type 69 psLineAdd (line, "%11.3f", PAR[ 2]);70 psLineAdd (line, "%11.3f", PAR[ 3]);69 psLineAdd (line, "%11.3f", PAR[PM_PAR_XPOS]); 70 psLineAdd (line, "%11.3f", PAR[PM_PAR_YPOS]); 71 71 psLineAdd (line, "%9.4f", source->psfMag); 72 72 psLineAdd (line, "%9.4f", source->errMag); 73 psLineAdd (line, "%13.4f", PAR[ 0]);73 psLineAdd (line, "%13.4f", PAR[PM_PAR_SKY]); 74 74 psLineAdd (line, "%9.2f", axes.major); 75 75 psLineAdd (line, "%9.2f", axes.minor);
Note:
See TracChangeset
for help on using the changeset viewer.
