et_callable_to_datetime_callable

giant.utilities.spice_interface:

giant.utilities.spice_interface.et_callable_to_datetime_callable(func)[source]

This function takes a callable object that takes a time in ephemeris time and returns a callable object that takes a time as a python datetime object.

Calls to the output from this function are equivalent to

>>> import spiceypy
>>> import datetime
>>> observation_date = datetime.datetime.now()
>>> et = spiceypy.str2et(observation_date.isoformat())
>>> res = func(et)

where observation_date is the datetime object that would be passed to the output from this function and func is the input to this function.

Parameters:

func (Callable) – The callable to be converted to datetime callable

Returns:

An object which accepts a datetime object inplace of an et float

Return type:

Callable