Source code for gfinder.roi

"""ROI module."""

from gfinder.target import Target
import spiceypy as spice

[docs]class ROI: def __init__(self, roi_def): self.id = roi_def['id'] self.target = Target(roi_def['target']) self.center_lon = roi_def['center_lon'] self.center_lat = roi_def['center_lat'] self.diameter = roi_def['diameter'] def __repr__(self): return '<%s %r>' % (self.__class__.__name__, self.__dict__)
[docs] def getSurfacePoint(self): """Returns the rectangular coordinates of the ROI center point on the surface of associated target body. """ roi_spoint = spice.georec(self.center_lon * spice.rpd(), self.center_lat * spice.rpd(), 0.0, self.target.re, self.target.f) return roi_spoint