vectors/states/frames

Units used throughout kete are distance in au, and time in Days TDB scaled.

Coordinate frames match the coordinate frames used by cSPICE.

Representation of States, Vectors, and coordinate Frames.

class kete.vector.CometElements(desig, epoch, eccentricity, inclination, peri_dist, peri_arg, peri_time, lon_of_ascending)

Cometary Elements class made accessible to python.

Angles must be in degrees, distances in AU.

Parameters:
  • desig – The designations of the object.

  • epoch – The epoch time for the orbital elements.

  • eccentricity – The eccentricity of the orbit.

  • inclination – The inclination, must be in degrees.

  • peri_dist – The perihelion distance in AU.

  • peri_arg – The argument of perihelion, must be in degrees.

  • peri_time – The JD time of perihelion.

  • lon_of_ascending – The longitude of ascending node, in degrees.

desig

Designation of the object.

eccentric_anomaly

Eccentric Anomaly in degrees.

eccentricity

Eccentricity of the orbit.

epoch

Epoch of the elements in JD.

static from_state(state)

Construct a new CometElements object from a State.

Parameters:

State – State Object.

inclination

Inclination of the orbit in degrees.

lon_of_ascending

Longitude of the ascending node of the orbit in degrees.

mean_anomaly

Mean Anomaly in degrees.

mean_motion

Mean Motion of the orbit in degrees.

orbital_period

Orbital Period in days, nan if non-elliptical.

peri_arg

Argument of Perihelion of the orbit in degrees.

peri_dist

Distance of Perihelion of the orbit in au.

peri_time

Perihelion time of the orbit in JD.

semi_major

Semi Major Axis of the orbit in au.

state

Convert the orbital elements into a cartesian State.

true_anomaly

True Anomaly in degrees.

class kete.vector.Frames

Defined inertial frames supported by the python side of kete

Ecliptic = Frames.Ecliptic
Equatorial = Frames.Equatorial
FK4 = Frames.FK4
Galactic = Frames.Galactic
Undefined = Frames.Undefined
class kete.vector.SimultaneousStates(states, fov=None)

Representation of a collection of [State] at a single point in time.

The main value in this is that also includes an optional Field of View. If the FOV is provided, it is implied that the states which are present in this file were objects seen by the FOV.

center_id

The reference center NAIF ID for this state.

fov

The FOV if it exists.

frame

Coordinate Frame.

jd

The time of the simultaneous states.

static load(filename)

Load a single SimultaneousStates from a file.

static load_list(filename)

Load a list from a binary file.

Note that this loads a list of SimultaneousStates, meaning it is a list of a list of States.

obs_vecs

If a FOV is present, calculate all vectors from the observer position to the position of the objects.

save(filename)

Save a single SimultaneousStates to a file.

static save_list(vec, filename)

Save a list to a binary file.

Note that this saves a list of SimultaneousStates, meaning it is a list of a list of States.

states

States contained within.

class kete.vector.State(desig, jd, pos, vel, frame=None, center_id=10)

Representation of the state of an object at a specific moment in time.

as_ecliptic

Convert state to the Ecliptic Frame.

as_equatorial

Convert state to the Equatorial Frame.

as_fk4

Convert state to the FK4 Frame.

as_galactic

Convert state to the Galactic Frame.

center_id

Central ID of the object used as reference for the coordinate frame.

change_center(naif_id)

Change the center ID of the state from the current state to the target state.

If the desired state is not a known NAIF id this will raise an exception.

change_frame(frame)

Change the coordinate frame of the object to the target frame.

Parameters:

frame (Frames) – New frame to change to.

desig

Designation of the object if defined.

elements

Cometary orbital elements of the state.

frame

Frame of reference used to define the coordinate system.

jd

JD of the object’s state in TDB scaled time.

pos

Position of the object in AU with respect to the central object.

vel

Velocity of the object in AU/Day.

class kete.vector.Vector(raw, frame=None)

Vector class which is a vector along with a reference frame.

angle_between(other)

Compute the angle in degrees between two vectors in degrees. This will automatically make a frame change if necessary.

as_ecliptic

Return the vector in the ecliptic frame, regardless of starting frame.

as_equatorial

Return the vector in the equatorial frame, regardless of starting frame.

as_fk4

Return the vector in the fk4 frame, regardless of starting frame.

as_galactic

Return the vector in the galactic frame, regardless of starting frame.

az

Azimuth in degrees from the X axis in the X-Y plane of the coordinate frame.

change_frame(target_frame)

Return the vector in the target frame, regardless of starting frame.

dec

Declination in degrees if the frame is Equatorial.

property dec_dms

The declination, in degrees-arcminutes-arcseconds string format.

el

Elevation in degrees from the X-Y plane of the coordinate frame. Values will be between -180 and 180

frame

The Frame of reference.

static from_el_az(el, az, r, frame)

Create a new Vector from the elevation and azimuthal angle in degrees.

Parameters:
  • el (float) – Elevation above the X-Y plane of the frame. (Degrees)

  • az (float) – Azimuthal angle on the X-Y plane for the frame. (Degrees)

  • frame (Frames) – Frame of reference which define the coordinate axis.

  • r – Optional length of the vector, defaults to 1.

static from_lat_lon(lat, lon, r=None)

Create a new Ecliptic Vector with the specified latitude/longitude.

Parameters:
  • lat (float) – Latitude in the ecliptic frame. (Degrees)

  • lon (float) – Longitude in the ecliptic frame. (Degrees)

  • r – Optional length of the vector, defaults to 1.

static from_ra_dec(ra, dec, r=None)

Create a new Equatorial Vector with the specified RA/DEC.

Parameters:
  • ra (float) – Right Ascension in the equatorial frame. (Degrees)

  • dec (float) – Declination in the equatorial frame. (Degrees)

  • r – Optional length of the vector, defaults to 1.

lat

Latitude in degrees if the frame is Ecliptic.

lon

Longitude in degrees if the frame is Ecliptic.

r

Length of the Vector

ra

Right Ascension in degrees if the frame is Equatorial.

property ra_hms

The right ascension, in hours-minutes-seconds string format.

raw

The raw vector without the Frame.

rotate_around(other, angle)
x

X coordinate in au.

y

Y coordinate in au.

z

Z coordinate in au.