- Timestamp:
- Sep 21, 2007, 8:55:12 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070921/psModules/src/objects/pmPSF.c
r14961 r14969 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $9 * @date $Date: 2007-09-21 02:46:25$8 * @version $Revision: 1.28.2.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-09-21 18:55:11 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 64 64 /*****************************************************************************/ 65 65 66 static void pmPSFOptionsFree (pmPSFOptions *options) { 67 68 return; 69 } 70 71 pmPSFOptions *pmPSFOptionsAlloc () { 72 73 pmPSFOptions *options = (pmPSFOptions *) psAlloc(sizeof(pmPSFOptions)); 74 75 options->type = 0; 76 options->poissonErrors = false; 77 options->psfTrendMode = PM_TREND_MAP; 78 options->psfTrendNx = 0; 79 options->psfTrendNy = 0; 80 } 81 66 82 /***************************************************************************** 67 83 pmPSFFree(psf): function to free a pmPSF structure … … 94 110 Object Normalization 95 111 *****************************************************************************/ 96 pmPSF *pmPSFAlloc (pm ModelType type, bool poissonErrors, psPolynomial2D *psfTrendMask)112 pmPSF *pmPSFAlloc (pmPSFOptions *options) 97 113 { 98 114 int Nparams; … … 100 116 pmPSF *psf = (pmPSF *) psAlloc(sizeof(pmPSF)); 101 117 102 psf->type = type;118 psf->type = options->type; 103 119 psf->chisq = 0.0; 104 120 psf->ApResid = 0.0; … … 108 124 psf->nPSFstars = 0; 109 125 psf->nApResid = 0; 110 psf->poissonErrors = poissonErrors;126 psf->poissonErrors = options->poissonErrors; 111 127 112 128 // the ApTrend components are (x, y). It may be represented with a polynomial or with a … … 147 163 // PM_PAR_XPOS, etc) 148 164 165 // XXX define new structure to carry in the psf options 149 166 if (psfTrendMask) { 150 167 for (int i = 0; i < psf->params->n; i++) { … … 158 175 continue; 159 176 160 psPolynomial2D *param = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, psfTrendMask->nX, psfTrendMask->nY); 161 for (int nx = 0; nx < param->nX + 1; nx++) { 162 for (int ny = 0; ny < param->nY + 1; ny++) { 163 param->mask[nx][ny] = psfTrendMask->mask[nx][ny]; 164 } 165 } 177 // XXX need to set stats, image 178 pmTrend2D *param = pmTrend2DAlloc (options->psfTrendMode, image, options->psfTrendNx, options->psfTrendNx, stats); 166 179 psf->params->data[i] = param; 167 180 }
Note:
See TracChangeset
for help on using the changeset viewer.
