Changeset 3095
- Timestamp:
- Jan 26, 2005, 10:24:17 AM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 6 edited
-
astro/psCoord.c (modified) (5 diffs)
-
astro/psCoord.h (modified) (4 diffs)
-
astronomy/psCoord.c (modified) (5 diffs)
-
astronomy/psCoord.h (modified) (4 diffs)
-
dataManip/psStats.c (modified) (2 diffs)
-
math/psStats.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r3000 r3095 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-01- 14 23:27:55$12 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-26 20:24:16 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 /* FUNCTION IMPLEMENTATION - PUBLIC */ 60 60 /*****************************************************************************/ 61 static void planeFree(psPlane *p) 62 { 63 psFree(p); 64 } 65 66 // XXX: Must test psPlaneAlloc() and planeFree(). 67 // XXX: Must rewrite code and tests to use these functions. 68 psPlane* psPlaneAlloc(void) 69 { 70 psPlane *p = psAlloc(sizeof(psPlane)); 71 72 p_psMemSetDeallocator(p, (psFreeFcn) planeFree); 73 return(p); 74 } 75 76 77 static void sphereFree(psSphere *s) 78 { 79 psFree(s); 80 } 81 82 // XXX: Must test psSphereAlloc() and sphereFree(). 83 // XXX: Must rewrite code and tests to use these functions. 84 psSphere* psSphereAlloc(void) 85 { 86 psSphere *s = psAlloc(sizeof(psSphere)); 87 88 p_psMemSetDeallocator(s, (psFreeFcn) sphereFree); 89 return(s); 90 } 91 61 92 static void planeTransformFree(psPlaneTransform *pt) 62 93 { … … 159 190 } 160 191 192 // XXX: Must code this. 193 psPlaneTransform *psPlaneTransformInvert( 194 psPlaneTransform *out, 195 const psPlaneTransform *in, 196 psRegion *region, 197 int nSamples) 198 { 199 PS_PTR_CHECK_NULL(in, NULL); 200 PS_PTR_CHECK_NULL(region, NULL); 201 202 return(NULL); 203 } 204 205 206 // XXX: Must code this. 207 psPlaneTransform *psPlaneTransformCombine( 208 psPlaneTransform *out, 209 const psPlaneTransform *trans1, 210 const psPlaneTransform *trans2) 211 { 212 PS_PTR_CHECK_NULL(trans1, NULL); 213 PS_PTR_CHECK_NULL(trans2, NULL); 214 215 return(NULL); 216 } 217 218 219 // XXX: Must code this. 220 bool psPlaneTranformFit( 221 psPlaneTransform *trans, 222 const psArray *source, 223 const psArray *dest, 224 int nRejIter, 225 float sigmaClip) 226 { 227 PS_PTR_CHECK_NULL(trans, NULL); 228 PS_PTR_CHECK_NULL(source, NULL); 229 PS_PTR_CHECK_NULL(dest, NULL); 230 231 return(NULL); 232 } 233 234 161 235 /****************************************************************************** 162 236 alpha is LONGITUDE … … 299 373 } 300 374 375 void projectionFree(psProjection *p) 376 { 377 psFree(p); 378 } 379 380 // XXX: Must test psProjectionAlloc() and projectionFree(). 381 // XXX: Must rewrite code and tests to use these functions. 382 psProjection* psProjectionAlloc( 383 psF64 R, 384 psF64 D, 385 psF64 Xs, 386 psF64 Ys, 387 psProjectionType type) 388 { 389 psProjection *p = psAlloc(sizeof(psProjection)); 390 p->D = D; 391 p->R = R; 392 p->Xs = Xs; 393 p->Ys = Ys; 394 p->type = type; 395 396 p_psMemSetDeallocator(p, (psFreeFcn) planeFree); 397 return(p); 398 } 399 400 301 401 /****************************************************************************** 302 402 XXX: Waiting for the definition of the PS_PROJ_PAR projection. … … 323 423 psF32 cosThetaSinPhi; 324 424 325 sinTheta = (sin(coord->d) * sin(projection->D)) +326 (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));327 cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) -328 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));329 cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);425 sinTheta = (sin(coord->d) * sin(projection->D)) + 426 (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R))); 427 cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 428 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R))); 429 cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R); 330 430 331 431 tmp->x = -cosThetaSinPhi / sinTheta; -
trunk/psLib/src/astro/psCoord.h
r2664 r3095 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $13 * @date $Date: 200 4-12-08 18:23:54$12 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-26 20:24:16 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 167 167 } psSphereOffsetUnit; 168 168 169 /** Allocates a psPlane 170 * 171 * @return psPlane* resulting plane structure. 172 */ 173 174 psPlane* psPlaneAlloc(void); 175 176 /** Allocates a psSphere 177 * 178 * @return psSphere* resulting sphere structure. 179 */ 180 181 psSphere* psSphereAlloc(void); 182 183 169 184 /** Allocates a psPlaneTransform transform. 170 185 * … … 212 227 ); 213 228 229 // XXX: Doxygenate. 230 psPlaneTransform *psPlaneTransformInvert( 231 psPlaneTransform *out, 232 const psPlaneTransform *in, 233 psRegion *region, 234 int nSamples 235 ); 236 237 // XXX: Doxygenate. 238 psPlaneTransform *psPlaneTransformCombine( 239 psPlaneTransform *out, 240 const psPlaneTransform *trans1, 241 const psPlaneTransform *trans2 242 ); 243 244 // XXX: Doxygenate. 245 bool psPlaneTranformFit( 246 psPlaneTransform *trans, 247 const psArray *source, 248 const psArray *dest, 249 int nRejIter, 250 float sigmaClip 251 ); 252 253 254 214 255 /** Allocator for psSphereTransform 215 256 * … … 262 303 */ 263 304 psSphereTransform* psSphereTransformGalaticToICRS(void); 305 306 /** Allocates memory for a psProjection structure 307 * 308 * @return psProjection* psProjection structure 309 */ 310 psProjection* psProjectionAlloc( 311 psF64 R, ///< Right-ascension of projection center. 312 psF64 D, ///< Declination of projection center. 313 psF64 Xs, ///< Scale in x-dimension 314 psF64 Ys, ///< Scale in y-dimension 315 psProjectionType type 316 ); 264 317 265 318 /** Projects a spherical coordinate to a linear coordinate system -
trunk/psLib/src/astronomy/psCoord.c
r3000 r3095 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-01- 14 23:27:55$12 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-26 20:24:16 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 /* FUNCTION IMPLEMENTATION - PUBLIC */ 60 60 /*****************************************************************************/ 61 static void planeFree(psPlane *p) 62 { 63 psFree(p); 64 } 65 66 // XXX: Must test psPlaneAlloc() and planeFree(). 67 // XXX: Must rewrite code and tests to use these functions. 68 psPlane* psPlaneAlloc(void) 69 { 70 psPlane *p = psAlloc(sizeof(psPlane)); 71 72 p_psMemSetDeallocator(p, (psFreeFcn) planeFree); 73 return(p); 74 } 75 76 77 static void sphereFree(psSphere *s) 78 { 79 psFree(s); 80 } 81 82 // XXX: Must test psSphereAlloc() and sphereFree(). 83 // XXX: Must rewrite code and tests to use these functions. 84 psSphere* psSphereAlloc(void) 85 { 86 psSphere *s = psAlloc(sizeof(psSphere)); 87 88 p_psMemSetDeallocator(s, (psFreeFcn) sphereFree); 89 return(s); 90 } 91 61 92 static void planeTransformFree(psPlaneTransform *pt) 62 93 { … … 159 190 } 160 191 192 // XXX: Must code this. 193 psPlaneTransform *psPlaneTransformInvert( 194 psPlaneTransform *out, 195 const psPlaneTransform *in, 196 psRegion *region, 197 int nSamples) 198 { 199 PS_PTR_CHECK_NULL(in, NULL); 200 PS_PTR_CHECK_NULL(region, NULL); 201 202 return(NULL); 203 } 204 205 206 // XXX: Must code this. 207 psPlaneTransform *psPlaneTransformCombine( 208 psPlaneTransform *out, 209 const psPlaneTransform *trans1, 210 const psPlaneTransform *trans2) 211 { 212 PS_PTR_CHECK_NULL(trans1, NULL); 213 PS_PTR_CHECK_NULL(trans2, NULL); 214 215 return(NULL); 216 } 217 218 219 // XXX: Must code this. 220 bool psPlaneTranformFit( 221 psPlaneTransform *trans, 222 const psArray *source, 223 const psArray *dest, 224 int nRejIter, 225 float sigmaClip) 226 { 227 PS_PTR_CHECK_NULL(trans, NULL); 228 PS_PTR_CHECK_NULL(source, NULL); 229 PS_PTR_CHECK_NULL(dest, NULL); 230 231 return(NULL); 232 } 233 234 161 235 /****************************************************************************** 162 236 alpha is LONGITUDE … … 299 373 } 300 374 375 void projectionFree(psProjection *p) 376 { 377 psFree(p); 378 } 379 380 // XXX: Must test psProjectionAlloc() and projectionFree(). 381 // XXX: Must rewrite code and tests to use these functions. 382 psProjection* psProjectionAlloc( 383 psF64 R, 384 psF64 D, 385 psF64 Xs, 386 psF64 Ys, 387 psProjectionType type) 388 { 389 psProjection *p = psAlloc(sizeof(psProjection)); 390 p->D = D; 391 p->R = R; 392 p->Xs = Xs; 393 p->Ys = Ys; 394 p->type = type; 395 396 p_psMemSetDeallocator(p, (psFreeFcn) planeFree); 397 return(p); 398 } 399 400 301 401 /****************************************************************************** 302 402 XXX: Waiting for the definition of the PS_PROJ_PAR projection. … … 323 423 psF32 cosThetaSinPhi; 324 424 325 sinTheta = (sin(coord->d) * sin(projection->D)) +326 (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));327 cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) -328 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));329 cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);425 sinTheta = (sin(coord->d) * sin(projection->D)) + 426 (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R))); 427 cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 428 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R))); 429 cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R); 330 430 331 431 tmp->x = -cosThetaSinPhi / sinTheta; -
trunk/psLib/src/astronomy/psCoord.h
r2664 r3095 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $13 * @date $Date: 200 4-12-08 18:23:54$12 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-26 20:24:16 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 167 167 } psSphereOffsetUnit; 168 168 169 /** Allocates a psPlane 170 * 171 * @return psPlane* resulting plane structure. 172 */ 173 174 psPlane* psPlaneAlloc(void); 175 176 /** Allocates a psSphere 177 * 178 * @return psSphere* resulting sphere structure. 179 */ 180 181 psSphere* psSphereAlloc(void); 182 183 169 184 /** Allocates a psPlaneTransform transform. 170 185 * … … 212 227 ); 213 228 229 // XXX: Doxygenate. 230 psPlaneTransform *psPlaneTransformInvert( 231 psPlaneTransform *out, 232 const psPlaneTransform *in, 233 psRegion *region, 234 int nSamples 235 ); 236 237 // XXX: Doxygenate. 238 psPlaneTransform *psPlaneTransformCombine( 239 psPlaneTransform *out, 240 const psPlaneTransform *trans1, 241 const psPlaneTransform *trans2 242 ); 243 244 // XXX: Doxygenate. 245 bool psPlaneTranformFit( 246 psPlaneTransform *trans, 247 const psArray *source, 248 const psArray *dest, 249 int nRejIter, 250 float sigmaClip 251 ); 252 253 254 214 255 /** Allocator for psSphereTransform 215 256 * … … 262 303 */ 263 304 psSphereTransform* psSphereTransformGalaticToICRS(void); 305 306 /** Allocates memory for a psProjection structure 307 * 308 * @return psProjection* psProjection structure 309 */ 310 psProjection* psProjectionAlloc( 311 psF64 R, ///< Right-ascension of projection center. 312 psF64 D, ///< Declination of projection center. 313 psF64 Xs, ///< Scale in x-dimension 314 psF64 Ys, ///< Scale in y-dimension 315 psProjectionType type 316 ); 264 317 265 318 /** Projects a spherical coordinate to a linear coordinate system -
trunk/psLib/src/dataManip/psStats.c
r3000 r3095 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.11 0$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01- 14 23:27:56$11 * @version $Revision: 1.111 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-26 20:24:17 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1119 1119 These macros and functions define the following functions: 1120 1120 1121 p_psNormalizeVectorRange(myData, low, high)1121 < p_psNormalizeVectorRange(myData, low, high) 1122 1122 1123 1123 That assumes that the low/high arguments are PS_TYPE_F64; the vector myData -
trunk/psLib/src/math/psStats.c
r3000 r3095 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.11 0$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01- 14 23:27:56$11 * @version $Revision: 1.111 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-26 20:24:17 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1119 1119 These macros and functions define the following functions: 1120 1120 1121 p_psNormalizeVectorRange(myData, low, high)1121 < p_psNormalizeVectorRange(myData, low, high) 1122 1122 1123 1123 That assumes that the low/high arguments are PS_TYPE_F64; the vector myData
Note:
See TracChangeset
for help on using the changeset viewer.
