In [1]:
from spiops import spiops
import spiceypy
spiops.load('/Users/mcosta/SPICE/MARS-EXPRESS/kernels/mk/MEX_OPS_LOCAL.TM')
In [2]:
utc_start  = '2011-01-09T14:00:00'
utc_finish = '2011-01-09T14:10:00'
interval = spiops.TimeWindow(utc_start, utc_finish, resolution=8)
phobos = spiops.Target('PHOBOS', time=interval, frame='IAU_PHOBOS')
mex = spiops.Observer('MEX', time=interval, target=phobos)
In [3]:
mex.Plot('distance', notebook=True)
# We want to plot the groundtrack velocity of the flyby (and compare it with the JUICE groundtrack velocity)
Loading BokehJS ...
In [4]:
mex.Plot('zaxis_target_angle', notebook=True)
Loading BokehJS ...
In [5]:
predicted_ck  = '/Users/mcosta/SPICE/MARS-EXPRESS/kernels/ck/ATNM_T6_P060401000000_01346.BC'
measured_ck = 'mex_measured_attitude/ATNM_MEASURED_110109_110109_8S_V01.BC'
resolution = 8

spiops.ckdiff_error(measured_ck, predicted_ck, 'MEX_SC_REF', 'J2000', resolution, 0.001, 
                    plot_style='circle', utc_start=utc_start, utc_finish=utc_finish, notebook=True, report=True)
Loading BokehJS ...
In [6]:
predicted_ck  = '/Users/mcosta/SPICE/MARS-EXPRESS/kernels/ck/ATNM_T6_P060401000000_01346.BC'
measured_ck = 'mex_measured_attitude/ATNM_MEASURED_110109_110109_16S_V01.BC'
resolution = 16

spiops.ckdiff_error(measured_ck, predicted_ck, 'MEX_SC_REF', 'J2000', resolution, 0.001, 
                    plot_style='circle', utc_start=utc_start, utc_finish=utc_finish, notebook=True, report=True)
Loading BokehJS ...
In [7]:
predicted_ck  = '/Users/mcosta/SPICE/MARS-EXPRESS/kernels/ck/ATNM_T6_P060401000000_01346.BC'
measured_ck = 'mex_measured_attitude/ATNM_MEASURED_110109_110109_32S_V01.BC'
resolution = 32

spiops.ckdiff_error(measured_ck, predicted_ck, 'MEX_SC_REF', 'J2000', resolution, 0.001, 
                    plot_style='circle', utc_start=utc_start, utc_finish=utc_finish, notebook=True, report=True)
Loading BokehJS ...

The IFOV of HRSC is 0.000040 rad/pixel and HRSC/SRC is 0.00000914

HRSC has 5184 pixels per line and SRC is a 1024x1024 frame

The errors for the different cases are:

  • 8s

    • MAX Error: 79.753 MILLIDEG
    • MIN Error: 0.003 MILLIDEG
    • MEAN Error: 13.782 MILLIDEG
  • 16s

    • MAX Error: 100.9077 MILLIDEG
    • MIN Error: 0.396 MILLIDEG
    • MEAN Error: 22.777 MILLIDEG
  • 32s

    • MAX Error: 149.5613 MILLIDEG
    • MIN Error: 1.845 MILLIDEG
    • MEAN Error: 46.0428 MILLIDEG
In [8]:
from astropy import units as u

print('HRSC     max. error in pixels with 8s:  {:.0f}'.format(79.753*u.mdeg/((0.000040 * u.rad).to(u.mdeg))))
print('HRSC     max. error in pixels with 16s: {:.0f}'.format(100.9077*u.mdeg/((0.000040 * u.rad).to(u.mdeg))))
print('HRSC     max. error in pixels with 32s: {:.0f}'.format(149.5613*u.mdeg/((0.000040 * u.rad).to(u.mdeg))))
print('HRSC/SRC max. error in pixels with 8s:  {:.0f}'.format(79.753*u.mdeg/((0.00000914 * u.rad).to(u.mdeg).to(u.mdeg))))
print('HRSC/SRC max. error in pixels with 16s: {:.0f}'.format(100.9077*u.mdeg/((0.00000914 * u.rad).to(u.mdeg).to(u.mdeg))))
print('HRSC/SRC max. error in pixels with 32s: {:.0f}'.format(149.5613*u.mdeg/((0.00000914 * u.rad).to(u.mdeg).to(u.mdeg))))
HRSC     max. error in pixels with 8s:  35
HRSC     max. error in pixels with 16s: 44
HRSC     max. error in pixels with 32s: 65
HRSC/SRC max. error in pixels with 8s:  152
HRSC/SRC max. error in pixels with 16s: 193
HRSC/SRC max. error in pixels with 32s: 286
In [15]:
import spiceypy
spiceypy.furnsh('/Users/mcosta/SPICE/MARS-EXPRESS/kernels/mk/MEX_OPS_LOCAL.TM')
spiceypy.furnsh('/Users/mcosta/SPICE/MARS-EXPRESS/kernels/ck/ATNM_T6_P060401000000_01346.BC')

sc_targets = ['PHOBOS']
dsk = ['mex_measured_attitude/PHOBOS_M157_GAS_V01.BDS']
utc = '2011-01-09 14:06:31.010'

simulated_image = spiops.simulate_image(utc, 'MEX_HRSC_SRC', sc_targets, dsks=dsk,
                 generate_image=True, pixel_samples=1024, pixel_lines=1024,
                 camera_spk=False, report=False, log='src.log', name='MEX_HRSC_SRC_2011-01-09T14:06:30.465_PRED.PNG')
In [16]:
spiceypy.furnsh('/Users/mcosta/SPICE/MARS-EXPRESS/kernels/mk/MEX_OPS_LOCAL.TM')
spiceypy.furnsh('mex_measured_attitude/ATNM_MEASURED_110109_110109_32S_V01.BC')

sc_targets = ['PHOBOS']
dsk = ['mex_measured_attitude/PHOBOS_M157_GAS_V01.BDS']
utc = '2011-01-09 14:06:31.010'

simulated_image = spiops.simulate_image(utc, 'MEX_HRSC_SRC', sc_targets, dsks=dsk,
                 generate_image=True, pixel_samples=1024, pixel_lines=1024,
                 camera_spk=False, report=False, log='src.log', name='MEX_HRSC_SRC_2011-01-09T14:06:30.465_MES.PNG')
In [ ]: