Closed nicHoch closed 1 year ago
Yea so there seems to be something wrong with the spice kernels but only for on specific time 2023-02-13T01:58:13.479. We can catch these error with something like this and put nans in files to stop processing from crashing
with spicey.no_found_check():
for t in times:
et = spicey.utc2et(t.isot)
sc = spicey.sce2t(-144, et)
try:
cmat, *_ = spicey.ckgp(-144851, sc, 1000.0, 'SOLO_SUN_RTN')
print(t, cmat)
except Exception as e:
print(t, e)
Minimal code to reproduce the problem
import spiceypy as spicey
spicey.furnsh('solo_ANC_soc-flown-mk.tm')
et = spicey.utc2et('2023-02-13T01:58:13.479')
sc = spicey.sce2t(-144, et)
cmat, *_ = spice.ckgp(-144851, sc, 1.0, 'SOLO_SUN_RTN')
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[82], line 1
----> 1 cmat, *_ = spice.ckgp(-144851, sc, 1.0, 'SOLO_SUN_RTN')
NameError: name 'spice' is not defined
In [83]: cmat, *_ = spicey.ckgp(-144851, sc, 1.0, 'SOLO_SUN_RTN')
---------------------------------------------------------------------------
SpiceNOFRAMECONNECT Traceback (most recent call last)
<ipython-input-83-c8e1f3a98c30> in ?()
----> 1 cmat, *_ = spicey.ckgp(-144851, sc, 1.0, 'SOLO_SUN_RTN')
~/.virtualenvs/stixpy/lib/python3.11/site-packages/spiceypy/spiceypy.py in ?(*args, **kwargs)
138 res = f(*args, **kwargs)
139 check_for_spice_error(f)
140 return res
141 except BaseException:
--> 142 raise
~/.virtualenvs/stixpy/lib/python3.11/site-packages/spiceypy/spiceypy.py in ?(f)
118 explain = getmsg("EXPLAIN", 100).strip()
119 long = getmsg("LONG", 1841).strip()
120 traceback = qcktrc(200)
121 reset()
--> 122 raise dynamically_instantiate_spiceyerror(
123 short=short, explain=explain, long=long, traceback=traceback
124 )
SpiceNOFRAMECONNECT:
================================================================================
Toolkit version: CSPICE_N0067
SPICE(NOFRAMECONNECT) --
At epoch 7.2952556266407E+08 TDB (2023 FEB 13 01:59:22.664 TDB), there is insufficient information available to transform from reference frame -144991 (SOLO_SUN_RTN) to reference frame -144001 (SOLO_FOF). Frame SOLO_SUN_RTN could be transformed to frame 1 (J2000). Frame SOLO_FOF could be transformed to frame -144000 (SOLO_SRF). The latter is a CK frame; a CK file containing data for instrument or structure -144000 at the epoch shown above, as well as a corresponding SCLK kernel, must be loaded in order to use this frame. Failure to find required CK data could be due to one or more CK files not having been loaded, or to the epoch shown above lying within a coverage gap or beyond the coverage bounds of the loaded CK files. It is also possible that no loaded CK file has required angular velocity data for the input epoch, even if a loaded CK does have attitude data for that epoch. You can use CKBRIEF with the -dump option to display coverage intervals of a CK file.
ckgp_c --> CKGP --> REFCHG
================================================================================
So ESA confirmed this is due to TM gaps a list of such TM gaps is maintained on the SO wiki: https://issues.cosmos.esa.int/solarorbiterwiki/display/SOSP/Gaps+in+Attitude+Data
Closed by #356
in the preprocessing of the AUX file generation after returning from IDL the batch loop needs an error handler on file level.
the loop stops after the error and did not go on with the next file