radialvel¶
- stistools.radialvel.earthVel(mjd)¶
Compute and return the velocity of the Earth at the specified time.
This function computes the Earth's orbital velocity around the Sun in celestial rectangular coordinates. The expressions are from the Astronomical Almanac, p C24, which gives low precision formulas for the Sun's coordinates. We'll apply these formulas directly to get the velocity of the Sun relative to the Earth, then we'll convert to km per sec and change the sign to get the velocity of the Earth.
- Parameters:
- mjdfloat
time, Modified Julian Date
- Returns:
- velndarray
the velocity vector of the Earth around the Sun, in celestial coordinates (shape=(3,),ndtype=float64)
Notes
We get the velocity of the Sun relative to the Earth as follows:
The velocity in the ecliptic plane with the X-axis aligned with the radius vector is:
Vx = radius_dot,
Vy = radius * elong_dot,
Vz = 0
where:
radius is the radial distance from Earth to Sun
elong is the ecliptic longitude of the Sun
eps is the obliquity of the ecliptic
_dot means the time derivative
Rotate in the XY-plane by elong to get the velocity in ecliptic coordinates:
radius_dot * cos (elong) - radius * elong_dot * sin (elong) radius_dot * sin (elong) + radius * elong_dot * cos (elong) 0
Rotate in the YZ-plane by eps to get the velocity in equatorial coordinates:
radius_dot * cos (elong) - radius * elong_dot * sin (elong) (radius_dot * sin (elong) + radius * elong_dot * cos (elong)) * cos (eps) (radius_dot * sin (elong) + radius * elong_dot * cos (elong)) * sin (eps)
- stistools.radialvel.precess(mjd, target)¶
Precess target coordinates from J2000 to the date mjd.
- Parameters:
- mjdfloat
time, Modified Julian Date
- targetarray_like object
unit vector pointing toward the target, J2000 coordinates
- Returns:
- vectorndarray
the target vector (or matrix) precessed to mjd as an array object of type float64 and the same shape as target, i.e. either (3,) or (n,3)
Notes
target can be a single vector, e.g. [x0, y0, z0], or it can be a 2-D array; in the latter case, the shape should be (n,3):
target = [[x0, x1, x2, x3, x4], [y0, y1, y2, y3, y4], [z0, z1, z2, z3, z4]]
The algorithm used in this function was based on [1] and [2].
References
- stistools.radialvel.radialVel(ra_targ, dec_targ, mjd)¶
Compute the heliocentric velocity of the Earth.
This function computes the radial velocity of a target based on the Earth's orbital velocity around the Sun. The space motion of the target is not taken into account. That is, the radial velocity is just the negative of the component of the Earth's orbital velocity in the direction toward the target.
- Parameters:
- ra_targfloat
right ascension of the target (degrees)
- dec_targfloat
declination of the target (degrees)
- mjdfloat
Modified Julian Date at the time of observation
- Returns:
- radial_velfloat
the radial velocity in km/s