Changeset 2600
- Timestamp:
- Dec 2, 2004, 11:12:52 AM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 17 edited
-
astro/psCoord.c (modified) (6 diffs)
-
astro/psCoord.h (modified) (3 diffs)
-
astronomy/Makefile (modified) (1 diff)
-
astronomy/psAstrometry.c (modified) (1 diff)
-
astronomy/psAstrometry.h (modified) (1 diff)
-
astronomy/psCoord.c (modified) (6 diffs)
-
astronomy/psCoord.h (modified) (3 diffs)
-
dataIO/psFileUtilsErrors.h (modified) (2 diffs)
-
dataManip/psFunctions.h (modified) (1 diff)
-
fileUtils/psFileUtilsErrors.h (modified) (2 diffs)
-
image/psImageStats.h (modified) (1 diff)
-
imageops/psImageStats.h (modified) (1 diff)
-
math/psPolynomial.h (modified) (1 diff)
-
math/psSpline.h (modified) (1 diff)
-
sys/psTrace.c (modified) (1 diff)
-
sysUtils/psSysUtilsErrors.h (modified) (2 diffs)
-
sysUtils/psTrace.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r2583 r2600 8 8 * @ingroup CoordinateTransform 9 9 * 10 * @author G eorge Gusciora, MHPCC10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-12-0 1 19:56:05$12 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-12-02 21:12:51 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 164 164 This function prototype has been modified since the SDRS. 165 165 *****************************************************************************/ 166 psSphereTransform* psSphereTransformAlloc(double NPlat,167 double Xo,168 double xo)166 psSphereTransform* psSphereTransformAlloc(double alphaP, 167 double deltaP, 168 double phiP) 169 169 { 170 170 psSphereTransform* tmp = (psSphereTransform* ) psAlloc(sizeof(psSphereTransform)); 171 171 172 tmp-> sinPhi = sin(NPlat);173 tmp-> cosPhi = cos(NPlat);174 tmp-> Xo = Xo;175 tmp-> xo = xo;172 tmp->cosDeltaP = cos(deltaP); 173 tmp->sinDeltaP = cos(deltaP); 174 tmp->alphaP = alphaP; 175 tmp->phiP = phiP; 176 176 177 177 return (tmp); … … 207 207 x = coord->r; 208 208 y = coord->d; 209 dx = x - transform-> xo;210 sinY = cos(y) * sin(dx) * transform->sin Phi + sin(y) * transform->cosPhi;209 dx = x - transform->phiP; 210 sinY = cos(y) * sin(dx) * transform->sinDeltaP + sin(y) * transform->cosDeltaP; 211 211 cosY = sqrt(1.0 - sinY * sinY); 212 sinX = (cos(y) * sin(dx) * transform->cos Phi - sin(y) * transform->sinPhi) / cos(y);212 sinX = (cos(y) * sin(dx) * transform->cosDeltaP - sin(y) * transform->sinDeltaP) / cos(y); 213 213 cosX = cos(y) * cos(dx) / cos(y); 214 214 215 out->r = atan2(sinX, cosX) + transform-> Xo;215 out->r = atan2(sinX, cosX) + transform->alphaP; 216 216 out->d = atan2(sinY, cosY); 217 217 … … 227 227 double T = year / 100.0; 228 228 double phi = -23.452294 + 0.013013 * T + 0.000001639 * T * T - 0.000000503 * T * T * T; 229 double Xo= 0.0;230 double xo= 0.0;229 double alphaP = 0.0; 230 double phiP = 0.0; 231 231 232 232 psFree(tmTime); 233 return (psSphereTransformAlloc(phi, Xo, xo));233 return (psSphereTransformAlloc(phi, alphaP, phiP)); 234 234 } 235 235 … … 242 242 double T = year / 100.0; 243 243 double phi = +23.452294 - 0.013013 * T - 0.000001639 * T * T + 0.000000503 * T * T * T; 244 double Xo= 0.0;245 double xo= 0.0;244 double alphaP = 0.0; 245 double phiP = 0.0; 246 246 247 247 psFree(tmTime); 248 return (psSphereTransformAlloc(phi, Xo, xo));248 return (psSphereTransformAlloc(phi, alphaP, phiP)); 249 249 } 250 250 … … 536 536 const psTime *toTime) 537 537 { 538 psF64 fromMJD = fromTime->sec/86400.0 + fromTime->usec/86400000000.0 + 40587.0; 539 psF64 toMJD = toTime->sec/86400.0 + toTime->usec/86400000000.0 + 40587.0; 540 psF64 = (toMJD - fromMJD) / 36525.0; 541 542 543 538 /* 539 psF64 fromMJD = fromTime->sec/86400.0 + fromTime->usec/86400000000.0 + 40587.0; 540 psF64 toMJD = toTime->sec/86400.0 + toTime->usec/86400000000.0 + 40587.0; 541 psF64 = (toMJD - fromMJD) / 36525.0; 542 */ 544 543 return(NULL); 545 544 } -
trunk/psLib/src/astro/psCoord.h
r2425 r2600 8 8 * @ingroup CoordinateTransform 9 9 * 10 * @author G eorge Gusciora, MHPCC11 * 12 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-1 1-24 19:48:17$10 * @author GLG, MHPCC 11 * 12 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-12-02 21:12:51 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 107 107 typedef struct 108 108 { 109 double sinPhi; ///< sin of North Pole lattitude110 double cosPhi; ///< cos of North Pole lattitude111 double Xo; ///< First PT of Ares lon112 double xo; ///< First PT of Ares equiv lon109 double cosDeltaP; ///< Cosine of target pole latitude in the source system 110 double sinDeltaP; ///< Sine of target pole latitude in the source system 111 double alphaP; ///< Longitude of the target system pole in the source system 112 double phiP; ///< Longitude of the ascending node in the target system 113 113 } 114 114 psSphereTransform; … … 216 216 * @return psSphereTransform* newly allocated struct 217 217 */ 218 218 219 psSphereTransform* psSphereTransformAlloc( 219 double NPlat, ///< north pole latitude220 double Xo, ///< First PT of Ares lon221 double xo ///< First PT of Ares equiv lon220 double alphaP, ///< north pole latitude 221 double deltaP, ///< north pole longitude? 222 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 222 223 ); 223 224 -
trunk/psLib/src/astronomy/Makefile
r2521 r2600 6 6 include ../Makefile.Globals 7 7 CFLAGS := $(CFLAGS_RELOC) -I. -I../sysUtils -I../collections -I../dataManip \ 8 -I.. -I../image -I../fileUtils -I/usr/ include/libxml2 \8 -I.. -I../image -I../fileUtils -I/usr/local/include/libxml2 \ 9 9 -DTIME_CONFIG_FILE="\"$(TIME_CONFIG_FILE)\"" 10 10 -
trunk/psLib/src/astronomy/psAstrometry.c
r2430 r2600 6 6 * @ingroup AstroImage 7 7 * 8 * @author G eorge Gusciora, MHPCC8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.5 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-1 1-24 20:27:46$10 * @version $Revision: 1.52 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-12-02 21:12:51 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/astronomy/psAstrometry.h
r2430 r2600 6 6 * @ingroup AstroImage 7 7 * 8 * @author G eorge Gusciora, MHPCC8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-1 1-24 20:27:46$10 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-12-02 21:12:51 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/astronomy/psCoord.c
r2583 r2600 8 8 * @ingroup CoordinateTransform 9 9 * 10 * @author G eorge Gusciora, MHPCC10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-12-0 1 19:56:05$12 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-12-02 21:12:51 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 164 164 This function prototype has been modified since the SDRS. 165 165 *****************************************************************************/ 166 psSphereTransform* psSphereTransformAlloc(double NPlat,167 double Xo,168 double xo)166 psSphereTransform* psSphereTransformAlloc(double alphaP, 167 double deltaP, 168 double phiP) 169 169 { 170 170 psSphereTransform* tmp = (psSphereTransform* ) psAlloc(sizeof(psSphereTransform)); 171 171 172 tmp-> sinPhi = sin(NPlat);173 tmp-> cosPhi = cos(NPlat);174 tmp-> Xo = Xo;175 tmp-> xo = xo;172 tmp->cosDeltaP = cos(deltaP); 173 tmp->sinDeltaP = cos(deltaP); 174 tmp->alphaP = alphaP; 175 tmp->phiP = phiP; 176 176 177 177 return (tmp); … … 207 207 x = coord->r; 208 208 y = coord->d; 209 dx = x - transform-> xo;210 sinY = cos(y) * sin(dx) * transform->sin Phi + sin(y) * transform->cosPhi;209 dx = x - transform->phiP; 210 sinY = cos(y) * sin(dx) * transform->sinDeltaP + sin(y) * transform->cosDeltaP; 211 211 cosY = sqrt(1.0 - sinY * sinY); 212 sinX = (cos(y) * sin(dx) * transform->cos Phi - sin(y) * transform->sinPhi) / cos(y);212 sinX = (cos(y) * sin(dx) * transform->cosDeltaP - sin(y) * transform->sinDeltaP) / cos(y); 213 213 cosX = cos(y) * cos(dx) / cos(y); 214 214 215 out->r = atan2(sinX, cosX) + transform-> Xo;215 out->r = atan2(sinX, cosX) + transform->alphaP; 216 216 out->d = atan2(sinY, cosY); 217 217 … … 227 227 double T = year / 100.0; 228 228 double phi = -23.452294 + 0.013013 * T + 0.000001639 * T * T - 0.000000503 * T * T * T; 229 double Xo= 0.0;230 double xo= 0.0;229 double alphaP = 0.0; 230 double phiP = 0.0; 231 231 232 232 psFree(tmTime); 233 return (psSphereTransformAlloc(phi, Xo, xo));233 return (psSphereTransformAlloc(phi, alphaP, phiP)); 234 234 } 235 235 … … 242 242 double T = year / 100.0; 243 243 double phi = +23.452294 - 0.013013 * T - 0.000001639 * T * T + 0.000000503 * T * T * T; 244 double Xo= 0.0;245 double xo= 0.0;244 double alphaP = 0.0; 245 double phiP = 0.0; 246 246 247 247 psFree(tmTime); 248 return (psSphereTransformAlloc(phi, Xo, xo));248 return (psSphereTransformAlloc(phi, alphaP, phiP)); 249 249 } 250 250 … … 536 536 const psTime *toTime) 537 537 { 538 psF64 fromMJD = fromTime->sec/86400.0 + fromTime->usec/86400000000.0 + 40587.0; 539 psF64 toMJD = toTime->sec/86400.0 + toTime->usec/86400000000.0 + 40587.0; 540 psF64 = (toMJD - fromMJD) / 36525.0; 541 542 543 538 /* 539 psF64 fromMJD = fromTime->sec/86400.0 + fromTime->usec/86400000000.0 + 40587.0; 540 psF64 toMJD = toTime->sec/86400.0 + toTime->usec/86400000000.0 + 40587.0; 541 psF64 = (toMJD - fromMJD) / 36525.0; 542 */ 544 543 return(NULL); 545 544 } -
trunk/psLib/src/astronomy/psCoord.h
r2425 r2600 8 8 * @ingroup CoordinateTransform 9 9 * 10 * @author G eorge Gusciora, MHPCC11 * 12 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-1 1-24 19:48:17$10 * @author GLG, MHPCC 11 * 12 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-12-02 21:12:51 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 107 107 typedef struct 108 108 { 109 double sinPhi; ///< sin of North Pole lattitude110 double cosPhi; ///< cos of North Pole lattitude111 double Xo; ///< First PT of Ares lon112 double xo; ///< First PT of Ares equiv lon109 double cosDeltaP; ///< Cosine of target pole latitude in the source system 110 double sinDeltaP; ///< Sine of target pole latitude in the source system 111 double alphaP; ///< Longitude of the target system pole in the source system 112 double phiP; ///< Longitude of the ascending node in the target system 113 113 } 114 114 psSphereTransform; … … 216 216 * @return psSphereTransform* newly allocated struct 217 217 */ 218 218 219 psSphereTransform* psSphereTransformAlloc( 219 double NPlat, ///< north pole latitude220 double Xo, ///< First PT of Ares lon221 double xo ///< First PT of Ares equiv lon220 double alphaP, ///< north pole latitude 221 double deltaP, ///< north pole longitude? 222 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 222 223 ); 223 224 -
trunk/psLib/src/dataIO/psFileUtilsErrors.h
r2375 r2600 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-1 1-16 20:00:21$9 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-12-02 21:12:52 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 31 31 //~Start #define PS_ERRORTEXT_$1 "$2" 32 32 #define PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND "Failed to open file %s." 33 #define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line % d."34 #define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line % d."35 #define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line % d "33 #define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line %lld." 34 #define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line %lld." 35 #define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line %lld " 36 36 #define PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH "High index too big, %d." 37 37 #define PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW "Low index too small, %d." -
trunk/psLib/src/dataManip/psFunctions.h
r2439 r2600 10 10 * 11 11 * @author Someone at IfA 12 * @author G eorge Gusciora, MHPCC12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-1 1-24 22:33:21 $14 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-12-02 21:12:51 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/fileUtils/psFileUtilsErrors.h
r2375 r2600 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-1 1-16 20:00:21$9 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-12-02 21:12:52 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 31 31 //~Start #define PS_ERRORTEXT_$1 "$2" 32 32 #define PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND "Failed to open file %s." 33 #define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line % d."34 #define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line % d."35 #define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line % d "33 #define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line %lld." 34 #define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line %lld." 35 #define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line %lld " 36 36 #define PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH "High index too big, %d." 37 37 #define PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW "Low index too small, %d." -
trunk/psLib/src/image/psImageStats.h
r2204 r2600 7 7 * polynomials to images. 8 8 * 9 * @author G eorge Gusciora, MHPCC9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-1 0-27 00:57:31$11 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-12-02 21:12:52 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/imageops/psImageStats.h
r2204 r2600 7 7 * polynomials to images. 8 8 * 9 * @author G eorge Gusciora, MHPCC9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-1 0-27 00:57:31$11 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-12-02 21:12:52 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/math/psPolynomial.h
r2439 r2600 10 10 * 11 11 * @author Someone at IfA 12 * @author G eorge Gusciora, MHPCC12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-1 1-24 22:33:21 $14 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-12-02 21:12:51 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/math/psSpline.h
r2439 r2600 10 10 * 11 11 * @author Someone at IfA 12 * @author G eorge Gusciora, MHPCC12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-1 1-24 22:33:21 $14 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-12-02 21:12:51 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/sys/psTrace.c
r2426 r2600 7 7 * 8 8 * @author Robert Lupton, Princeton University 9 * @author G eorge Gusciora, MHPCC9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-1 1-24 20:12:28$11 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-12-02 21:12:52 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/sysUtils/psSysUtilsErrors.h
r2320 r2600 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-1 1-10 18:36:10$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-12-02 21:12:52 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 36 36 #define PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY "Unknown logging keyword %c." 37 37 #define PS_ERRORTEXT_psMemory_NULL_BLOCK "NULL memory block found." 38 #define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE "Memory block %l d was freed but still being used."39 #define PS_ERRORTEXT_psMemory_UNDERFLOW "Memory block %l d is corrupted; buffer underflow detected."40 #define PS_ERRORTEXT_psMemory_OVERFLOW "Memory block %l d is corrupted; buffer overflow detected."41 #define PS_ERRORTEXT_psMemory_MULTIPLE_FREE "Block %l d, allocated at %s:%d, freed multiple times at %s:%d."38 #define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE "Memory block %lld was freed but still being used." 39 #define PS_ERRORTEXT_psMemory_UNDERFLOW "Memory block %lld is corrupted; buffer underflow detected." 40 #define PS_ERRORTEXT_psMemory_OVERFLOW "Memory block %lld is corrupted; buffer overflow detected." 41 #define PS_ERRORTEXT_psMemory_MULTIPLE_FREE "Block %lld, allocated at %s:%d, freed multiple times at %s:%d." 42 42 #define PS_ERRORTEXT_psString_NCHAR_NEGATIVE "Can not copy a negative number of characters (%d)." 43 43 #define PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT "Sub-component %d of node %s in trace tree is NULL." -
trunk/psLib/src/sysUtils/psTrace.c
r2426 r2600 7 7 * 8 8 * @author Robert Lupton, Princeton University 9 * @author G eorge Gusciora, MHPCC9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-1 1-24 20:12:28$11 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-12-02 21:12:52 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
Note:
See TracChangeset
for help on using the changeset viewer.
