spedas / bleeding_edge

IDL-based Space Physics Environment Data Analysis Software (bleeding edge)
http://www.spedas.org
Other
7 stars 0 forks source link

Numerous MMS EIS test failures #77

Open ericthewizard opened 1 year ago

ericthewizard commented 1 year ago

9 of the EIS tests are currently failing:

"All tests" test suite starting (1 test suite/case, 39 tests) "mms_load_eis_ut" test case starting (39 tests) test_angle_angle_load_simple: passed (floating-point divided by zero) (6.175819 seconds) test_ang_ang_datatype_electron: passed (floating-point divided by zero) (10.717680 seconds) test_ang_ang_datatype_phxtof: passed (floating-point divided by zero) (4.162811 seconds) test_ang_ang_data_rate: failed "Problem with EIS angle-angle burst mode?" (floating-point divided by zero) (2.332918 seconds) test_ang_ang_data_units: passed (floating-point divided by zero) (5.325372 seconds) test_ang_ang_diffprobe: passed (floating-point divided by zero) (3.644678 seconds) test_ang_ang_energychan: passed (floating-point divided by zero) (5.779027 seconds) test_ang_ang_extof_helium: passed (floating-point divided by zero) (5.924206 seconds) test_ang_ang_extof_oxygen: passed (floating-point divided by zero) (6.116552 seconds) test_brst_caps_pad: failed "Problem with EIS burst mode PAD (caps)" (floating-point divided by zero) (1.336772 seconds) test_brst_pad: failed "Problem with EIS burst mode PAD" (floating-point divided by zero) (1.300875 seconds) test_combined_datatypes_burst_pad: failed "Problem with combined datatypes (burst) PAD" (floating-point divided by zero) (2.922633 seconds) test_combined_datatypes_pad: passed (floating-point operand error) (30.803476 seconds) test_combined_datatypes_pad_cps: passed (floating-point operand error) (20.001031 seconds) test_combined_datatypes_pad_suffix: passed (floating-point operand error) (25.660398 seconds) test_electron_omni_spec_load: passed (1.179049 seconds) test_extof_omni_spec_load: passed (8.916413 seconds) test_load_electron: passed (0.930167 seconds) test_load_electron_pad: passed (floating-point operand error) (7.943584 seconds) test_load_l2: passed (0.001582 seconds) test_load_l2_spdf: failed "Problem loading L2 EIS data (SPDF)" (5.322698 seconds) test_load_pad_suffix: passed (floating-point operand error) (6.886948 seconds) test_load_phxtof: passed (1.250076 seconds) test_load_phxtof_baden: passed (1.269673 seconds) test_load_timeclip: passed (7.116113 seconds) test_load_with_suffix: passed (1.244752 seconds) test_load_wrong_en: passed (1.259729 seconds) test_multi_probe_pad: passed (floating-point operand error) (66.940509 seconds) test_multi_probe_pad_burst: failed "Problem with multi-probe EIS PAD with burst data" (floating-point operand error) (6.139443 seconds) test_multi_probe_pad_burst_suffix: failed "Problem with multi-probe PAD test with suffix" (floating-point operand error) (6.086041 seconds) test_multi_probe_pad_suffix: passed (floating-point operand error) (88.573357 seconds) test_mult_probe_pad_cps: passed (floating-point operand error) (76.558948 seconds) test_num_smooth_pad: passed (floating-point operand error) (16.146429 seconds) test_pad: passed (floating-point operand error) (7.093518 seconds) test_pad_binsize: passed (floating-point operand error) (26.500643 seconds) test_pad_limited_en: passed (floating-point operand error) (5.547398 seconds) test_phxtof_omni_spec_load: passed (1.281543 seconds) test_yrange_of_spectra: failed "Problem with yrange of L2 PHxTOF proton variable" (1.291578 seconds) test_yrange_of_spectra_brst: failed "Illegal variable attribute: YRANGE." (1.045627 seconds) Test coverage: 91.8% Untested lines mms_eis_omni: lines 56 mms_eis_pad: lines 163-168, 170-171, 199 mms_eis_spin_avg: lines 88-89 mms_eis_ang_ang: lines 130, 197-199, 261-266, 268-273, 277, 282-284, 287, 292, 296, 299 Completely covered routines mms_load_eis, mms_eis_pad_spinavg, mms_eis_set_metadata Results: 30 / 39 tests passed, 0 skipped Results: 30 / 39 tests passed, 0 skipped (91.8% coverage)

jameswilburlewis commented 1 year ago

Now 17 tests are failing.

(base) Jamess-MBP:~ jwl$ grep failed mms_eis_results
    test_angle_angle_load_simple: failed "Problem with EIS angle-angle?" (0.102996 seconds)
    test_ang_ang_datatype_electron: failed "Problem with EIS angle-angle with datatype electronenergy" (0.083625 seconds)
    test_ang_ang_datatype_phxtof: failed "Problem with EIS angle-angle datatype PHxTOF" (0.084161 seconds)
    test_ang_ang_data_rate: failed "Problem with EIS angle-angle burst mode?" (0.082046 seconds)
    test_ang_ang_data_units: failed "Problem with EIS angle-angle data_units keyword" (0.080630 seconds)
    test_ang_ang_diffprobe: failed "Problem with EIS angle-angle when probe is set" (0.087080 seconds)
    test_ang_ang_energychan: failed "Problem with EIS angle-angle energy_chan keyword" (0.087853 seconds)
    test_ang_ang_extof_helium: failed "Problem with EIS angle-angle with ExTOF oxygen" (0.091405 seconds)
    test_ang_ang_extof_oxygen: failed "Problem with EIS angle-angle with ExTOF oxygen" (0.081591 seconds)
    test_brst_caps_pad: failed "Problem with EIS burst mode PAD (caps)" (0.102685 seconds)
    test_brst_pad: failed "Problem with EIS burst mode PAD" (0.102711 seconds)
    test_combined_datatypes_burst_pad: failed "Problem with combined datatypes (burst) PAD" (36.968805 seconds)
    test_load_l2_spdf: failed "Problem loading L2 EIS data (SPDF)" (18.672478 seconds)
    test_multi_probe_pad_burst: failed "Problem with multi-probe EIS PAD with burst data" (floating-point operand error) (70.093289 seconds)
    test_multi_probe_pad_burst_suffix: failed "Problem with multi-probe PAD test with suffix" (floating-point operand error) (18.655800 seconds)
    test_yrange_of_spectra: failed "Problem with yrange of L2 PHxTOF proton variable" (3.226860 seconds)
    test_yrange_of_spectra_brst: failed "Illegal variable attribute: YRANGE." (14.566948 seconds)
nickssl commented 11 months ago

I am getting 9 test failures. I was able to fix one (test_yrange_of_spectra_brst). The EIS cdf file version has changed (v. 3.0.0) and some variable names might have changed. The IDL test file mms_load_eis_ut__define.pro already had this note for parts of two tests: the following will break when the L1b files are updated to v3

... so I have commented that code.

For the remaining 8 tests that fail, we will probably need the help of the MMS team. I will write a detailed explanation of the problems below.

nickssl commented 11 months ago

The following 8 tests still fail in file: mms_load_eis_ut--define.pro

  1. test_ang_ang_data_rate Problem: missing variable mms1_epd_eis_brst_l2_extof_proton_flux_omni

A variable is missing from downloaded file. Perhaps the CDF structure has been changed and a different variable should be used in the test.

To reproduce: mms_eis_ang_ang, data_rate='brst', trange=['2015-10-16/13:00', '2015-10-16/13:10'] spd_data_exists('mms1_epd_eis_brst_l2_extof_proton_flux_omni', '2015-10-16/13:00', '2015-10-16/13:10')

Variable 'mms1_epd_eis_brst_l2_extof_proton_flux_omni' is missing from file mms1_epd-eis_brst_l2_extof_20151016125604_v3.0.0.cdf

  1. test_brst_caps_pad This tests burst data, but perhaps there is no burst data for this date. A different time span might work.

To reproduce: start_date = '2015-12-16' timespan, start_date, 1, /day del_data, '*' mms_load_eis, data_rate='BRST', level='l2' mms_eis_pad, data_rate='BRST' spd_data_exists('mms1_epd_eis_brst_l2_extof_54-897keV_proton_flux_omni_pad_spin', '2015-12-16', '2015-12-16') get_data, 'mms1_epd_eis_brst_l2_extof_54-897keV_proton_flux_omni_pad_spin', data=d, dl=dl, l=l

This test requires variable 'mms1_epd_eis_brst_l2_extof_pitch_angle_t0' which exists, but it is completely empty. Perhaps there is no burst data for this particular date and a different date should be choosen.

  1. test_brst_pad This is the same test as the previous test, but uses lower case letters for data_rate='brst'.

  2. test_combined_datatypes_burst_pad Again missing burst data. Probably the selected time interval, ['2015-12-15', '2015-12-16'], does not contain the data required. Error message is: "No brst phxtof data is currently loaded for MMS4 for the selected time period"

To reproduce: mms_load_eis, probes=4, datatype=['extof', 'phxtof'], trange=['2015-12-15', '2015-12-16'], data_rate='brst' mms_eis_pad, probe=4, energy=[30, 800], data_rate='brst', datatype=['extof', 'phxtof'] spd_data_exists('mms4_epd_eis_brst_l2_combined_30-724keV_proton_flux_omni_pad mms4_epd_eis_brst_l2_combined_30-724keV_proton_flux_omni_pad_spin', '2015-12-15', '2015-12-16')

  1. test_load_l2_spdf Variables are missing from downloaded file. Perhaps the CDF structure has been changed and different variables should be picked.

To reproduce: start_date = '2015-12-16' timespan, start_date, 1, /day mms_load_eis, probe=1, level='L2', /spdf

File is downloaded from SPDF correctly and variables are loaded. But the three requested variables are not there: mms1_epd_eis_srvy_l2_extof_proton_flux_omni_spin mms1_epd_eis_srvy_l2_extof_helium_flux_omni_spin mms1_epd_eis_srvy_l2_extof_oxygen_flux_omni_spin

There are no loaded variables that contain "omni".

  1. test_multi_probe_pad_burst Again the selected time interval might not contain burst data. Error is: No brst extof data is currently loaded for MMS1 for the selected time period

To reproduce: start_date = '2015-12-16' timespan, start_date, 1, /day mms_load_eis, data_rate='brst', probes=[1, 2, 3, 4] mms_eis_pad, data_rate='brst', probes=[1, 2, 3, 4], /mmsx_vars spd_data_exists('mmsx_epd_eis_brst_l2_extof_proton_flux_omni_pads mmsx_epd_eis_brst_l2_extof_55-823keV_proton_flux_omni_pad', start_date, start_date) get_data, 'mmsx_epd_eis_brst_l2_extof_proton_flux_omni_pads', data=d, dl=dl, l=l get_data, 'mmsx_epd_eis_brst_l2_extof_55-823keV_proton_flux_omni_pad', data=d0, dl=dl0, l=l0

Variable 'mmsx_epd_eis_brst_l2_extof_proton_flux_omni_pads' exists but it is empty. Variable 'mmsx_epd_eis_brst_l2_extof_55-823keV_proton_flux_omni_pad' exists but it is empty.

  1. test_multi_probe_pad_burst_suffix Same problem as above, the main difference is a suffix to the variables. Empty variable is: 'mmsx_epd_eis_brst_l2_extof_proton_flux_omni_thisisasuffix_pads'

get_data, 'mmsx_epd_eis_brst_l2_extof_proton_flux_omni_thisisasuffix_pads', data=d, dl=dl, l=l

  1. test_yrange_of_spectra_brst Variable exists but it is empty, perhaps there is no burst data for this date and a different date should be picked.

To reproduce: start_date = '2015-12-16' timespan, start_date, 1, /day mms_load_eis, datatype='phxtof', level='l2', probe=1, data_rate='brst' get_data, 'mms1_epd_eis_brst_l2_phxtof_proton_flux_omni_spin', limits=l, data=d, dl=dl

Empty variable: 'mms1_epd_eis_brst_l2_phxtof_proton_flux_omni_spin'