- Timestamp:
- Sep 21, 2007, 4:20:17 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070921/psModules/src/objects/pmPSF.c
r14972 r14980 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1.28.2. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-09-2 1 21:45:00$8 * @version $Revision: 1.28.2.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-09-22 02:20:11 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 45 45 46 46 static void pmPSFOptionsFree (pmPSFOptions *options) { 47 48 if (!options) return; 49 50 psFree (options->image); 51 psFree (options->stats); 47 52 return; 48 53 } … … 54 59 55 60 options->type = 0; 56 options->poissonErrors = false; 61 62 options->image = NULL; 63 options->stats = NULL; 64 57 65 options->psfTrendMode = PM_TREND_NONE; 58 66 options->psfTrendNx = 0; 59 67 options->psfTrendNy = 0; 68 69 options->poissonErrors = false; 60 70 } 61 71 … … 136 146 } 137 147 psf->params = psArrayAlloc(Nparams); 148 149 // save the trend stats on the psf for use in pmPSFFromPSFtry 150 psf->psfTrendStats = psMemIncrRefCounter (options->stats); 138 151 139 152 // the order of the PSF parameter (X,Y) fits is determined by the psfTrendMask polynomial … … 144 157 // PM_PAR_XPOS, etc) 145 158 146 // XXX make this a user option 147 psStats *stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 148 149 // XXX define new structure to carry in the psf options 159 // define the parameter trends 150 160 if (options->psfTrendMode != PM_TREND_NONE) { 151 161 for (int i = 0; i < psf->params->n; i++) { … … 155 165 if (i == PM_PAR_YPOS) continue; 156 166 157 // XXX need to set stats & image or else nXfine,nYfine 158 pmTrend2D *param = pmTrend2DAlloc (options->psfTrendMode, image, options->psfTrendNx, options->psfTrendNx, stats); 159 psf->params->data[i] = param; 167 psf->params->data[i] = pmTrend2DAlloc (options->psfTrendMode, options->image, options->psfTrendNx, options->psfTrendNx, options->stats); 160 168 } 161 169 } 162 163 psFree (stats);164 170 return psf; 165 171 } … … 287 293 288 294 // generate a psf model of the requested type, with fixed shape 295 // XXX update this. 289 296 pmPSF *pmPSFBuildSimple (char *typeName, float sxx, float syy, float sxy, ...) 290 297 {
Note:
See TracChangeset
for help on using the changeset viewer.
