irfu / irfu-matlab

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

SolO IRFU quicklooks: "Index exceeds the number of array elements (3).", crashes #98

Closed ErikPGJ closed 1 year ago

ErikPGJ commented 1 year ago

Step 1: Latest code?

Step 2: Describe your environment

Step 3: Describe the problem

Expected behavior

Not crash. Produce weekly plots.

Actual behavior

Crashed when executed command on brain: 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-09_09.51.07._2021-08-20T00:00:00---2021-09-10T00:00:00', '1', '1', '2021-08-20T00:00:00', '2021-09-10T00:00:00');

  [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=Index exceeds the number of array elements (3).
quicklooks_7days, row 102
quicklook_main, row 304
Command exited with non-zero status 99

Last completed plot is 1w/20210825T00_20210901T00.png so presumably the problem is triggered when enabling weekly plots for 2021-09-01T00 to 2021-09-08T00.

ErikPGJ commented 1 year ago

Get same error message, presumably same bug, for other time period: 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');

No weekly plots produced. Commit 7a6b2352.

ErikPGJ commented 1 year ago

Bug has "changed" at 264e7afc?

solo.quicklook_main('/home/erjo/so_irfu-matlab_qli//mission/solar_orbiter/+solo/irf_logo.png', '/data/solo/data_yuri/', '/home/erjo/temp/so_qli/so_qli_MTEST.2022-08-29_16.07.12._2021-08-20T00:00:00---2021-09-20T00:00:00', '0', '1', '2021-08-20T00:00:00', '2021-09-20T00:00:00'); (brain) yields

exception.message=No cdf files specified
dataobj, row 72
rcdf, row 218
read_TNR, row 53
quicklooks_7days, row 131
quicklook_main, row 305
JordiBoldu commented 1 year ago

Bug originated in a for loop to increase the date to open new PAS and TNR data. for iii = 1:(Tint(2)-Tint(1))/3600/24. If the input Tint has days without files it will pop out an error. Changed previously for PAS data, but forgot to do it for TNR.

Changed to for iii = 1:ceil((myFile(end).stop-myFile(1).start)/3600/24), so it will iterate only the amount of times equal to the number of files.

ErikPGJ commented 1 year ago

Appears to have been fixed with fbc3523e.