Note
These functions deal with vector and matrices manipulations by SOFA. Most of them can be implemented by the user in a perhaps more straightforward and fastest way by directly using math or numpy methods, but they are however implemented and listed here for completeness.
Decompose radians into degrees, arcminutes, arcseconds, fraction.
Parameters: |
|
---|---|
Returns: | a tuple whose first member is a string containing the sign, and the second member is itself a tuple (degrees, arcminutes, arcseconds, fraction). |
See also
SOFA manual.pdf page 19
Decompose radians into hours, arcminutes, arcseconds, fraction.
Parameters: |
|
---|---|
Returns: | a tuple whose first member is a string containing the sign, and the second member is itself a tuple (hours, arcminutes, arcseconds, fraction). |
See also
SOFA manual.pdf page 20
Convert degrees, arcminutes, arcseconds to radians.
Parameters: |
|
---|---|
Returns: | the converted value in radians as a float. |
See also
SOFA manual.pdf page 21
Normalize a into the range 0 <= result < 2pi.
Parameter: | a (float) – the value to normalize. |
---|---|
Returns: | the normalized value as a float. |
See also
SOFA manual.pdf page 22
Normalize a into the range -pi <= result < +pi.
Parameter: | a (float) – the value to normalize. |
---|---|
Returns: | the normalized value as a float. |
See also
SOFA manual.pdf page 23
P-vector to spherical coordinates.
Parameter: | p (numpy.ndarray, matrix or nested sequences of shape (1,3)) – p-vector |
---|---|
Returns: | a tuple of two items:
|
See also
SOFA manual.pdf page 39
Copy a p-vector.
Parameter: | p (array-like of shape (1,3)) – p-vector to copy. |
---|---|
Returns: | a copy of p as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 53
Copy a pv-vector.
Parameter: | pv (array-like of shape (2,3)) – pv-vector to copy. |
---|---|
Returns: | a copy of pv as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 54
Copy a rotation matrix.
Parameter: | r (array-like of shape (3,3)) – rotation matrix to copy. |
---|---|
Returns: | a copy of r as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 55
Decompose days into hours, minutes, seconds, fraction.
Parameters: |
|
---|---|
Returns: | a tuple of two items:
|
See also
SOFA manual.pdf page 58
Create a new rotation matrix initialized to the identity matrix.
Returns: | an identity matrix as a numpy.matrix of shape 3x3. |
---|
See also
SOFA manual.pdf page 122
Extend a p-vector to a pv-vector by appending a zero velocity.
Parameter: | p (array-like of shape (1,3)) – p-vector to extend. |
---|---|
Returns: | pv-vector as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 142
P-vector to spherical polar coordinates.
Parameter: | p (array-like of shape (1,3)) – the p-vector |
---|---|
Returns: | a 3-tuple:
|
See also
SOFA manual.pdf page 143
Position-angle from two p-vectors.
Parameters: |
|
---|---|
Returns: | position angle of b with respect to a in radians (float). |
See also
SOFA manual.pdf page 144
Postion-angle from spherical coordinates.
Parameters: |
|
---|---|
Returns: | position angle of B with respect to A in radians (float). |
See also
SOFA manual.pdf page 145
P-vector inner product.
Parameters: |
|
---|---|
Returns: | a dot b as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 147
Modulus of p-vector.
Parameter: | p (array-like of shape (1,3)) – p-vector. |
---|---|
Returns: | modulus (float). |
See also
SOFA manual.pdf page 153
P-vector subtraction.
Parameters: |
|
---|---|
Returns: | a - b as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 158
Convert a p-vector into modulus and unit vector.
Parameter: | p (array-like of shape (1,3)) – p-vector. |
---|---|
Returns: | 2-tuple:
|
See also
SOFA manual.pdf page 159
P-vector addition.
Parameters: |
|
---|---|
Returns: | a + b as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 175
P-vector plus scaled p-vector.
Parameters: |
|
---|---|
Returns: | a + s*b as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 176
Discard velocity component of a pv-vector.
Parameter: | pv (array-like of shape (2,3)) – pv-vector. |
---|---|
Returns: | p-vector as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 181
Convert position/velocity from cartesian to spherical coordinates.
Parameter: | pv (array-like of shape (2,3)) – pv-vector. |
---|---|
Returns: | a 6-tuple:
|
See also
SOFA manual.pdf page 182
Inner product of two pv-vectors.
Parameters: |
|
---|---|
Returns: | a . b as a numpy.matrix of shape 1x2. |
See also
SOFA manual.pdf page 183
Modulus of pv-vector.
Parameter: | pv (array-like of shape (2,3)) – pv-vector. |
---|---|
Returns: | a 2-tuple:
|
See also
SOFA manual.pdf page 184
Subtract one pv-vector from another.
Parameters: |
|
---|---|
Returns: | a - b as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 185
Add one pv-vector to another.
Parameters: |
|
---|---|
Returns: | a + b as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 186
Update a pv-vector.
Parameters: |
|
---|---|
Returns: | a new pv-vector as a numpy.matrix of shape 2x3, with p updated and v unchanged. |
See also
SOFA manual.pdf page 189
Update a pv-vector, discarding the velocity component.
Parameters: |
|
---|---|
Returns: | a new p-vector, as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 190
Outer product of two pv-vectors.
Parameters: |
|
---|---|
Returns: | a x b as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 191
P-vector outer product.
Parameters: |
|
---|---|
Returns: | a x b as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 192
Express a r-matrix as a r-vector.
Parameter: | r (array-like of shape (3,3)) – rotation matrix. |
---|---|
Returns: | rotation vector as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 193
Form the rotation matrix corresponding to a given r-vector.
Parameter: | w (array-like of shape (1,3)) – rotation vector. |
---|---|
Returns: | rotation matrix as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 194
Rotate a r-matrix about the x-axis.
Parameters: |
|
---|---|
Returns: | the new rotation matrix, as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 195
Multiply a p-vector by a r-matrix.
Parameters: |
|
---|---|
Returns: | r * p as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 196
Multiply a pv-vector by a r-matrix.
Parameters: |
|
---|---|
Returns: | r * pv as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 197
Multiply two rotation matrices.
Parameters: |
|
---|---|
Returns: | a * b as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 198
Rotate a r-matrix about the y-axis.
Parameters: |
|
---|---|
Returns: | the new rotation matrix, as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 199
Rotate a r-matrix about the z-axis.
Parameters: |
|
---|---|
Returns: | the new rotation matrix, as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 200
Convert spherical coordinates to cartesian.
Parameters: |
|
---|---|
Returns: | direction cosines as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 211
Convert spherical polar coordinates to p-vector.
Parameters: |
|
---|---|
Returns: | cartesian coordinates as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 212
Convert position/velocity from spherical to cartesian coordinates.
Parameters: |
|
---|---|
Returns: | pv-vector as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 213
Multiply a pv-vector by two scalars.
Parameters: |
|
---|---|
Returns: | a new pv-vector (with p scaled by s1 and v scaled by s2) as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 214
Angular separation between two p-vectors.
Parameters: |
|
---|---|
Returns: | angular separation in radians, always positive (float). |
See also
SOFA manual.pdf page 215
Angular separation between two sets of spherical coordinates.
Parameters: |
|
---|---|
Returns: | angular separation in radians (float). |
See also
SOFA manual.pdf page 216
Multiply a p-vector by a scalar.
Parameters: |
|
---|---|
Returns: | s * p as a numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 222
Multiply a pv-vector by a scalar.
Parameters: |
|
---|---|
Returns: | s * pv as a numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 223
Convert hours, minutes, seconds to radians.
Parameters: |
|
---|---|
Returns: | the converted value in radians (float). |
See also
SOFA manual.pdf page 231
Convert hours, minutes, seconds to days.
Parameters: |
|
---|---|
Returns: | the converted value in days (float). |
See also
SOFA manual.pdf page 232
Transpose a rotation matrix.
Parameter: | r (array-like of shape (3,3)) – rotation matrix. |
---|---|
Returns: | transpose as a numpy.matrix of shape 3x3. |
See also
SOFA manual.pdf page 233
Multiply a p-vector by the transpose of a rotation matrix.
Parameters: |
|
---|---|
Returns: | numpy.matrix of shape 1x3. |
See also
SOFA manual.pdf page 234
Multiply a pv-vector by the transpose of a rotation matrix.
Parameters: |
|
---|---|
Returns: | numpy.matrix of shape 2x3. |
See also
SOFA manual.pdf page 235
Zero a p-vector.
Parameter: | p (array-like of shape (1,3)) – p-vector. |
---|---|
Returns: | a new p-vector filled with zeros. p isn’t modified. |
See also
SOFA manual.pdf page 251
Zero a pv-vector.
Parameter: | pv (array-like of shape (2,3)) – pv-vector. |
---|---|
Returns: | a new pv-vector filled with zeros. pv isn’t modified. |
See also
SOFA manual.pdf page 252
Initialize a rotation matrix to the null matrix.
Parameter: | r (array-like shape (3,3)) – rotation matrix. |
---|---|
Returns: | a new rotation matrix fileld with zeroes. r isn’t modified. |
See also
SOFA manual.pdf page 253