- Timestamp:
- Sep 21, 2007, 11:45:00 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070921/psModules/src/objects/pmPSF.c
r14969 r14972 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1.28.2. 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-09-21 18:55:11$8 * @version $Revision: 1.28.2.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-09-21 21:45:00 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 41 41 42 42 /*****************************************************************************/ 43 /* DEFINE STATEMENTS */44 /*****************************************************************************/45 46 /*****************************************************************************/47 /* TYPE DEFINITIONS */48 /*****************************************************************************/49 50 /*****************************************************************************/51 /* GLOBAL VARIABLES */52 /*****************************************************************************/53 54 /*****************************************************************************/55 /* FILE STATIC VARIABLES */56 /*****************************************************************************/57 58 /*****************************************************************************/59 /* FUNCTION IMPLEMENTATION - LOCAL */60 /*****************************************************************************/61 62 /*****************************************************************************/63 43 /* FUNCTION IMPLEMENTATION - PUBLIC */ 64 44 /*****************************************************************************/ 65 45 66 46 static void pmPSFOptionsFree (pmPSFOptions *options) { 67 68 47 return; 69 48 } … … 72 51 73 52 pmPSFOptions *options = (pmPSFOptions *) psAlloc(sizeof(pmPSFOptions)); 53 psMemSetDeallocator(options, (psFreeFunc) pmPSFOptionsFree); 74 54 75 55 options->type = 0; 76 56 options->poissonErrors = false; 77 options->psfTrendMode = PM_TREND_ MAP;57 options->psfTrendMode = PM_TREND_NONE; 78 58 options->psfTrendNx = 0; 79 59 options->psfTrendNy = 0; … … 115 95 116 96 pmPSF *psf = (pmPSF *) psAlloc(sizeof(pmPSF)); 97 psMemSetDeallocator(psf, (psFreeFunc) pmPSFFree); 117 98 118 99 psf->type = options->type; … … 163 144 // PM_PAR_XPOS, etc) 164 145 146 // XXX make this a user option 147 psStats *stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 148 165 149 // XXX define new structure to carry in the psf options 166 if ( psfTrendMask) {150 if (options->psfTrendMode != PM_TREND_NONE) { 167 151 for (int i = 0; i < psf->params->n; i++) { 168 if (i == PM_PAR_SKY) 169 continue; 170 if (i == PM_PAR_I0) 171 continue; 172 if (i == PM_PAR_XPOS) 173 continue; 174 if (i == PM_PAR_YPOS) 175 continue; 176 177 // XXX need to set stats, image 152 if (i == PM_PAR_SKY) continue; 153 if (i == PM_PAR_I0) continue; 154 if (i == PM_PAR_XPOS) continue; 155 if (i == PM_PAR_YPOS) continue; 156 157 // XXX need to set stats & image or else nXfine,nYfine 178 158 pmTrend2D *param = pmTrend2DAlloc (options->psfTrendMode, image, options->psfTrendNx, options->psfTrendNx, stats); 179 159 psf->params->data[i] = param; 180 160 } 181 161 } 182 183 ps MemSetDeallocator(psf, (psFreeFunc) pmPSFFree);184 return (psf);162 163 psFree (stats); 164 return psf; 185 165 } 186 166
Note:
See TracChangeset
for help on using the changeset viewer.
