Source code for gfinder.target
"""Target module."""
import spiceypy as spice
[docs]class Target:
def __init__(self, target_name, surface_model=None):
"""Inits Target object.
Args:
target_name:
surface_model:
"""
self.name = target_name
self.frame = 'IAU_' + self.name
dim, radii = spice.bodvrd(self.name, 'RADII', 3)
self.radii = radii
body, found = spice.bodn2c(self.name)
self.id = body
self.re = self.radii[0] # equatorial radius
self.f = (self.radii[0] - self.radii[2]) / self.radii[0] # flattening coefficient
def __repr__(self):
return '<%s %r>' % (self.__class__.__name__, self.__dict__)
[docs] def get_noa_frame(self, obsrvr):
noa_frame = '{}_{}_NOA'.format(obsrvr,
self.name) # eg: JUICE_JUPITER_NOA, warning: may not exists/be loaded in kernels pool
return noa_frame