Changeset 3000
- Timestamp:
- Jan 14, 2005, 1:27:56 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 10 edited
-
astro/psCoord.c (modified) (3 diffs)
-
astronomy/psAstrometry.c (modified) (2 diffs)
-
astronomy/psCoord.c (modified) (3 diffs)
-
dataManip/psFunctions.c (modified) (2 diffs)
-
dataManip/psMinimize.c (modified) (5 diffs)
-
dataManip/psStats.c (modified) (2 diffs)
-
math/psMinimize.c (modified) (5 diffs)
-
math/psPolynomial.c (modified) (2 diffs)
-
math/psSpline.c (modified) (2 diffs)
-
math/psStats.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r2983 r3000 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-01-1 3 22:45:28$12 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-14 23:27:55 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 333 333 334 334 */ 335 336 335 // ******************************************** 337 336 // From the mathworks: http://mathworld.wolfram.com/GnomonicProjection.html … … 431 430 // delta_0 and phi_1 are the projection centers, not the point being projected. 432 431 // (delta_0, phi_1) == (projection->R, projection->D) 432 // XXX: figure out how to use the two-argument atan2() here. 433 433 // ******************************************** 434 434 psF32 row = PS_SQRT_F32((coord->x * coord->x) + (coord->y * coord->y)); 435 435 psF32 C = atan(row); 436 tmp->d = asin((cos(C) * sin(projection->D)) + ((coord->y * sin(C) * cos(projection->D)) / row)); 436 tmp->d = asin((cos(C) * sin(projection->D)) + 437 ((coord->y * sin(C) * cos(projection->D)) / row)); 437 438 psF32 tmpAtan = atan((coord->x * sin(C)) / 438 ((row * cos(projection->D) * cos(C)) - (coord->y * sin(projection->D) * sin(C)))); 439 ((row * cos(projection->D) * cos(C)) - 440 (coord->y * sin(projection->D) * sin(C)))); 439 441 tmp->r = projection->R + tmpAtan; 440 442 -
trunk/psLib/src/astronomy/psAstrometry.c
r2990 r3000 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.5 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-01-14 01:13:15 $10 * @version $Revision: 1.57 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-01-14 23:27:55 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 310 310 exp->observatory = psMemIncrRefCounter((psPtr)observatory); 311 311 312 // XXX: how is th esevalue derived?312 // XXX: how is this value derived? 313 313 *(double *)&exp->lst = psTimeToLST((psTime*)time,observatory->longitude); 314 314 *(float *)&exp->positionAngle = 0.0f; // XXX: need input, see Bug #207 -
trunk/psLib/src/astronomy/psCoord.c
r2983 r3000 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-01-1 3 22:45:28$12 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-14 23:27:55 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 333 333 334 334 */ 335 336 335 // ******************************************** 337 336 // From the mathworks: http://mathworld.wolfram.com/GnomonicProjection.html … … 431 430 // delta_0 and phi_1 are the projection centers, not the point being projected. 432 431 // (delta_0, phi_1) == (projection->R, projection->D) 432 // XXX: figure out how to use the two-argument atan2() here. 433 433 // ******************************************** 434 434 psF32 row = PS_SQRT_F32((coord->x * coord->x) + (coord->y * coord->y)); 435 435 psF32 C = atan(row); 436 tmp->d = asin((cos(C) * sin(projection->D)) + ((coord->y * sin(C) * cos(projection->D)) / row)); 436 tmp->d = asin((cos(C) * sin(projection->D)) + 437 ((coord->y * sin(C) * cos(projection->D)) / row)); 437 438 psF32 tmpAtan = atan((coord->x * sin(C)) / 438 ((row * cos(projection->D) * cos(C)) - (coord->y * sin(projection->D) * sin(C)))); 439 ((row * cos(projection->D) * cos(C)) - 440 (coord->y * sin(projection->D) * sin(C)))); 439 441 tmp->r = projection->R + tmpAtan; 440 442 -
trunk/psLib/src/dataManip/psFunctions.c
r2941 r3000 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 79$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-01-1 0 19:47:11$9 * @version $Revision: 1.80 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-01-14 23:27:56 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1913 1913 if (i<(bounds->n-1)) { 1914 1914 if (FLT_EPSILON < fabs(bounds->data.F32[i+1]-bounds->data.F32[i])) { 1915 printf("ERROR: psErrorMsg(data points must be distinct\n"); 1915 1916 // XXX: psErrorMsg(data points must be distinct) 1916 1917 } -
trunk/psLib/src/dataManip/psMinimize.c
r2909 r3000 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.9 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01- 05 20:59:33$11 * @version $Revision: 1.99 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-14 23:27:56 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 57 57 input parameter "x" between 0 and input parameter polyOrder. The result is 58 58 returned as a psVector sums. 59 60 59 61 60 XXX: Use a static vector. … … 693 692 deriv->data.F32[n][p]; 694 693 } 695 // XXX: multipl eby -1 here?694 // XXX: multiply by -1 here? 696 695 (beta->data.F64[p])*= -1.0; 697 696 psTrace(".psLib.dataManip.psMinimize", 6, … … 1139 1138 1140 1139 Algorithm: 1141 XXX completely ad hoc: 1142 start with the user-supplied starting 1143 parameter and call that b. Calculate a/c as a fractional amount 1144 smaller/larger than b. Repeat this process until a local minimum is found. 1145 1146 XXX: 1147 new algorithm: 1140 1141 XXX completely ad hoc: 1142 start with the user-supplied starting parameter and 1143 call that b. Calculate a/c as a fractional amount smaller/larger than b. 1144 Repeat this process until a local minimum is found. 1145 1146 XXX: 1147 new algorithm: 1148 1148 start at x=0, expand in one direction until the function 1149 1149 decreases. Then you have two points in the bracket. Keep going until it … … 1151 1151 direction. 1152 1152 1153 XXX: 1153 XXX: 1154 1154 This is F32 only. 1155 1155 1156 XXX: 1156 XXX: 1157 1157 output bracket vector should be an input as well. 1158 1158 *****************************************************************************/ -
trunk/psLib/src/dataManip/psStats.c
r2989 r3000 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.1 09$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01-14 00:53:56 $11 * @version $Revision: 1.110 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-14 23:27:56 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1959 1959 Returns: 1960 1960 The histogram structure "out". 1961 1962 XXX: Waiting for direction on how to use the errors parameter.1963 1961 *****************************************************************************/ 1964 1962 psHistogram* psVectorHistogram(psHistogram* out, -
trunk/psLib/src/math/psMinimize.c
r2909 r3000 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.9 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01- 05 20:59:33$11 * @version $Revision: 1.99 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-14 23:27:56 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 57 57 input parameter "x" between 0 and input parameter polyOrder. The result is 58 58 returned as a psVector sums. 59 60 59 61 60 XXX: Use a static vector. … … 693 692 deriv->data.F32[n][p]; 694 693 } 695 // XXX: multipl eby -1 here?694 // XXX: multiply by -1 here? 696 695 (beta->data.F64[p])*= -1.0; 697 696 psTrace(".psLib.dataManip.psMinimize", 6, … … 1139 1138 1140 1139 Algorithm: 1141 XXX completely ad hoc: 1142 start with the user-supplied starting 1143 parameter and call that b. Calculate a/c as a fractional amount 1144 smaller/larger than b. Repeat this process until a local minimum is found. 1145 1146 XXX: 1147 new algorithm: 1140 1141 XXX completely ad hoc: 1142 start with the user-supplied starting parameter and 1143 call that b. Calculate a/c as a fractional amount smaller/larger than b. 1144 Repeat this process until a local minimum is found. 1145 1146 XXX: 1147 new algorithm: 1148 1148 start at x=0, expand in one direction until the function 1149 1149 decreases. Then you have two points in the bracket. Keep going until it … … 1151 1151 direction. 1152 1152 1153 XXX: 1153 XXX: 1154 1154 This is F32 only. 1155 1155 1156 XXX: 1156 XXX: 1157 1157 output bracket vector should be an input as well. 1158 1158 *****************************************************************************/ -
trunk/psLib/src/math/psPolynomial.c
r2941 r3000 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 79$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-01-1 0 19:47:11$9 * @version $Revision: 1.80 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-01-14 23:27:56 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1913 1913 if (i<(bounds->n-1)) { 1914 1914 if (FLT_EPSILON < fabs(bounds->data.F32[i+1]-bounds->data.F32[i])) { 1915 printf("ERROR: psErrorMsg(data points must be distinct\n"); 1915 1916 // XXX: psErrorMsg(data points must be distinct) 1916 1917 } -
trunk/psLib/src/math/psSpline.c
r2941 r3000 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 79$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-01-1 0 19:47:11$9 * @version $Revision: 1.80 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-01-14 23:27:56 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1913 1913 if (i<(bounds->n-1)) { 1914 1914 if (FLT_EPSILON < fabs(bounds->data.F32[i+1]-bounds->data.F32[i])) { 1915 printf("ERROR: psErrorMsg(data points must be distinct\n"); 1915 1916 // XXX: psErrorMsg(data points must be distinct) 1916 1917 } -
trunk/psLib/src/math/psStats.c
r2989 r3000 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.1 09$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01-14 00:53:56 $11 * @version $Revision: 1.110 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-14 23:27:56 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1959 1959 Returns: 1960 1960 The histogram structure "out". 1961 1962 XXX: Waiting for direction on how to use the errors parameter.1963 1961 *****************************************************************************/ 1964 1962 psHistogram* psVectorHistogram(psHistogram* out,
Note:
See TracChangeset
for help on using the changeset viewer.
