irfpy.spice.geometric_finder

Emulate the gf

It is not straightforward to use GF functionality. Here is a “simplified” version.

It is crude implementation, so it could be much slower…

irfpy.spice.geometric_finder.distance_below(target, origin, distance, initaial_interval, dt, correction='NONE', frame='J2000')[source]

Return the time interval where (Target - Origin) distance is <=distance.

Parameters
  • target – Target body

  • origin – Origin body

  • distance – Threshold distance

  • initial_interval – Initial time interval. See sample below.

  • dt – Time resolution to search for.

  • correction – Abberation correction.

  • frame – Frame to calculate. The distance should not depend on the selection of the frame, but still user may allow to set it.

Returns

Time interval that satisfy the condition.

Return type

irfpy.util.timeinterval.timeinterval object.

The time interval can be specified as follows.

>>> from irfpy.util.timeinterval import timeinterval
>>> import datetime
>>> t0 = datetime.datetime(2010, 1, 3, 12, 0, 0)
>>> t1 = datetime.datetime(2010, 1, 3, 13, 0, 0)
>>> tint = timeinterval(t0, t1)     # Between t0 and t1

The returned value is also for in the irfpy.util.timeinterval.timeinterval object.