snippet_spice.spice01_quickstartΒΆ

A simple sample to use irfpy.spice module

The SpiceyPy must be installed, at the first place. Refer to Quick install, or simply type the following from command line.

pip install "git+https://github.com/AndrewAnnex/SpiceyPy.git"

Then, many of cspice functions can be used in the python environment. When you launch ipython for example, then type

[In 1]: from irfpy.spice import spice

to load the spice functionality.

""" A simple sample to use irfpy.spice module

The SpiceyPy must be installed, at the first place.
Refer to :ref:`quickinstall`, or simply type the following from command line.

::

    pip install "git+https://github.com/AndrewAnnex/SpiceyPy.git"

Then, many of cspice functions can be used in the python environment.
When you launch ipython for example, then type

::

    [In 1]: from irfpy.spice import spice

to load the spice functionality.
"""
from irfpy.spice import spice

def main():
    '''Main script'''
    ### Furnsh the leapsecond kernel.
    spice.furnsh('naif0010.tls')

    ### Try to get the et.
    et = spice.str2et('2014-12-01T12:00:00')

    print(et)

    

if __name__ == "__main__":
    main()