irfu / irfu-matlab

Matlab routines to work with space data, particularly with MMS and Cluster/CAA data. Also some general plasma routines.
59 stars 46 forks source link

SolO IRFU quicklooks failed due to SPICE-related error #92

Closed ErikPGJ closed 2 years ago

ErikPGJ commented 2 years ago

This issue is not fully researched yet, but I want it documented anyway. It likely needs to be resolved by either @JordiBoldu or @ErikPGJ.

Step 1: Latest code?

This issue was found in 6cd2caf5 which is technically not the latest version, but the relevant code has not been updated since then.

Step 2: Describe your environment

Step 3: Describe the problem

Expected behavior

Generate Solar Orbiter IRFU quicklooks for the relevant time interval using @konradSteinvall 's code under +solo/quicklook_main.m.

Actual behavior

Code crashes. spis: /home/erjo/logs/so_irfu_quicklooks.2022-05-19_11.30.38.log

[irf_filt(63) : proc] using 5-th order ellip lowpass filter
[irf_ebsp(155) : fcal] assuming s/c position [1 0 0] for estimating FAC
irf_ebsp ... calculate B wavelet transform ....Done.
  [warning: solo_db.get_variable/append_sci_var(131)] Discarded 1 data points
  [warning: solo_db.get_variable/append_sci_var(131)] Discarded 1 data points
  [warning: get_variable(60)] dataobj:get_variable:cyclic_depCyclic dependecy: Epoch <-> Half_interval
  [warning: get_variable(60)] dataobj:get_variable:cyclic_depCyclic dependecy: Epoch <-> Half_interval
  [warning: get_variable(60)] dataobj:get_variable:cyclic_depCyclic dependecy: Epoch <-> Half_interval
  [warning: get_variable(60)] dataobj:get_variable:cyclic_depCyclic dependecy: Epoch <-> Half_interval
  [warning: get_variable(60)] dataobj:get_variable:cyclic_depCyclic dependecy: Epoch <-> Half_interval
  [warning: get_variable(60)] dataobj:get_variable:cyclic_depCyclic dependecy: Epoch <-> Half_interval
exception.message=SPICE(INVALIDVALUE): [spkpos_c->SPKPOS->SPKEZP->SPKAPO->SPKGPS->SPKPVN->SPKR19] Window size in type 19 segment was 0; must be in the range 2:14 for subtype 0. Mini-segment index is 1500. Failure occurred at input vector index 7. (CSPICE_N0067)
cspice_spkpos, row 630
get_position, row 93
quicklook_main, row 196
[?1l>STDERR: Command exited with non-zero status 99

Steps to reproduce:

Have not yet tried to reproduce, but the code crashed when executing below call on spis: solo.quicklook_main('/home/erjo/so_irfu-matlab_qli//mission/solar_orbiter/+solo/irf_logo.png', '/data/solo/data_yuri/', '/data/solo/EJ_temp/qli//so_irfu_quicklooks_cron_2022-05-19_11.30.38', '1', '1', '2020-02-12T00:00:00', '2021-01-07T00:00:00')

NOTE: This call took 104.3 h, but the long duration should be unrelated to the error.

ErikPGJ commented 2 years ago

Judging from the completed plots, the error occurs when plotting for somewhere around 2020-09-21/22.

ErikPGJ commented 2 years ago

Probably solved. Test run below yields other error, see #98.

solo.quicklook_main('/home/erjo/so_irfu-matlab_qli//mission/solar_orbiter/+solo/irf_logo.png', '/data/solo/data_yuri/', '/home/erjo/temp/qli/so_qli_MTEST.2022-08-10_10.18.00._2020-09-10T00:00:00---2020-10-01T00:00:00', '1', '1', '2020-09-10T00:00:00', '2020-10-01T00:00:00');

Commit 7a6b2352.