Changeset 15980
- Timestamp:
- Jan 2, 2008, 10:39:04 AM (18 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 8 edited
-
pmSource.c (modified) (5 diffs)
-
pmSource.h (modified) (2 diffs)
-
pmSourceContour.c (modified) (3 diffs)
-
pmSourceExtendedPars.h (modified) (2 diffs)
-
pmSourceFitSet.c (modified) (5 diffs)
-
pmSourceIO_PS1_DEV_0.c (modified) (4 diffs)
-
pmSourceIO_PS1_DEV_1.c (modified) (3 diffs)
-
pmSourceSky.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSource.c
r15814 r15980 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.4 7$ $Name: not supported by cvs2svn $9 * @date $Date: 200 7-12-13 22:09:35$8 * @version $Revision: 1.48 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-01-02 20:39:04 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 130 130 } 131 131 132 bool pmSourceTest(const psPtr ptr)133 {134 return (psMemGetDeallocator(ptr) == (psFreeFunc)sourceFree);135 }136 137 132 /****************************************************************************** 138 133 pmSourceCopy(): copy the pmSource structure and contents … … 807 802 // construct a realization of the source model 808 803 bool pmSourceCacheModel (pmSource *source, psMaskType maskVal) { 809 804 PS_ASSERT_PTR_NON_NULL(source, false); 810 805 // select appropriate model 811 806 pmModel *model = pmSourceGetModel (NULL, source); … … 826 821 // XXX this function should optionally save an existing psf image from modelFlux 827 822 bool pmSourceCachePSF (pmSource *source, psMaskType maskVal) { 823 PS_ASSERT_PTR_NON_NULL(source, false); 828 824 829 825 // select appropriate model … … 846 842 { 847 843 PS_ASSERT_PTR_NON_NULL(source, false); 844 PS_ASSERT_PTR_NON_NULL(source->peak, false); 848 845 bool status; 849 846 -
trunk/psModules/src/objects/pmSource.h
r15799 r15980 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $6 * @date $Date: 200 7-12-13 04:05:58$5 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-01-02 20:39:04 $ 7 7 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 8 8 */ … … 122 122 void pmSourceFreePixels(pmSource *source); 123 123 124 bool pmSourceTest(const psPtr ptr);125 126 124 /** pmSourceDefinePixels() 127 125 * -
trunk/psModules/src/objects/pmSourceContour.c
r15619 r15980 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $9 * @date $Date: 200 7-11-14 22:15:42$8 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-01-02 20:39:04 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 227 227 int y = yc - image->row0; 228 228 229 // the requested point must be within the contour230 if (image->data.F32[y][x] < threshold) {231 return NULL;232 }233 234 229 // Ensure that the starting column is allowable. 235 230 if (x < 0) { … … 243 238 } 244 239 if (y >= image->numRows) { 240 return NULL; 241 } 242 243 // the requested point must be within the contour 244 if (image->data.F32[y][x] < threshold) { 245 245 return NULL; 246 246 } -
trunk/psModules/src/objects/pmSourceExtendedPars.h
r15562 r15980 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $6 * @date $Date: 200 7-11-10 01:09:20$5 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-01-02 20:39:04 $ 7 7 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 8 8 */ … … 56 56 57 57 pmSourceExtendedPars *pmSourceExtendedParsAlloc (); 58 bool psMemCheckSourceExtendedPars(psPtr ptr); 58 59 pmSourceRadialProfile *pmSourceRadialProfileAlloc (); 60 bool psMemCheckSourceRadialProfile(psPtr ptr); 59 61 pmSourceIsophotalValues *pmSourceIsophotalValuesAlloc (); 62 bool psMemCheckSourceIsophotalValues(psPtr ptr); 60 63 pmSourcePetrosianValues *pmSourcePetrosianValuesAlloc (); 64 bool psMemCheckSourcePetrosianValues(psPtr ptr); 61 65 pmSourceKronValues *pmSourceKronValuesAlloc (); 66 bool psMemCheckSourceKronValues(psPtr ptr); 62 67 pmSourceAnnuli *pmSourceAnnuliAlloc (); 68 bool psMemCheckSourceAnnuli(psPtr ptr); 63 69 64 70 /// @} -
trunk/psModules/src/objects/pmSourceFitSet.c
r15622 r15980 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 200 7-11-15 23:18:20$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-01-02 20:39:04 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 120 120 bool pmSourceFitSetJoin (psVector *deriv, psVector *param, pmSourceFitSetData *set) 121 121 { 122 assert (set); 123 assert (set->paramSet->n == set->derivSet->n); 124 122 PS_ASSERT_PTR_NON_NULL(set, false); 123 PS_ASSERT_PTR_NON_NULL(set->paramSet, false); 124 PS_ASSERT_PTR_NON_NULL(set->derivSet, false); 125 PS_ASSERT_VECTORS_SIZE_EQUAL(set->paramSet, set->derivSet, false); 125 126 int n = 0; 127 int sum = 0; 128 for (int i = 0; i < set->paramSet->n; i++) { 129 sum+= set->paramSet->n; 130 } 131 132 // Must assert that the deriv and param psVectors are large enough, or else 133 // a seg fault occurs. 134 // XXX: Put the correct error call in here: 135 if (0) { 136 if (deriv->n < sum || param->n < sum) { 137 PS_ASSERT_PTR_NON_NULL(0, false); 138 } 139 } 140 126 141 for (int i = 0; i < set->paramSet->n; i++) { 127 142 … … 150 165 bool pmSourceFitSetSplit (pmSourceFitSetData *set, const psVector *deriv, const psVector *param) 151 166 { 152 assert (param); 153 assert (set); 154 assert (set->paramSet->n == set->derivSet->n); 167 PS_ASSERT_VECTOR_NON_NULL(param, false); 168 PS_ASSERT_PTR_NON_NULL(set, false); 169 PS_ASSERT_PTR_NON_NULL(set->paramSet, false); 170 PS_ASSERT_PTR_NON_NULL(set->derivSet, false); 171 PS_ASSERT_VECTORS_SIZE_EQUAL(set->paramSet, set->derivSet, false); 155 172 156 173 int n = 0; … … 175 192 psMinimization *myMin, int nPix, bool fitStatus) 176 193 { 177 assert (set); 194 PS_ASSERT_PTR_NON_NULL(set, false); 195 PS_ASSERT_PTR_NON_NULL(set->paramSet, false); 196 PS_ASSERT_VECTOR_NON_NULL(dparam, false); 197 PS_ASSERT_VECTOR_NON_NULL(param, false); 198 PS_ASSERT_PTR_NON_NULL(source, false); 199 PS_ASSERT_PTR_NON_NULL(source->pixels, false); 200 PS_ASSERT_PTR_NON_NULL(myMin, false); 201 178 202 bool onPic = true; 179 203 … … 216 240 psF32 pmSourceFitSetFunction(psVector *deriv, const psVector *param, const psVector *x) 217 241 { 218 assert (thisSet);242 PS_ASSERT_PTR_NON_NULL(thisSet, NAN); 219 243 float chisqSum = 0.0; 220 244 float chisqOne = 0.0; -
trunk/psModules/src/objects/pmSourceIO_PS1_DEV_0.c
r15562 r15980 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $6 * @date $Date: 200 7-11-10 01:09:20$5 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-01-02 20:39:04 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 69 69 70 70 // no difference between PSF and non-PSF model 71 pmModel *model = pmSourceGetModel (NULL, source);71 pmModel *model = pmSourceGetModel(NULL, source); 72 72 73 73 if (model != NULL) { … … 81 81 axes = pmPSF_ModelToAxes (PAR, 20.0); 82 82 } else { 83 // XXX: This code seg faults if source->peak is NULL. 83 84 xPos = source->peak->xf; 84 85 yPos = source->peak->yf; … … 168 169 psArray *table = psFitsReadTable (fits); 169 170 // validate a single row of the table (must match SMP) 170 171 // XXX: The following seg-faults if table returns NULL, so I added the ASSERT 172 PS_ASSERT_PTR_NON_NULL(table, NULL); 171 173 psArray *sources = psArrayAlloc (table->n); 172 174 -
trunk/psModules/src/objects/pmSourceIO_PS1_DEV_1.c
r15799 r15980 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $6 * @date $Date: 200 7-12-13 04:05:58$5 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-01-02 20:39:04 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 47 47 // XXX how do I generate the source tables which I need to send to PSPS? 48 48 49 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname, char *xsrcname) 49 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, psMetadata *imageHeader, 50 psMetadata *tableHeader, char *extname, char *xsrcname) 50 51 { 52 PS_ASSERT_PTR_NON_NULL(fits, false); 53 PS_ASSERT_PTR_NON_NULL(sources, false); 54 PS_ASSERT_PTR_NON_NULL(extname, false); 51 55 52 56 psArray *table; … … 161 165 psArray *pmSourcesRead_PS1_DEV_1 (psFits *fits, psMetadata *header) 162 166 { 167 PS_ASSERT_PTR_NON_NULL(fits, false); 168 PS_ASSERT_PTR_NON_NULL(header, false); 163 169 164 170 bool status; -
trunk/psModules/src/objects/pmSourceSky.c
r14938 r15980 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $9 * @date $Date: 200 7-09-21 00:09:05$8 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-01-02 20:39:04 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 57 57 PS_ASSERT_PTR_NON_NULL(source->peak, false); 58 58 PS_ASSERT_INT_POSITIVE(Radius, false); 59 PS_ASSERT_INT_NONNEGATIVE(Radius, false);60 59 61 60 psStatsOptions statistic = psStatsSingleOption(statsOptions); … … 111 110 PS_ASSERT_PTR_NON_NULL(source->peak, false); 112 111 PS_ASSERT_INT_POSITIVE(Radius, false); 113 PS_ASSERT_INT_NONNEGATIVE(Radius, false);114 112 115 113 psStatsOptions statistic = psStatsSingleOption(statsOptions);
Note:
See TracChangeset
for help on using the changeset viewer.
