from spiops import spiops
import spiceypy
spiops.load('/Users/mcosta/SPICE/MARS-EXPRESS/kernels/mk/MEX_OPS_LOCAL.TM')
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)
mex.Plot('distance', notebook=True)
# We want to plot the groundtrack velocity of the flyby (and compare it with the JUICE groundtrack velocity)
mex.Plot('zaxis_target_angle', notebook=True)
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)
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)
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)
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
16s
32s
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))))
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')
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')