Data Structures | |
| struct | psPlane |
| Euclidiean Coordinate System. More... | |
| struct | psSphere |
| Angular Coordinate System. More... | |
| struct | psCube |
| 3-Dimensional Euclidean Coordinate System More... | |
| struct | psPlaneTransform |
| 2D Polynomial Transform More... | |
| struct | psPlaneDistort |
| 4D Polynomial Transform More... | |
| struct | psProjection |
| Parameter set for projection/deprojection. More... | |
| struct | psEarthPole |
| Structure for respresenting the Earth's pole at any moment or determine velocity at the pole. More... | |
| struct | psSphereRot |
| Spherical Rotation Definition. More... | |
| struct | psTime |
| Definition of psTime. More... | |
Defines | |
| #define | PS_PRINT_PLANE_TRANSFORM(NAME) |
Enumerations | |
| enum | psProjectionType { PS_PROJ_LIN, PS_PROJ_PLY, PS_PROJ_WRP, PS_PROJ_TAN, PS_PROJ_DIS, PS_PROJ_SIN, PS_PROJ_STG, PS_PROJ_ZEA, PS_PROJ_ZPL, PS_PROJ_AIT, PS_PROJ_PAR, PS_PROJ_GLS, PS_PROJ_CAR, PS_PROJ_MER, PS_PROJ_NTYPE } |
| Projection type for projection/deprojection. More... | |
| enum | psPrecessMethod { PS_PRECESS_ROUGH, PS_PRECESS_COMPLETE_A, PS_PRECESS_COMPLETE_B, PS_PRECESS_IAU2000A } |
| Method for spherical precession used to specify the level of detail used in calculation. More... | |
| enum | psSphereOffsetMode { PS_SPHERICAL, PS_LINEAR } |
| Mode for Offset calculation between two sky positions. More... | |
| enum | psSphereOffsetUnit { PS_ARCSEC, PS_ARCMIN, PS_DEGREE, PS_RADIAN } |
| The units of the offset. More... | |
| enum | psTimeType { PS_TIME_TAI, PS_TIME_UTC, PS_TIME_UT1, PS_TIME_TT } |
| Time type. More... | |
| enum | psTimeBulletin { PS_IERS_A, PS_IERS_B } |
| Time Bulletin type. More... | |
Functions | |
| psPlane * | psPlaneAlloc (void) |
| Allocates a psPlane. | |
| psSphere * | psSphereAlloc (void) |
| Allocates a psSphere. | |
| psCube * | psCubeAlloc (void) |
| Allocates a psCube. | |
| psPlaneTransform * | psPlaneTransformAlloc (int order1, int order2) |
| Allocates a psPlaneTransform transform. | |
| psPlane * | psPlaneTransformApply (psPlane *out, const psPlaneTransform *transform, const psPlane *coords) |
| Applies the psPlaneTransform transform to a specified coordinate. | |
| psPlaneDistort * | psPlaneDistortAlloc (int order1, int order2, int order3, int order4) |
| Allocates a psPlaneDistort transform. | |
| psPlane * | psPlaneDistortApply (psPlane *out, const psPlaneDistort *distort, const psPlane *coords, float mag, float color) |
| Applies the psPlaneDistort transform to a specified coordinate. | |
| psProjection * | psProjectionAlloc (double R, double D, double Xs, double Ys, psProjectionType type) |
| Allocates memory for a psProjection structure. | |
| bool | psMemCheckPlane (psPtr ptr) |
| Checks the type of a particular pointer. | |
| bool | psMemCheckSphere (psPtr ptr) |
| Checks the type of a particular pointer. | |
| bool | psMemCheckCube (psPtr ptr) |
| Checks the type of a particular pointer. | |
| bool | psMemCheckPlaneTransform (psPtr ptr) |
| Checks the type of a particular pointer. | |
| bool | psMemCheckPlaneDistort (psPtr ptr) |
| Checks the type of a particular pointer. | |
| bool | psMemCheckProjection (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psPlane * | psProject (psPlane *out, const psSphere *coord, const psProjection *projection) |
| Projects a spherical coordinate to a linear coordinate system. | |
| psSphere * | psDeproject (psSphere *outSphere, const psPlane *coord, const psProjection *projection) |
| Reverse projection of a linear coordinate to a spherical coordinate system. | |
| psPlaneTransform * | p_psPlaneTransformLinearInvert (psPlaneTransform *transform) |
| Takes a given transform and inverts it linearly if possible. | |
| psBool | p_psIsProjectionLinear (psPlaneTransform *transform) |
| Takes a transform and tests whether or not it is a linear projection. | |
| psPlaneTransform * | psPlaneTransformInvert (psPlaneTransform *out, const psPlaneTransform *in, psRegion region, int nSamples) |
| inverts a given transformation. | |
| psPlaneTransform * | psPlaneTransformCombine (psPlaneTransform *out, const psPlaneTransform *trans1, const psPlaneTransform *trans2, psRegion region, int nSamples) |
| Creates a single transformation that has the effect of performing trans1 followed by trans2. | |
| bool | psPlaneTransformFit (psPlaneTransform *trans, const psArray *source, const psArray *dest, int nRejIter, float sigmaClip) |
| takes two arrays containing matched coordinates and returns the best-fitting transformation. | |
| psSphere * | psCubeToSphere (const psCube *cube) |
| Converts from a 3-dimensional coordinate system to an angular coordinate system. | |
| psCube * | psSphereToCube (const psSphere *sphere) |
| Converts from an angular coordinate system to a 3-dimensional coordinate system. | |
| psPlane * | psPlaneTransformDeriv (psPlane *out, const psPlaneTransform *transformation, const psPlane *coord) |
| Calculates the derivative of the specified psPlaneTransform with respect to x and y. | |
| psPixels * | psPixelsTransform (psPixels *out, const psPixels *input, const psPlaneTransform *inToOut) |
| Generates a list of pixels in the output coordinate frame that overlap the input pixels in the input coordinate frame through the specified transformation, inToOut. | |
| char * | psProjectTypeToString (psProjectionType type, char *prefix) |
| psProjectionType | psProjectTypeFromString (char *name) |
| bool | p_psEOCInit (void) |
| Initialize EOC. | |
| bool | p_psEOCFinalize (void) |
| Finalize EOC after using functions that make calls to eocInit for time table data. | |
| psEarthPole * | psEarthPoleAlloc (void) |
| Allocates a new psEarthPole structure. | |
| psSphere * | psAberration (psSphere *apparent, const psSphere *actual, const psSphere *direction, double speed) |
| Calculates the apparent position of a star, given its actual position and the velocity vector of the observer. | |
| psSphere * | psGravityDeflection (psSphere *apparent, psSphere *actual, psSphere *sun) |
| Calculates the apparent position of a star, given its actual position and the position of the sun. | |
| psEarthPole * | psEOC_PrecessionModel (const psTime *time) |
| Calculates the components of the rotation between the CEO and GCRS frames, X, Y, and s, using the IAU2000A precession & nutation model. | |
| psEarthPole * | psEOC_PrecessionCorr (const psTime *time, psTimeBulletin bulletin) |
| Provides interpolated corrections to the X and Y components of the polar coordinates from the tables provided by the IERS, just as it does for UT1 and polar motion. | |
| psSphereRot * | psSphereRot_CEOtoGCRS (const psEarthPole *pole) |
| Constructs the spherical rotation for transforming from CEO to GCRS coordinates. | |
| psSphereRot * | psSphereRot_TEOtoCEO (const psTime *time, psEarthPole *tidalCorr) |
| Calculates the rotation of the Earth about the CIP. | |
| psEarthPole * | psEOC_GetPolarMotion (const psTime *time, psTimeBulletin bulletin) |
| Provides interpolated values of the polar motion components extracted from the IERS tables. | |
| psEarthPole * | psEOC_PolarTideCorr (const psTime *time) |
| Provides tidal corrections to the polar motion components using the Ray model of Simon et al. | |
| psEarthPole * | psEOC_NutationCorr (psTime *time) |
| Provides the additional corrections due to nutation terms with periods less than or equal to two days, as well as the correction to the s-prime component of polar motion. | |
| psSphereRot * | psSphereRot_ITRStoTEO (const psEarthPole *motion) |
| Converts the polar motion corrections to a spherical rotation. | |
| psSphereRot * | psSpherePrecess (const psTime *fromTime, const psTime *toTime, psPrecessMethod mode) |
| Generates the complete spherical rotation to account for precession between two times. | |
| psSphereRot * | psSphereRotAlloc (double alphaP, double deltaP, double phiP) |
| Allocator for psSphereRot. | |
| bool | psMemCheckSphereRot (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psSphereRot * | psSphereRotQuat (double q0, double q1, double q2, double q3) |
| Allocator for psSphereRot given quaternions. | |
| psSphere * | psSphereRotApply (psSphere *out, const psSphereRot *transform, const psSphere *coord) |
| Applies the psSphereTransform transform for a specified coordinate. | |
| psSphereRot * | psSphereRotCombine (psSphereRot *out, const psSphereRot *rot1, const psSphereRot *rot2) |
| Combines two rotations. | |
| psSphereRot * | psSphereRotConjugate (psSphereRot *out, const psSphereRot *in) |
| Returns the conjugate of a specified rotation. | |
| psSphereRot * | psSphereRotInvert (double alphaP, double deltaP, double phiP) |
| Inverts the rotation. | |
| psSphere * | psSphereGetOffset (const psSphere *position1, const psSphere *position2, psSphereOffsetMode mode, psSphereOffsetUnit unit) |
| Determines the offset (RA,Dec) on the sky between two positions. | |
| psSphere * | psSphereSetOffset (const psSphere *position, const psSphere *offset, psSphereOffsetMode mode, psSphereOffsetUnit unit) |
| Applies the given offset to a coordinate. | |
| psSphereRot * | psSphereRotICRSToEcliptic (const psTime *time) |
| Creates the appropriate transform for converting from ICRS to Ecliptic coordinate systems. | |
| psSphereRot * | psSphereRotEclipticToICRS (const psTime *time) |
| Creates the appropriate transform for converting from Ecliptic to ICRS coordinate systems. | |
| psSphereRot * | psSphereRotICRSToGalactic (void) |
| Creates the appropriate transform for converting from ICRS to Galactic coordinate systems. | |
| psSphereRot * | psSphereRotGalacticToICRS (void) |
| Creates the appropriate transform for converting from Galactic to ICRS coordinate systems. | |
| const char * | p_psTimeConfigFileName () |
| psBool | p_psTimeInit (const char *fileName) |
| Initialize time data. | |
| void | psTimeInitialize (const char *timeConfig) |
| Initialize time data. | |
| psBool | p_psTimeFinalize (void) |
| Free memory persistant time data. | |
| void | psTimeFinalize (void) |
| Frees memory that was allocated by psTime functions. | |
| psTime * | psTimeAlloc (psTimeType type) |
| Allocate time struct. | |
| bool | psMemCheckTime (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psTime * | psTimeGetNow (psTimeType type) |
| Get current time. | |
| psTime * | psTimeConvert (psTime *time, psTimeType type) |
| Convert psTime to UTC, TAI, UT1, or TT time. | |
| double | psTimeToLMST (psTime *time, double longitude) |
| Convert psTime to Local Mean Sidereal Time (LMST). | |
| double | psTimeGetUT1Delta (const psTime *time, psTimeBulletin bulletin) |
| Determine UT1 - UTC from table lookup. | |
| psTime * | psTime_TideUT1Corr (const psTime *time) |
| Provides tidal corrections to UT1-UTC. | |
| psF64 | p_psTimeGetTAIDelta (const psTime *time) |
| Determine TAI - UTC from table lookup. | |
| psSphere * | p_psTimeGetPoleCoords (const psTime *time) |
| Determine polar coordinates at a given time. | |
| long | psTimeLeapSecondDelta (const psTime *time1, const psTime *time2) |
| Calculate the number of leapseconds between two times. | |
| bool | psTimeIsLeapSecond (const psTime *utc) |
| Determine if UTC time is a leapsecond. | |
| double | psTimeToJD (const psTime *time) |
| Convert psTime to Julian date time. | |
| double | psTimeToMJD (const psTime *time) |
| Convert psTime to modified Julian date time. | |
| psString | psTimeToISO (const psTime *time) |
| Convert psTime to ISO8601 formatted string. | |
| tm * | psTimeToTM (const psTime *time) |
| Convert psTime to struct tm time. | |
| timeval * | psTimeToTimeval (const psTime *time) |
| Convert psTime to timeval time. | |
| psTime * | psTimeFromJD (double jd) |
| Convert JD to psTime. | |
| psTime * | psTimeFromMJD (double mjd) |
| Convert MJD to psTime. | |
| psTime * | psTimeFromISO (const char *input, psTimeType type) |
| Convert ISO to psTime. | |
| psTime * | psTimeFromTimeval (const struct timeval *input) |
| Convert timeval to psTime. | |
| psTime * | psTimeFromTT (psS64 sec, psU32 nsec) |
| Convert Terrestrial Time to psTime. | |
| psTime * | psTimeFromUTC (psS64 sec, psU32 nsec, bool leapsecond) |
| Convert UTC time to psTime. | |
| psTime * | psTimeFromTM (const struct tm *time) |
| Convert tm time to psTime. | |
| psTime * | psTimeStrptime (const char *s, const char *format) |
| Convert an arbitrary string into a psTime. | |
| psString | psTimeStrftime (const psTime *time, const char *format) |
| Convert a psTime into a formated string. | |
| psTime * | psTimeMath (const psTime *time, double delta) |
| Adds delta to time. | |
| double | psTimeDelta (const psTime *time1, const psTime *time2) |
| Determine difference between two times. | |
| psF64 | p_psTimeSearchTables (psF64 index, psU64 column, char *metadataTableNames[], psU32 nTables, psLookupStatusType *status) |
| Searches the IERS time tables for a specified entry location. | |
| bool | psTimerStart (char *name) |
| Stores the current time in a psHash of timers, under the supplied name. | |
| psF64 | psTimerClear (char *name) |
| Resets the named timer. | |
| psF64 | psTimerMark (char *name) |
| Returns the elapsed time, in seconds, for the timer specified by name. | |
| bool | psTimerStop (void) |
| Frees all memory associated with all timers and returns the expended time. | |
| psTime * | psTimeCopy (const psTime *inTime) |
| Copy a psTime. | |
| #define PS_PRINT_PLANE_TRANSFORM | ( | NAME | ) |
Value:
{ \
printf("---------------------- Plane Transform ----------------------\n"); \
printf("x:\n"); \
PS_POLY_PRINT_2D(NAME->x); \
printf("y:\n"); \
PS_POLY_PRINT_2D(NAME->y); \
} \
| enum psPrecessMethod |
Method for spherical precession used to specify the level of detail used in calculation.
Definition at line 42 of file psEarthOrientation.h.
| enum psProjectionType |
Projection type for projection/deprojection.
| enum psSphereOffsetMode |
Mode for Offset calculation between two sky positions.
| PS_SPHERICAL | offset corresponds to an angular offset |
| PS_LINEAR | offset corresponds to a linear offset |
Definition at line 44 of file psSphereOps.h.
| enum psSphereOffsetUnit |
The units of the offset.
Definition at line 54 of file psSphereOps.h.
| enum psTimeBulletin |
| enum psTimeType |
Time type.
Enumeration for psTime types, TAI or UTC time.
| bool p_psEOCFinalize | ( | void | ) |
Finalize EOC after using functions that make calls to eocInit for time table data.
| bool p_psEOCInit | ( | void | ) |
Initialize EOC.
Parses IERS table data and creates the polynomials used by certain EOC functions.
| psBool p_psIsProjectionLinear | ( | psPlaneTransform * | transform | ) |
Takes a transform and tests whether or not it is a linear projection.
| transform | transform to test for linearity |
| psPlaneTransform* p_psPlaneTransformLinearInvert | ( | psPlaneTransform * | transform | ) |
Takes a given transform and inverts it linearly if possible.
| transform | transform to invert |
| const char* p_psTimeConfigFileName | ( | ) |
| psBool p_psTimeFinalize | ( | void | ) |
Free memory persistant time data.
Frees time data to be held in memory until the end of successful program execution.
Determine polar coordinates at a given time.
Determines the orientation of the polar axis at the given time.
| time | psTime determine polar orientation. |
| psBool p_psTimeInit | ( | const char * | fileName | ) |
Initialize time data.
Reads config and data files associated with various time conversions.
| fileName | File name containing config/data info |
| psF64 p_psTimeSearchTables | ( | psF64 | index, | |
| psU64 | column, | |||
| char * | metadataTableNames[], | |||
| psU32 | nTables, | |||
| psLookupStatusType * | status | |||
| ) |
Searches the IERS time tables for a specified entry location.
Returns the interpolated double precision (arcsec) value at the specified entry location. Inputs to specify are the time index in mjd, the column number corresponding to Xp, Yp, or Sp (UT1-UTC) in IERS A or B, the time table names, and the number of time tables.
| index | time index for which to search |
| column | column number of specified index |
| metadataTableNames | names of IERS tables to search |
| nTables | number of IERS tables to search |
| status | status of table search |
| psSphere* psAberration | ( | psSphere * | apparent, | |
| const psSphere * | actual, | |||
| const psSphere * | direction, | |||
| double | speed | |||
| ) |
Calculates the apparent position of a star, given its actual position and the velocity vector of the observer.
The actual and apparent positions are represented as psSphere entries, as is the direction of motion. The speed in that direction is given in units of the speed of light. If the value of apparent is NULL, a new psSphere is allocated, otherwise the point to apparent is used for the result.
| apparent | apparent position of star |
| actual | actual position of star |
| direction | direction of motion of observer |
| speed | speed of motion of observer |
| psSphere* psDeproject | ( | psSphere * | outSphere, | |
| const psPlane * | coord, | |||
| const psProjection * | projection | |||
| ) |
Reverse projection of a linear coordinate to a spherical coordinate system.
| coord | coordinate to project |
| projection | parameters of the projection |
| psEarthPole* psEarthPoleAlloc | ( | void | ) |
Allocates a new psEarthPole structure.
| psEarthPole* psEOC_GetPolarMotion | ( | const psTime * | time, | |
| psTimeBulletin | bulletin | |||
| ) |
Provides interpolated values of the polar motion components extracted from the IERS tables.
| time | specified time |
| bulletin | IERS tables for polar coordinate components. |
| psEarthPole* psEOC_NutationCorr | ( | psTime * | time | ) |
Provides the additional corrections due to nutation terms with periods less than or equal to two days, as well as the correction to the s-prime component of polar motion.
| time | specified time |
| psEarthPole* psEOC_PolarTideCorr | ( | const psTime * | time | ) |
Provides tidal corrections to the polar motion components using the Ray model of Simon et al.
| time | specified time |
| psEarthPole* psEOC_PrecessionCorr | ( | const psTime * | time, | |
| psTimeBulletin | bulletin | |||
| ) |
Provides interpolated corrections to the X and Y components of the polar coordinates from the tables provided by the IERS, just as it does for UT1 and polar motion.
| time | specified time |
| bulletin | IERS tables for polar coordinate components. |
| psEarthPole* psEOC_PrecessionModel | ( | const psTime * | time | ) |
Calculates the components of the rotation between the CEO and GCRS frames, X, Y, and s, using the IAU2000A precession & nutation model.
The input time may be represented in any format other than UT1. This routine must give results identical to the IERS XYS2000A subroutine.
| time | specified time |
Calculates the apparent position of a star, given its actual position and the position of the sun.
The actual and apparent positions are represented as psSphere entries, as is position of the sun. If the value of apparent is NULL, a new psSphere is allocated, otherwise the point to apparent is used for the result.
| apparent | apparent position of star |
| actual | actual position of star |
| sun | position of the sun |
| bool psMemCheckCube | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckPlane | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckPlaneDistort | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckPlaneTransform | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckProjection | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckSphere | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckSphereRot | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckTime | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| psPixels* psPixelsTransform | ( | psPixels * | out, | |
| const psPixels * | input, | |||
| const psPlaneTransform * | inToOut | |||
| ) |
Generates a list of pixels in the output coordinate frame that overlap the input pixels in the input coordinate frame through the specified transformation, inToOut.
psPixelsTransform is more complicated than simply transforming the input pixels, but requires the evaluation of the derivatives of the transformation in order to obtain the list of all pixels in the output coordinate frame that possibly overlap the pixel in the input coordinate frame. In the event that input or inToOut are NULL, the function shall generate an error and return NULL. If out is non-NULL it shall be modified and returned; otherwise a new psPixels shall be allocated and returned.
| out | output list of overlapping pixels |
| input | input list of pixels |
| inToOut | specified transformation |
| psPlaneDistort* psPlaneDistortAlloc | ( | int | order1, | |
| int | order2, | |||
| int | order3, | |||
| int | order4 | |||
| ) |
Allocates a psPlaneDistort transform.
| order1 | The order of the w term in the transform. |
| order2 | The order of the x term in the transform. |
| order3 | The order of the y term in the transform. |
| order4 | The order of the z term in the transform. |
| psPlane* psPlaneDistortApply | ( | psPlane * | out, | |
| const psPlaneDistort * | distort, | |||
| const psPlane * | coords, | |||
| float | mag, | |||
| float | color | |||
| ) |
Applies the psPlaneDistort transform to a specified coordinate.
| out | a psPlane to recycle. If NULL, a new one is generated. |
| distort | the transform to apply |
| coords | the coordinate to apply the transform above. |
| mag | third term -- maybe magnitude |
| color | forth term -- maybe color |
| psPlaneTransform* psPlaneTransformAlloc | ( | int | order1, | |
| int | order2 | |||
| ) |
Allocates a psPlaneTransform transform.
| order1 | The order of the x term in the transform. |
| order2 | The order of the y term in the transform. |
| psPlane* psPlaneTransformApply | ( | psPlane * | out, | |
| const psPlaneTransform * | transform, | |||
| const psPlane * | coords | |||
| ) |
Applies the psPlaneTransform transform to a specified coordinate.
| out | a psPlane to recycle. If NULL, a new one is generated. |
| transform | the transform to apply |
| coords | the coordinate to apply the transform above. |
| psPlaneTransform* psPlaneTransformCombine | ( | psPlaneTransform * | out, | |
| const psPlaneTransform * | trans1, | |||
| const psPlaneTransform * | trans2, | |||
| psRegion | region, | |||
| int | nSamples | |||
| ) |
Creates a single transformation that has the effect of performing trans1 followed by trans2.
psPlaneTransformCombine takes two transformations (trans1 and trans2) and returns a single transformation that has the effect of performing trans1 followed by trans2. In the event that the input transformation is linear, an exact solution may be calculated; otherwise nSamples samples in each axis, covering the region specified by region shall be used as a grid to fit the best inverse transformation. The function shall return NULL if it was unable to generate the transformation; otherwise it shall return the transformation.
| out | a transform to recycle, or NULL if one is to be created. |
| trans1 | first transform to combine |
| trans2 | first transform to combine |
| region | region to cover (for non-linear transforms) |
| nSamples | number of samples on each axis (for non-linear transforms) |
| psPlane* psPlaneTransformDeriv | ( | psPlane * | out, | |
| const psPlaneTransform * | transformation, | |||
| const psPlane * | coord | |||
| ) |
Calculates the derivative of the specified psPlaneTransform with respect to x and y.
| bool psPlaneTransformFit | ( | psPlaneTransform * | trans, | |
| const psArray * | source, | |||
| const psArray * | dest, | |||
| int | nRejIter, | |||
| float | sigmaClip | |||
| ) |
takes two arrays containing matched coordinates and returns the best-fitting transformation.
psPlaneTransformFit takes two arrays containing matched coordinates (i.e., coordinates in the source array correspond to the coordinates in the dest array) and returns the best-fitting transformation. The source and dest will contain psCoords. In the event that the number of coordinates in each is not identical, the function shall generate a warning, and extra coordinates in the longer of the two shall be ignored. The trans transform may not be NULL, since it specifies the desired order, polynomial type and any polynomial terms to mask. nRejIter rejection iterations shall be performed, wherein coordinates lying more than sigmaClip standard deviations from the fit shall be rejected.
| trans | desired order, polynomial type, & polynomial mask terms |
| source | coordinates matching those in dest |
| dest | coordinates matching those in source |
| nRejIter | number of rejection iterations to be performed |
| sigmaClip | coordinates above this number of standard deviations will be rejected |
| psPlaneTransform* psPlaneTransformInvert | ( | psPlaneTransform * | out, | |
| const psPlaneTransform * | in, | |||
| psRegion | region, | |||
| int | nSamples | |||
| ) |
inverts a given transformation.
It may assume that the input transformation is one-to-one, and that the inverse transformation may be specified through using polynomials of the same type and order as the forward transformation. In the event that the input transformation is linear, an exact solution may be calculated; otherwise nSamples samples in each axis, covering the region specified by region shall be used as a grid to fit the best inverse transformation. The function shall return NULL if it was unable to generate the inverse transformation; otherwise it shall return the inverse transformation. In the event that out is NULL, a new psPlaneTransform shall be allocated and returned.
| out | a transform to recycle, or NULL if one is to be created. |
| in | transform to invert |
| region | region to fit for non-linear transform inversion |
| nSamples | number of samples in each axis for fit |
| psPlane* psProject | ( | psPlane * | out, | |
| const psSphere * | coord, | |||
| const psProjection * | projection | |||
| ) |
Projects a spherical coordinate to a linear coordinate system.
| coord | coordinate to project |
| projection | parameters of the projection |
| psProjection* psProjectionAlloc | ( | double | R, | |
| double | D, | |||
| double | Xs, | |||
| double | Ys, | |||
| psProjectionType | type | |||
| ) |
Allocates memory for a psProjection structure.
| R | Right-ascension of projection center. |
| D | Declination of projection center. |
| Xs | Scale in x-dimension |
| Ys | Scale in y-dimension |
| psProjectionType psProjectTypeFromString | ( | char * | name | ) |
| char* psProjectTypeToString | ( | psProjectionType | type, | |
| char * | prefix | |||
| ) |
| psSphere* psSphereAlloc | ( | void | ) |
| psSphere* psSphereGetOffset | ( | const psSphere * | position1, | |
| const psSphere * | position2, | |||
| psSphereOffsetMode | mode, | |||
| psSphereOffsetUnit | unit | |||
| ) |
Determines the offset (RA,Dec) on the sky between two positions.
Both an offset mode and an offset unit may be defined. The mode may be either PS_SPHERICAL, in which case the specified offset corresponds to an offset in angles, or it may be PS_LINEAR, in which case the offset corresponds to a linear offset in a local projection. The offset unit may be in one of PS_ARCSEC, PS_ARCMIN, PS_DEGREE, and PS_RADIAN, which specifies the units of the offset only.
| position1 | first position for calculating offset |
| position2 | second position for calculating offset |
| mode | type of offset can be PS_SPHERICAL or PS_LINEAR |
| unit | specifies the units of offset only |
| psSphereRot* psSpherePrecess | ( | const psTime * | fromTime, | |
| const psTime * | toTime, | |||
| psPrecessMethod | mode | |||
| ) |
Generates the complete spherical rotation to account for precession between two times.
The equinoxes shall be Julian equinoxes.
If NULL is provided for either time, it is assumed to have the reference equinox value of J2000. The mode argument is used to specify the level of detail used in the calculation.
| fromTime | equinox of coords input |
| toTime | equinox of coords output |
| mode | level of detail to use |
| psSphereRot* psSphereRot_CEOtoGCRS | ( | const psEarthPole * | pole | ) |
Constructs the spherical rotation for transforming from CEO to GCRS coordinates.
The resulting psSphereRot may be used to determine the rotation from CIP/CEO to GCRS. This function must give results identical to the IERS BPN2000.
| pole | input coordinates to transform |
| psSphereRot* psSphereRot_ITRStoTEO | ( | const psEarthPole * | motion | ) |
Converts the polar motion corrections to a spherical rotation.
This function should give identical results to the IERS POM2000 subroutine.
| motion | corrected polar motion components |
| psSphereRot* psSphereRot_TEOtoCEO | ( | const psTime * | time, | |
| psEarthPole * | tidalCorr | |||
| ) |
Calculates the rotation of the Earth about the CIP.
If tidalCorr is non-NULL, use the S-component to provide tidal corrections to the UT1 time. If tidalCorr is NULL, no corrections are made & this step is skipped.
| time | specified time |
| tidalCorr | UT1 polar tide correction or NULL |
| psSphereRot* psSphereRotAlloc | ( | double | alphaP, | |
| double | deltaP, | |||
| double | phiP | |||
| ) |
Allocator for psSphereRot.
| alphaP | north pole latitude |
| deltaP | north pole longitude |
| phiP | defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). |
| psSphere* psSphereRotApply | ( | psSphere * | out, | |
| const psSphereRot * | transform, | |||
| const psSphere * | coord | |||
| ) |
Applies the psSphereTransform transform for a specified coordinate.
| out | a psSphere to recycle. If NULL, a new one is generated. |
| transform | the transform to apply |
| coord | the coordinate to apply the transform above.x |
| psSphereRot* psSphereRotCombine | ( | psSphereRot * | out, | |
| const psSphereRot * | rot1, | |||
| const psSphereRot * | rot2 | |||
| ) |
Combines two rotations.
Combines two rotations to produce a single rotation which is the equivalent of applying the rst rotation and then the second. The output rotation may be supplied, or will be allocated if NULL.
| out | a psSphereRot to recycle or NULL |
| rot1 | first rotation to combine |
| rot2 | second rotation to combine |
| psSphereRot* psSphereRotConjugate | ( | psSphereRot * | out, | |
| const psSphereRot * | in | |||
| ) |
Returns the conjugate of a specified rotation.
Stores the conjugate of a specified rotation in an existing psSphereRot* or creates a new psSphereRot* if NULL. The conjugate of a rotation given in quaternions is -q0, -q1, -q2, q3.
| out | a psSphereRot to recycle or NULL |
| in | the psSphereRot from which to obtain the conjugate |
| psSphereRot* psSphereRotEclipticToICRS | ( | const psTime * | time | ) |
Creates the appropriate transform for converting from Ecliptic to ICRS coordinate systems.
| time | the time for which the resulting transform will be valid |
| psSphereRot* psSphereRotGalacticToICRS | ( | void | ) |
Creates the appropriate transform for converting from Galactic to ICRS coordinate systems.
| psSphereRot* psSphereRotICRSToEcliptic | ( | const psTime * | time | ) |
Creates the appropriate transform for converting from ICRS to Ecliptic coordinate systems.
| time | the time for which the resulting transform will be valid |
| psSphereRot* psSphereRotICRSToGalactic | ( | void | ) |
Creates the appropriate transform for converting from ICRS to Galactic coordinate systems.
| psSphereRot* psSphereRotInvert | ( | double | alphaP, | |
| double | deltaP, | |||
| double | phiP | |||
| ) |
Inverts the rotation.
A given rotation is inverted by creating a psSphereRot using -phiP, -deltaP, -alphaP.
| alphaP | north pole latitude |
| deltaP | north pole longitude |
| phiP | defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). |
| psSphereRot* psSphereRotQuat | ( | double | q0, | |
| double | q1, | |||
| double | q2, | |||
| double | q3 | |||
| ) |
Allocator for psSphereRot given quaternions.
Normalizes a given quaternion and returns the cooresponding newly allocated psSphereRot object.
| q0 | q0 |
| q1 | q1 |
| q2 | q2 |
| q3 | q3 |
| psSphere* psSphereSetOffset | ( | const psSphere * | position, | |
| const psSphere * | offset, | |||
| psSphereOffsetMode | mode, | |||
| psSphereOffsetUnit | unit | |||
| ) |
Applies the given offset to a coordinate.
Both an offset mode and an offset unit may be defined. The mode may be either PS_SPHERICAL, in which case the specified offset corresponds to an offset in angles, or it may be PS_LINEAR, in which case the offset corresponds to a linear offset in a local projection. The offset unit may be in one of PS_ARCSEC, PS_ARCMIN, PS_DEGREE, and PS_RADIAN, which specifies the units of the offset only.
| position | coordinate of origin |
| offset | coordinate of offset to apply |
| mode | corresponds to an offset in angles or local projection |
| unit | specifies the units of offset only |
Provides tidal corrections to UT1-UTC.
Uses the Ray model of Simon et al.
| time | psTime to be corrected. |
| psTime* psTimeAlloc | ( | psTimeType | type | ) |
Allocate time struct.
Allocates an empty time struct. User must specify the psTimeType (PS_TIME_TAI or PS_TIME_UTC) in the argument. The seconds and microseconds members of the struct are set to zero.
| type | Type of time to create (UTC or TAI). |
| psTime* psTimeConvert | ( | psTime * | time, | |
| psTimeType | type | |||
| ) |
Determine difference between two times.
Result is in TAI time.
Determine difference between two times. Input times are converted to TAI format if necessary.
| time1 | First time. |
| time2 | Second time. |
| void psTimeFinalize | ( | void | ) |
Frees memory that was allocated by psTime functions.
Allows a subsequent search for leaked memory.
| psTime* psTimeFromISO | ( | const char * | input, | |
| psTimeType | type | |||
| ) |
| psTime* psTimeFromJD | ( | double | jd | ) |
| psTime* psTimeFromMJD | ( | double | mjd | ) |
| psTime* psTimeFromTimeval | ( | const struct timeval * | input | ) |
| psTime* psTimeFromTM | ( | const struct tm * | time | ) |
| psTime* psTimeGetNow | ( | psTimeType | type | ) |
Get current time.
Gets current time from the system clock. User must specify the psTimeType (PS_TIME_TAI or PS_TIME_UTC) in the argument.
| type | Type of time to get (UTC or TAI). |
| double psTimeGetUT1Delta | ( | const psTime * | time, | |
| psTimeBulletin | bulletin | |||
| ) |
Determine UT1 - UTC from table lookup.
This function is necessary to for various SLALIB functions.
| time | psTime to be looked up. |
| bulletin | IERS bulletin to use |
| void psTimeInitialize | ( | const char * | timeConfig | ) |
Initialize time data.
Reads the configuration file and sets up the appropriate psTimeTables and predictions.
| timeConfig | psTime configuration file |
| bool psTimeIsLeapSecond | ( | const psTime * | utc | ) |
Determine if UTC time is a leapsecond.
Determines if the specified UTC time is a valid leapsecond.
| utc | UTC to verify if leap second |
Calculate the number of leapseconds between two times.
Calculates the number of leapseconds between two times.
| time1 | First input time. |
| time2 | Second input time. |
Adds delta to time.
Result is in TAI time.
Adds delta to time. Input time is converted to TAI format if necessary.
| time | Time. |
| delta | Time delta. |
| psF64 psTimerClear | ( | char * | name | ) |
Resets the named timer.
| name | timer name to clear |
| psF64 psTimerMark | ( | char * | name | ) |
Returns the elapsed time, in seconds, for the timer specified by name.
| name | timer name to mark |
| bool psTimerStart | ( | char * | name | ) |
Stores the current time in a psHash of timers, under the supplied name.
| name | timer name to start |
| bool psTimerStop | ( | void | ) |
Frees all memory associated with all timers and returns the expended time.
| psTime* psTimeStrptime | ( | const char * | s, | |
| const char * | format | |||
| ) |
| double psTimeToJD | ( | const psTime * | time | ) |
| double psTimeToLMST | ( | psTime * | time, | |
| double | longitude | |||
| ) |
| double psTimeToMJD | ( | const psTime * | time | ) |
| struct timeval* psTimeToTimeval | ( | const psTime * | time | ) |
| struct tm* psTimeToTM | ( | const psTime * | time | ) |
1.5.1