irfpy.juice.jspice

Interface of JUICE related SPICE module.

Replaces irfpy.pep.pep_spice, irfpy.pep.juice_spice and irfpy.pep.juice_spice1205.

The PySpice extension is needed. Refer to pyspice_install document.

Note

This module is again deprecated (170719). Use irfpy.juice.jspiceesa module for further development. This module is kept for the backward compatibility.

irfpy.juice.jspice.furnsh(kernel_file)[source]

To furnsh kernel additionally.

irfpy.juice.jspice.isinit()[source]
irfpy.juice.jspice.reinit(*args, **kwds)[source]
irfpy.juice.jspice.init(mkkernel=None)[source]

To initialize the spice.

Initialize the spice, i.e. load the kernels specified.

Parameters

mkkernel – The MK kernel file name. If None is specified, the default file is read. Default file is specified by .irfpyrc file, [pep]-juicemkkernel entry.

irfpy.juice.jspice.define_jgo()[source]
irfpy.juice.jspice.define_juice()[source]
irfpy.juice.jspice.get_position(t, target='JGO', origin='JUPITER', frame='JSE')[source]

A generic position getter.

Parameters
  • t (datetime.datetime) – Time

  • target (String) – The SPICE name of the body to calculate the position

  • origin (String) – The SPICE name of the body at origin

  • frame (String) – Frame of the position vector

Returns

Return the target’s position with relative to origin in the given frame

Return type

np.array of (3,) shape.

You can get the position of JUICE at 2031/06/05T12:55:15 as

>>> init()
>>> pos = get_position(datetime.datetime(2031, 6, 5, 12, 55, 15))
>>> print('%.2f %.2f %.2f' % (pos[0], pos[1], pos[2]))
97514.29 -1409055.30 550473.59

You can get the position of JUICE centered at GANYMEDE.

>>> pos = get_position(datetime.datetime(2030, 9, 15, 12, 55, 15), origin='GANYMEDE', frame='IAU_GANYMEDE')
>>> print('%.2f %.2f %.2f' % (pos[0], pos[1], pos[2]))
50428.32 -22917.62 2457.08
irfpy.juice.jspice.get_velocity(t, target='JGO', origin='JUPITER', frame='JSE')[source]

A generic velocity getter.

Parameters
  • t (datetime.datetime) – Time

  • target (String) – The SPICE name of the body to calculate the position

  • origin (String) – The SPICE name of the body at origin

  • frame (String) – Frame of the position vector

Returns

Return the target’s velocity with relative to origin in the given frame

Return type

np.array of (3,) shape.

>>> init()
>>> vel = get_velocity(datetime.datetime(2031, 6, 5, 12, 55, 15))
>>> print('%.2f %.2f %.2f' % (vel[0], vel[1], vel[2]))
8.98 3.59 2.44
irfpy.juice.jspice.get_posvel(t, target='JGO', origin='JUPITER', frame='JSE')[source]

A generic position/velocity getter.

Parameters
  • t (datetime.datetime) – Time

  • target (String) – The SPICE name of the body to calculate the position

  • origin (String) – The SPICE name of the body at origin

  • frame (String) – Frame of the position vector

Returns

Return the target’s position and velocity with relative to origin in the given frame

Return type

np.array of (6,) shape.

irfpy.juice.jspice.get_conversion_matrix(t, from_frame='JSE', to_frame='IAU_JUPITER')[source]

Return conversion matrix at a given time.

Parameters
  • t – Time in datetime instance.

  • from_frame – The original frame

  • to_frame – The frame after conversion.

irfpy.juice.jspice.sun_longitude_system3(t)[source]

Gives Sun longitude in system 3.

>>> print('%.2f' % sun_longitude_system3(datetime.datetime(2030, 1, 1)))
133.02
>>> print('%.2f' % sun_longitude_system3(datetime.datetime(2030, 1, 1, 1)))
96.75
irfpy.juice.jspice.doctests()[source]