Changeset 27952
- Timestamp:
- May 13, 2010, 11:45:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.20100506/src/psphotRadialApertures.c
r27932 r27952 1 1 # include "psphotInternal.h" 2 3 bool psphotRadialAperturesSortFlux (psVector *radius, psVector *pixFlux, psVector *pixVar); 2 4 3 5 // for now, let's store the detections on the readout->analysis for each readout … … 154 156 } 155 157 } 158 psphotRadialAperturesSortFlux(radius, pixFlux, pixVar); 156 159 157 160 psVector *flux = psVectorAllocEmpty(radMax->n, PS_TYPE_F32); // surface brightness of radial bin … … 207 210 return true; 208 211 } 212 213 // *** pmSourceRadialProfileSortPair is a utility function for sorting a pair of vectors 214 # define COMPARE_VECT(A,B) (radius->data.F32[A] < radius->data.F32[B]) 215 # define SWAP_VECT(TYPE,A,B) { \ 216 float tmp; \ 217 if (A != B) { \ 218 tmp = radius->data.F32[A]; \ 219 radius->data.F32[A] = radius->data.F32[B]; \ 220 radius->data.F32[B] = tmp; \ 221 tmp = pixFlux->data.F32[A]; \ 222 pixFlux->data.F32[A] = pixFlux->data.F32[B]; \ 223 pixFlux->data.F32[B] = tmp; \ 224 tmp = pixVar->data.F32[A]; \ 225 pixVar->data.F32[A] = pixVar->data.F32[B]; \ 226 pixVar->data.F32[B] = tmp; \ 227 } \ 228 } 229 230 bool psphotRadialAperturesSortFlux (psVector *radius, psVector *pixFlux, psVector *pixVar) { 231 232 // sort the vector set by the radius 233 PSSORT (radius->n, COMPARE_VECT, SWAP_VECT, NONE); 234 return true; 235 } 236
Note:
See TracChangeset
for help on using the changeset viewer.
