seppy 0.1.12__py3-none-any.whl → 0.1.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of seppy might be problematic. Click here for more details.
- seppy/data/test/20230719_side0.csv +402 -0
- seppy/data/test/20230719_side1.csv +402 -0
- seppy/data/test/20230719_side2.csv +402 -0
- seppy/loader/soho.py +34 -16
- seppy/loader/stereo.py +16 -5
- seppy/loader/wind.py +6 -0
- seppy/tests/test_loader.py +15 -14
- seppy/tests/test_tools.py +204 -42
- seppy/tools/__init__.py +45 -18
- seppy/tools/widgets.py +1 -1
- seppy/util/__init__.py +52 -11
- seppy/version.py +1 -1
- {seppy-0.1.12.dist-info → seppy-0.1.14.dist-info}/METADATA +11 -12
- seppy-0.1.14.dist-info/RECORD +29 -0
- {seppy-0.1.12.dist-info → seppy-0.1.14.dist-info}/WHEEL +1 -1
- seppy/data/test/psp_isois-epihi_l2-het-rates60_20210531_v15.cdf +0 -0
- seppy-0.1.12.dist-info/RECORD +0 -27
- {seppy-0.1.12.dist-info → seppy-0.1.14.dist-info}/LICENSE.rst +0 -0
- {seppy-0.1.12.dist-info → seppy-0.1.14.dist-info}/top_level.txt +0 -0
seppy/loader/stereo.py
CHANGED
|
@@ -22,6 +22,10 @@ from seppy.util import resample_df
|
|
|
22
22
|
warnings.simplefilter(action='ignore', category=pd.errors.PerformanceWarning)
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
logger = pooch.get_logger()
|
|
26
|
+
logger.setLevel("WARNING")
|
|
27
|
+
|
|
28
|
+
|
|
25
29
|
def stereo_sept_download(date, spacecraft, species, viewing, path=None):
|
|
26
30
|
"""Download STEREO/SEPT level 2 data file from Kiel university to local path
|
|
27
31
|
|
|
@@ -70,11 +74,12 @@ def stereo_sept_download(date, spacecraft, species, viewing, path=None):
|
|
|
70
74
|
except requests.HTTPError:
|
|
71
75
|
print(f'No corresponding SEPT data found at {url}')
|
|
72
76
|
downloaded_file = []
|
|
77
|
+
print('')
|
|
73
78
|
|
|
74
79
|
return downloaded_file
|
|
75
80
|
|
|
76
81
|
|
|
77
|
-
def stereo_sept_loader(startdate, enddate, spacecraft, species, viewing, resample=None, path=None, all_columns=False, pos_timestamp=
|
|
82
|
+
def stereo_sept_loader(startdate, enddate, spacecraft, species, viewing, resample=None, path=None, all_columns=False, pos_timestamp='center'):
|
|
78
83
|
"""Loads STEREO/SEPT data and returns it as Pandas dataframe together with a dictionary providing the energy ranges per channel
|
|
79
84
|
|
|
80
85
|
Parameters
|
|
@@ -285,7 +290,7 @@ def _get_metadata(dataset, path_to_cdf):
|
|
|
285
290
|
return metadata
|
|
286
291
|
|
|
287
292
|
|
|
288
|
-
def stereo_load(instrument, startdate, enddate, spacecraft='ahead', mag_coord='RTN', sept_species='e', sept_viewing='sun', path=None, resample=None, pos_timestamp=
|
|
293
|
+
def stereo_load(instrument, startdate, enddate, spacecraft='ahead', mag_coord='RTN', sept_species='e', sept_viewing='sun', path=None, resample=None, pos_timestamp='center', max_conn=5):
|
|
289
294
|
"""
|
|
290
295
|
Downloads CDF files via SunPy/Fido from CDAWeb for HET, LET, MAG, and SEPT onboard STEREO
|
|
291
296
|
|
|
@@ -322,7 +327,8 @@ def stereo_load(instrument, startdate, enddate, spacecraft='ahead', mag_coord='R
|
|
|
322
327
|
resample : {str}, optional
|
|
323
328
|
resample frequency in format understandable by Pandas, e.g. '1min', by default None
|
|
324
329
|
pos_timestamp : {str}, optional
|
|
325
|
-
change the position of the timestamp: 'center' or 'start' of the accumulation interval,
|
|
330
|
+
change the position of the timestamp: 'center' or 'start' of the accumulation interval,
|
|
331
|
+
or 'original' to do nothing, by default 'center'.
|
|
326
332
|
max_conn : {int}, optional
|
|
327
333
|
The number of parallel download slots used by Fido.fetch, by default 5
|
|
328
334
|
|
|
@@ -337,8 +343,13 @@ def stereo_load(instrument, startdate, enddate, spacecraft='ahead', mag_coord='R
|
|
|
337
343
|
trange = a.Time(startdate, enddate)
|
|
338
344
|
if trange.min==trange.max:
|
|
339
345
|
print(f'"startdate" and "enddate" might need to be different!')
|
|
340
|
-
|
|
341
|
-
|
|
346
|
+
|
|
347
|
+
# Catch old default value for pos_timestamp
|
|
348
|
+
if pos_timestamp is None:
|
|
349
|
+
pos_timestamp = 'center'
|
|
350
|
+
|
|
351
|
+
if not (pos_timestamp=='center' or pos_timestamp=='start' or pos_timestamp=='original'):
|
|
352
|
+
raise ValueError(f'"pos_timestamp" must be either "original", "center", or "start"!')
|
|
342
353
|
|
|
343
354
|
# find name variations
|
|
344
355
|
if spacecraft.lower()=='a' or spacecraft.lower()=='sta':
|
seppy/loader/wind.py
CHANGED
|
@@ -17,6 +17,10 @@ from sunpy.net import attrs as a
|
|
|
17
17
|
from seppy.util import resample_df
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
logger = pooch.get_logger()
|
|
21
|
+
logger.setLevel("WARNING")
|
|
22
|
+
|
|
23
|
+
|
|
20
24
|
def _download_metafile(dataset, path=None):
|
|
21
25
|
"""
|
|
22
26
|
Download master cdf file from cdaweb for 'dataset'
|
|
@@ -30,6 +34,7 @@ def _download_metafile(dataset, path=None):
|
|
|
30
34
|
downloaded_file = pooch.retrieve(url=url, known_hash=None, fname=fname, path=path, progressbar=True)
|
|
31
35
|
except ModuleNotFoundError:
|
|
32
36
|
downloaded_file = pooch.retrieve(url=url, known_hash=None, fname=fname, path=path, progressbar=False)
|
|
37
|
+
print('')
|
|
33
38
|
return downloaded_file
|
|
34
39
|
|
|
35
40
|
|
|
@@ -123,6 +128,7 @@ def wind3dp_single_download(file, path=None):
|
|
|
123
128
|
except requests.HTTPError:
|
|
124
129
|
print(f'No corresponding data found at {url}')
|
|
125
130
|
downloaded_file = []
|
|
131
|
+
print('')
|
|
126
132
|
|
|
127
133
|
return downloaded_file
|
|
128
134
|
|
seppy/tests/test_loader.py
CHANGED
|
@@ -35,22 +35,23 @@ def test_psp_load_online():
|
|
|
35
35
|
assert np.sum(np.isnan(df3['H_Flux_ChanP_E46_P79'])) == 57
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
# deactivate testing of PSP offline loading bc. the version is changing so often (JG 2024/03/26)
|
|
39
|
+
# def test_psp_load_offline():
|
|
40
|
+
# # offline data files need to be replaced if data "version" is updated!
|
|
41
|
+
# fullpath = get_pkg_data_filename('data/test/psp_isois-epihi_l2-het-rates60_20210531_v19.cdf', package='seppy')
|
|
42
|
+
# path = Path(fullpath).parent.as_posix()
|
|
43
|
+
# df, meta = psp_isois_load(dataset='PSP_ISOIS-EPIHI_L2-HET-RATES60', startdate="2021/05/31",
|
|
44
|
+
# enddate="2021/06/01", path=path, resample="1min")
|
|
45
|
+
# assert isinstance(df, pd.DataFrame)
|
|
46
|
+
# assert df.shape == (48, 136)
|
|
47
|
+
# assert meta['H_ENERGY_LABL'][0][0] == ' 6.7 - 8.0 MeV'
|
|
48
|
+
# # Check that fillvals are replaced by NaN
|
|
49
|
+
# assert np.sum(np.isnan(df['B_H_Uncertainty_14'])) == 48
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
def test_soho_ephin_load_online():
|
|
52
53
|
df, meta = soho_load(dataset='SOHO_COSTEP-EPHIN_L2-1MIN', startdate="2021/04/16", enddate="2021/04/16",
|
|
53
|
-
path=None, resample="1min", pos_timestamp=
|
|
54
|
+
path=None, resample="1min", pos_timestamp='center')
|
|
54
55
|
assert isinstance(df, pd.DataFrame)
|
|
55
56
|
assert df.shape == (1145, 14)
|
|
56
57
|
assert meta['E1300'] == '0.67 - 10.4 MeV'
|
|
@@ -89,7 +90,7 @@ def test_solo_mag_load_offline():
|
|
|
89
90
|
|
|
90
91
|
def test_stereo_het_load_online():
|
|
91
92
|
df, meta = stereo_load(instrument="HET", startdate="2021/10/28", enddate="2021/10/29",
|
|
92
|
-
path=None, resample="1min", pos_timestamp=
|
|
93
|
+
path=None, resample="1min", pos_timestamp='center')
|
|
93
94
|
assert isinstance(df, pd.DataFrame)
|
|
94
95
|
assert df.shape == (1440, 28)
|
|
95
96
|
assert meta['Proton_Bins_Text'][0][0] == '13.6 - 15.1 MeV '
|
|
@@ -110,7 +111,7 @@ def test_stereo_het_load_offline():
|
|
|
110
111
|
|
|
111
112
|
def test_stereo_sept_load_online():
|
|
112
113
|
df, meta = stereo_load(instrument="SEPT", startdate="2006/11/14", enddate="2006/11/14",
|
|
113
|
-
path=None, resample="1min", pos_timestamp=
|
|
114
|
+
path=None, resample="1min", pos_timestamp='center')
|
|
114
115
|
assert isinstance(df, pd.DataFrame)
|
|
115
116
|
assert df.shape == (371, 30)
|
|
116
117
|
assert meta.ch_strings[meta.index==2].values[0] == '45.0-55.0 keV'
|
seppy/tests/test_tools.py
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
2
1
|
from astropy.utils.data import get_pkg_data_filename
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
from seppy.tools import Event
|
|
5
4
|
import datetime
|
|
6
5
|
import os
|
|
6
|
+
import matplotlib.pyplot as plt
|
|
7
7
|
import pandas as pd
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
#
|
|
11
|
-
|
|
10
|
+
# switch to non-plotting matplotlib backend to avoid showing all the figures:
|
|
11
|
+
plt.switch_backend("Agg")
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
def
|
|
14
|
+
def test_onset_spectrum_tsa_SOLO_STEP_ions_old_data_online():
|
|
15
15
|
startdate = datetime.date(2020, 9, 21)
|
|
16
16
|
enddate = datetime.date(2020, 9, 21)
|
|
17
17
|
lpath = f"{os.getcwd()}/data/"
|
|
18
18
|
background_range = (datetime.datetime(2020, 9, 21, 0, 0, 0), datetime.datetime(2020, 9, 21, 2, 0, 0))
|
|
19
19
|
#
|
|
20
20
|
# ions
|
|
21
|
-
Event1 = Event(spacecraft='Solar Orbiter', sensor='STEP', data_level='l2', species='ions', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
22
|
-
|
|
21
|
+
Event1 = Event(spacecraft='Solar Orbiter', sensor='STEP', viewing='Pixel averaged', data_level='l2', species='ions', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
22
|
+
print(Event1.print_energies())
|
|
23
23
|
# Pixel averaged
|
|
24
24
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='Pixel averaged', background_range=background_range, channels=1, resample_period="5min", yscale='log', cusum_window=30)
|
|
25
25
|
assert isinstance(flux, pd.Series)
|
|
26
26
|
assert flux.shape == (288,)
|
|
27
27
|
assert len(onset_stats) == 6
|
|
28
|
-
assert onset_stats[5].isoformat().split('.')[0] == '2020-09-21T17:27:
|
|
28
|
+
assert onset_stats[5].isoformat().split('.')[0] == '2020-09-21T17:27:37'
|
|
29
29
|
assert onset_found
|
|
30
|
-
assert peak_time.isoformat().split('.')[0] == '2020-09-21T17:57:
|
|
30
|
+
assert peak_time.isoformat().split('.')[0] == '2020-09-21T17:57:37'
|
|
31
31
|
assert fig.get_axes()[0].get_title() == 'SOLO/STEP 0.0060 - 0.0091 MeV/n protons\n5min averaging, viewing: PIXEL AVERAGED'
|
|
32
32
|
# Pixel 8 - check that calculation is stopped bc. this data is not implemented correctly!
|
|
33
33
|
check = False
|
|
@@ -37,15 +37,25 @@ def test_onset_SOLO_STEP_ions_old_data_online():
|
|
|
37
37
|
check = True
|
|
38
38
|
assert check
|
|
39
39
|
|
|
40
|
+
# TODO: deactivated, as this function is deactivated atm:
|
|
41
|
+
# test dynamic spectrum:
|
|
42
|
+
# Event1.dynamic_spectrum(view='Pixel averaged')
|
|
43
|
+
# assert Event1.fig.get_axes()[0].get_title() == 'SOLO/STEP (Pixel averaged) ions, 2020-09-21'
|
|
44
|
+
|
|
45
|
+
# test tsa plot:
|
|
46
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
47
|
+
Event1.tsa_plot('Pixel averaged', selection=(0, 4, 1), resample='1min')
|
|
48
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Solar Orbiter STEP, ions'
|
|
49
|
+
|
|
40
50
|
|
|
41
|
-
def
|
|
51
|
+
def test_onset_spectrum_tsa_SOLO_STEP_ions_new_data_online():
|
|
42
52
|
startdate = datetime.date(2022, 1, 9)
|
|
43
53
|
enddate = datetime.date(2022, 1, 9)
|
|
44
54
|
lpath = f"{os.getcwd()}/data/"
|
|
45
55
|
background_range = (datetime.datetime(2022, 1, 9, 10, 0, 0), datetime.datetime(2022, 1, 9, 12, 0, 0))
|
|
46
56
|
# ions
|
|
47
|
-
Event1 = Event(spacecraft='Solar Orbiter', sensor='STEP', data_level='l2', species='ions', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
48
|
-
|
|
57
|
+
Event1 = Event(spacecraft='Solar Orbiter', sensor='STEP', viewing='Pixel averaged', data_level='l2', species='ions', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
58
|
+
print(Event1.print_energies())
|
|
49
59
|
# Pixel averaged
|
|
50
60
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='Pixel averaged', background_range=background_range, channels=1, resample_period="5min", yscale='log', cusum_window=30)
|
|
51
61
|
assert isinstance(flux, pd.Series)
|
|
@@ -53,7 +63,7 @@ def test_onset_SOLO_STEP_ions_new_data_online():
|
|
|
53
63
|
assert len(onset_stats) == 6
|
|
54
64
|
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType) # onset_stats[5].isoformat().split('.')[0] == '2021-10-28T16:07:30'
|
|
55
65
|
assert ~onset_found
|
|
56
|
-
assert peak_time.isoformat().split('.')[0] == '2022-01-09T01:32:
|
|
66
|
+
assert peak_time.isoformat().split('.')[0] == '2022-01-09T01:32:31'
|
|
57
67
|
assert fig.get_axes()[0].get_title() == 'SOLO/STEP 0.0061 - 0.0091 MeV protons\n5min averaging, viewing: PIXEL AVERAGED'
|
|
58
68
|
# Pixel 8
|
|
59
69
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='Pixel 8', background_range=background_range, channels=1, resample_period="5min", yscale='log', cusum_window=30)
|
|
@@ -62,69 +72,99 @@ def test_onset_SOLO_STEP_ions_new_data_online():
|
|
|
62
72
|
assert len(onset_stats) == 6
|
|
63
73
|
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType) # onset_stats[5].isoformat().split('.')[0] == '2021-10-28T16:12:30'
|
|
64
74
|
assert ~onset_found
|
|
65
|
-
assert peak_time.isoformat().split('.')[0] == '2022-01-09T00:02:
|
|
75
|
+
assert peak_time.isoformat().split('.')[0] == '2022-01-09T00:02:31'
|
|
66
76
|
assert fig.get_axes()[0].get_title() == 'SOLO/STEP 0.0061 - 0.0091 MeV protons\n5min averaging, viewing: PIXEL 8'
|
|
67
77
|
|
|
78
|
+
# TODO: deactivated, as this function is deactivated atm:
|
|
79
|
+
# test dynamic spectrum:
|
|
80
|
+
# Event1.dynamic_spectrum(view='Pixel averaged')
|
|
81
|
+
# assert Event1.fig.get_axes()[0].get_title() == 'SOLO/STEP (Pixel averaged) ions, 2022-01-09'
|
|
82
|
+
# Event1.dynamic_spectrum(view='Pixel 8')
|
|
83
|
+
# assert Event1.fig.get_axes()[0].get_title() == 'SOLO/STEP (Pixel 8) ions, 2022-01-09'
|
|
84
|
+
|
|
85
|
+
# test tsa plot:
|
|
86
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
87
|
+
Event1.tsa_plot('Pixel 8', selection=(0, 4, 1), resample='1min')
|
|
88
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Solar Orbiter STEP, ions'
|
|
89
|
+
|
|
68
90
|
|
|
69
|
-
def
|
|
91
|
+
def test_onset_spectrum_tsa_SOLO_HET_online():
|
|
70
92
|
startdate = datetime.date(2022, 11, 8)
|
|
71
93
|
enddate = datetime.date(2022, 11, 8)
|
|
72
94
|
lpath = f"{os.getcwd()}/data/"
|
|
73
95
|
background_range = (datetime.datetime(2022, 11, 8, 0, 0, 0), datetime.datetime(2022, 11, 8, 1, 0, 0))
|
|
74
96
|
# viewing "sun", single channel, protons
|
|
75
|
-
Event1 = Event(spacecraft='Solar Orbiter', sensor='HET', data_level='l2', species='protons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
76
|
-
|
|
97
|
+
Event1 = Event(spacecraft='Solar Orbiter', sensor='HET', viewing='sun', data_level='l2', species='protons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
98
|
+
print(Event1.print_energies())
|
|
77
99
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='sun', background_range=background_range, channels=1, resample_period="5min", yscale='log', cusum_window=30)
|
|
78
100
|
assert isinstance(flux, pd.Series)
|
|
79
101
|
assert flux.shape == (73,)
|
|
80
102
|
assert len(onset_stats) == 6
|
|
81
103
|
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType) # onset_stats[5] == pd.Timestamp('2021-10-28 15:31:59.492059')
|
|
82
104
|
assert ~onset_found
|
|
83
|
-
assert peak_time.isoformat().split('.')[0] == '2022-11-08T17:
|
|
105
|
+
assert peak_time.isoformat().split('.')[0] == '2022-11-08T17:58:09'
|
|
84
106
|
assert fig.get_axes()[0].get_title() == 'SOLO/HET 7.3540 - 7.8900 MeV protons\n5min averaging, viewing: SUN'
|
|
85
107
|
# viewing "north", combined channel, electrons
|
|
86
|
-
Event1 = Event(spacecraft='Solar Orbiter', sensor='HET', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
87
|
-
|
|
108
|
+
Event1 = Event(spacecraft='Solar Orbiter', sensor='HET', viewing='sun', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
109
|
+
print(Event1.print_energies())
|
|
88
110
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='north', background_range=background_range, channels=[0, 3], resample_period="5min", yscale='log', cusum_window=30)
|
|
89
111
|
assert isinstance(flux, pd.Series)
|
|
90
112
|
assert flux.shape == (73,)
|
|
91
113
|
assert len(onset_stats) == 6
|
|
92
114
|
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType) # onset_stats[5] == pd.Timestamp('2021-10-28 15:31:59.492059')
|
|
93
115
|
assert ~onset_found
|
|
94
|
-
assert peak_time.isoformat().split('.')[0] == '2022-11-08T22:27:
|
|
116
|
+
assert peak_time.isoformat().split('.')[0] == '2022-11-08T22:27:56'
|
|
95
117
|
assert fig.get_axes()[0].get_title() == 'SOLO/HET 0.4533 - 18.8300 MeV electrons\n5min averaging, viewing: NORTH'
|
|
96
118
|
|
|
119
|
+
# test dynamic spectrum:
|
|
120
|
+
Event1.dynamic_spectrum(view='sun')
|
|
121
|
+
assert Event1.fig.get_axes()[0].get_title() == 'SOLO/HET (sun) electrons, 2022-11-08'
|
|
122
|
+
|
|
123
|
+
# test tsa plot:
|
|
124
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
125
|
+
Event1.tsa_plot('north', selection=None, resample='1min')
|
|
126
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Solar Orbiter HET, electrons'
|
|
97
127
|
|
|
98
|
-
|
|
128
|
+
|
|
129
|
+
def test_onset_spectrum_tsa_SOLO_EPT_online():
|
|
99
130
|
startdate = datetime.date(2022, 6, 6)
|
|
100
131
|
enddate = datetime.date(2022, 6, 6)
|
|
101
132
|
lpath = f"{os.getcwd()}/data/"
|
|
102
133
|
background_range = (datetime.datetime(2022, 6, 6, 0, 0, 0), datetime.datetime(2022, 6, 6, 1, 0, 0))
|
|
103
134
|
# viewing "sun", single channel, ions
|
|
104
|
-
Event1 = Event(spacecraft='Solar Orbiter', sensor='EPT', data_level='l2', species='ions', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
105
|
-
|
|
135
|
+
Event1 = Event(spacecraft='Solar Orbiter', sensor='EPT', viewing='sun', data_level='l2', species='ions', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
136
|
+
print(Event1.print_energies())
|
|
106
137
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='sun', background_range=background_range, channels=4, resample_period="5min", yscale='log', cusum_window=30)
|
|
107
138
|
assert isinstance(flux, pd.Series)
|
|
108
139
|
assert flux.shape == (288,)
|
|
109
140
|
assert len(onset_stats) == 6
|
|
110
141
|
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType) # onset_stats[5] == pd.Timestamp('2021-10-28 15:31:59.492059')
|
|
111
142
|
assert ~onset_found
|
|
112
|
-
assert peak_time.isoformat().split('.')[0] == '2022-06-06T01:02:
|
|
143
|
+
assert peak_time.isoformat().split('.')[0] == '2022-06-06T01:02:31'
|
|
113
144
|
assert fig.get_axes()[0].get_title() == 'SOLO/EPT 0.0608 - 0.0678 MeV protons\n5min averaging, viewing: SUN'
|
|
114
145
|
# viewing "north", combined channel, electrons
|
|
115
|
-
Event1 = Event(spacecraft='Solar Orbiter', sensor='EPT', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
116
|
-
|
|
146
|
+
Event1 = Event(spacecraft='Solar Orbiter', sensor='EPT', viewing='sun', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
147
|
+
print(Event1.print_energies())
|
|
117
148
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='north', background_range=background_range, channels=[1, 4], resample_period="5min", yscale='log', cusum_window=30)
|
|
118
149
|
assert isinstance(flux, pd.Series)
|
|
119
150
|
assert flux.shape == (288,)
|
|
120
151
|
assert len(onset_stats) == 6
|
|
121
152
|
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType) # onset_stats[5] == pd.Timestamp('2021-10-28 15:31:59.492059')
|
|
122
153
|
assert ~onset_found
|
|
123
|
-
assert peak_time.isoformat().split('.')[0] == '2022-06-06T23:02:
|
|
154
|
+
assert peak_time.isoformat().split('.')[0] == '2022-06-06T23:02:31'
|
|
124
155
|
assert fig.get_axes()[0].get_title() == 'SOLO/EPT 0.0334 - 0.0439 MeV electrons\n5min averaging, viewing: NORTH'
|
|
125
156
|
|
|
157
|
+
# test dynamic spectrum:
|
|
158
|
+
Event1.dynamic_spectrum(view='sun')
|
|
159
|
+
assert Event1.fig.get_axes()[0].get_title() == 'SOLO/EPT (sun) electrons, 2022-06-06'
|
|
126
160
|
|
|
127
|
-
|
|
161
|
+
# test tsa plot:
|
|
162
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
163
|
+
Event1.tsa_plot('sun', selection=(0, 4, 1), resample='1min')
|
|
164
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Solar Orbiter EPT, electrons'
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def test_onset_spectrum_tsa_PSP_ISOIS_EPIHI_online():
|
|
128
168
|
startdate = datetime.date(2021, 10, 28)
|
|
129
169
|
enddate = datetime.date(2021, 10, 29)
|
|
130
170
|
lpath = f"{os.getcwd()}/data/"
|
|
@@ -152,8 +192,17 @@ def test_onset_PSP_ISOIS_EPIHI_online():
|
|
|
152
192
|
assert peak_time.isoformat().split('.')[0] == '2021-10-28T19:56:59'
|
|
153
193
|
assert fig.get_axes()[0].get_title() == 'PSP/ISOIS-EPIHI 8.0 - 19.0 MeV protons\n5min averaging, viewing: B'
|
|
154
194
|
|
|
195
|
+
# test dynamic spectrum:
|
|
196
|
+
Event1.dynamic_spectrum(view='A')
|
|
197
|
+
assert Event1.fig.get_axes()[0].get_title() == 'PSP/ISOIS-EPIHI (A) protons, 2021-10-28'
|
|
198
|
+
|
|
199
|
+
# test tsa plot:
|
|
200
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
201
|
+
Event1.tsa_plot('A', selection=(0, 4, 1), resample='1min')
|
|
202
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Parker Solar Probe ISOIS-EPIHI, protons'
|
|
203
|
+
|
|
155
204
|
|
|
156
|
-
def
|
|
205
|
+
def test_onset_spectrum_tsa_PSP_ISOIS_EPILO_e_online():
|
|
157
206
|
startdate = datetime.date(2021, 10, 28)
|
|
158
207
|
enddate = datetime.date(2021, 10, 29)
|
|
159
208
|
lpath = f"{os.getcwd()}/data/"
|
|
@@ -179,8 +228,17 @@ def test_onset_PSP_ISOIS_EPILO_e_online():
|
|
|
179
228
|
assert peak_time.isoformat().split('.')[0] == '2021-10-28T17:48:14'
|
|
180
229
|
assert fig.get_axes()[0].get_title() == 'PSP/ISOIS-EPILO 10.0 - 100.5 keV electrons\n5min averaging, viewing: 3'
|
|
181
230
|
|
|
231
|
+
# test dynamic spectrum:
|
|
232
|
+
Event1.dynamic_spectrum(view='7')
|
|
233
|
+
assert Event1.fig.get_axes()[0].get_title() == 'PSP/ISOIS-EPILO (7) electrons, 2021-10-28'
|
|
182
234
|
|
|
183
|
-
|
|
235
|
+
# test tsa plot:
|
|
236
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
237
|
+
Event1.tsa_plot('3', selection=(0, 4, 1), resample='1min')
|
|
238
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Parker Solar Probe ISOIS-EPILO, electrons'
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def test_onset_spectrum_tsa_Wind_3DP_p_online():
|
|
184
242
|
startdate = datetime.date(2021, 10, 28)
|
|
185
243
|
enddate = datetime.date(2021, 10, 29)
|
|
186
244
|
lpath = f"{os.getcwd()}/data/"
|
|
@@ -207,12 +265,21 @@ def test_onset_Wind_3DP_p_online():
|
|
|
207
265
|
assert fig.get_axes()[0].get_title() == 'WIND/3DP 385.96 - 716.78 keV protons\n5min averaging, viewing: OMNIDIRECTIONAL'
|
|
208
266
|
# no channel combination inlcuded for Wind/3DP, yet
|
|
209
267
|
|
|
268
|
+
# test dynamic spectrum:
|
|
269
|
+
Event1.dynamic_spectrum(view='sector 3')
|
|
270
|
+
assert Event1.fig.get_axes()[0].get_title() == 'WIND/3DP (sector 3) protons, 2021-10-28'
|
|
271
|
+
|
|
272
|
+
# test tsa plot:
|
|
273
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
274
|
+
Event1.tsa_plot('omnidirectional', selection=(0, 4, 1), resample=None)
|
|
275
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Wind 3DP, protons'
|
|
210
276
|
|
|
211
|
-
|
|
277
|
+
|
|
278
|
+
def test_onset_spectrum_tsa_Wind_3DP_e_online():
|
|
212
279
|
startdate = datetime.date(2021, 10, 28)
|
|
213
280
|
enddate = datetime.date(2021, 10, 29)
|
|
214
281
|
lpath = f"{os.getcwd()}/data/"
|
|
215
|
-
Event1 = Event(spacecraft='Wind', sensor='3DP', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
282
|
+
Event1 = Event(spacecraft='Wind', sensor='3DP', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath) # TODO: radio_spacecraft=('wind', 'WIND')
|
|
216
283
|
print(Event1.print_energies())
|
|
217
284
|
background_range = (datetime.datetime(2021, 10, 28, 10, 0, 0), datetime.datetime(2021, 10, 28, 12, 0, 0))
|
|
218
285
|
#
|
|
@@ -235,8 +302,17 @@ def test_onset_Wind_3DP_e_online():
|
|
|
235
302
|
assert fig.get_axes()[0].get_title() == 'WIND/3DP 127.06 - 235.96 keV electrons\n5min averaging, viewing: OMNIDIRECTIONAL'
|
|
236
303
|
# no channel combination inlcuded for Wind/3DP, yet
|
|
237
304
|
|
|
305
|
+
# test dynamic spectrum:
|
|
306
|
+
Event1.dynamic_spectrum(view='omnidirectional')
|
|
307
|
+
assert Event1.fig.get_axes()[0].get_title() == 'WIND/3DP (omnidirectional) electrons, 2021-10-28'
|
|
308
|
+
|
|
309
|
+
# test tsa plot:
|
|
310
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
311
|
+
Event1.tsa_plot('sector 3', selection=(0, 4, 1), resample=None)
|
|
312
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'Wind 3DP, electrons'
|
|
313
|
+
|
|
238
314
|
|
|
239
|
-
def
|
|
315
|
+
def test_onset_spectrum_tsa_STEREOB_HET_p_online():
|
|
240
316
|
startdate = datetime.date(2006, 12, 13)
|
|
241
317
|
enddate = datetime.date(2006, 12, 14)
|
|
242
318
|
lpath = f"{os.getcwd()}/data/"
|
|
@@ -253,12 +329,21 @@ def test_onset_STEREOB_HET_p_online():
|
|
|
253
329
|
assert peak_time.isoformat().split('.')[0] == '2006-12-13T09:53:04'
|
|
254
330
|
assert fig.get_axes()[0].get_title() == 'STB/HET 26.3 - 40.5 MeV protons\n5min averaging'
|
|
255
331
|
|
|
332
|
+
# test dynamic spectrum:
|
|
333
|
+
Event1.dynamic_spectrum(view=None)
|
|
334
|
+
assert Event1.fig.get_axes()[0].get_title() == 'STB/HET protons, 2006-12-13'
|
|
335
|
+
|
|
336
|
+
# test tsa plot:
|
|
337
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
338
|
+
Event1.tsa_plot(None, selection=None, resample=None)
|
|
339
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'STEREO-B HET, protons'
|
|
340
|
+
|
|
256
341
|
|
|
257
|
-
def
|
|
342
|
+
def test_onset_spectrum_tsa_STEREOB_HET_e_online():
|
|
258
343
|
startdate = datetime.date(2006, 12, 13)
|
|
259
344
|
enddate = datetime.date(2006, 12, 14)
|
|
260
345
|
lpath = f"{os.getcwd()}/data/"
|
|
261
|
-
Event1 = Event(spacecraft='STEREO-B', sensor='HET', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
346
|
+
Event1 = Event(spacecraft='STEREO-B', sensor='HET', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath, radio_spacecraft=('behind', 'STEREO-B'))
|
|
262
347
|
print(Event1.print_energies())
|
|
263
348
|
background_range = (datetime.datetime(2006, 12, 13, 0, 0, 0), datetime.datetime(2006, 12, 13, 2, 0, 0))
|
|
264
349
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing=None, background_range=background_range, channels=[1], resample_period="5min", yscale='log', cusum_window=30)
|
|
@@ -271,8 +356,17 @@ def test_onset_STEREOB_HET_e_online():
|
|
|
271
356
|
assert peak_time.isoformat().split('.')[0] == '2006-12-13T04:53:04'
|
|
272
357
|
assert fig.get_axes()[0].get_title() == 'STB/HET 1.4 - 2.8 MeV electrons\n5min averaging'
|
|
273
358
|
|
|
359
|
+
# test dynamic spectrum:
|
|
360
|
+
Event1.dynamic_spectrum(view=None)
|
|
361
|
+
assert Event1.fig.get_axes()[0].get_title() == 'Radio & Dynamic Spectrum, STB/HET electrons, 2006-12-13'
|
|
362
|
+
|
|
363
|
+
# test tsa plot:
|
|
364
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
365
|
+
Event1.tsa_plot(None, selection=None, resample=None)
|
|
366
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'STEREO-B HET, electrons'
|
|
274
367
|
|
|
275
|
-
|
|
368
|
+
|
|
369
|
+
def test_onset_spectrum_tsa_STEREOA_SEPT_p_online():
|
|
276
370
|
startdate = datetime.date(2021, 10, 28)
|
|
277
371
|
enddate = datetime.date(2021, 10, 28)
|
|
278
372
|
lpath = f"{os.getcwd()}/data/"
|
|
@@ -289,12 +383,21 @@ def test_onset_STEREOA_SEPT_p_online():
|
|
|
289
383
|
assert peak_time.isoformat().split('.')[0] == '2021-10-28T17:18:27'
|
|
290
384
|
assert fig.get_axes()[0].get_title() == 'STA/SEPT 110-174.6 keV protons\n5min averaging, viewing: NORTH'
|
|
291
385
|
|
|
386
|
+
# test dynamic spectrum:
|
|
387
|
+
Event1.dynamic_spectrum(view=None)
|
|
388
|
+
assert Event1.fig.get_axes()[0].get_title() == 'STA/SEPT protons, 2021-10-28'
|
|
292
389
|
|
|
293
|
-
|
|
390
|
+
# test tsa plot:
|
|
391
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
392
|
+
Event1.tsa_plot(None, selection=None, resample=None)
|
|
393
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'STEREO-A SEPT, protons'
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
def test_onset_spectrum_tsa_STEREOA_SEPT_e_online():
|
|
294
397
|
startdate = datetime.date(2021, 10, 28)
|
|
295
398
|
enddate = datetime.date(2021, 10, 28)
|
|
296
399
|
lpath = f"{os.getcwd()}/data/"
|
|
297
|
-
Event1 = Event(spacecraft='STEREO-A', sensor='SEPT', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
400
|
+
Event1 = Event(spacecraft='STEREO-A', sensor='SEPT', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath, radio_spacecraft=('ahead', 'STEREO-A'))
|
|
298
401
|
print(Event1.print_energies())
|
|
299
402
|
background_range = (datetime.datetime(2021, 10, 28, 10, 0, 0), datetime.datetime(2021, 10, 28, 12, 0, 0))
|
|
300
403
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='asun', background_range=background_range, channels=[8], resample_period="5min", yscale='log', cusum_window=30)
|
|
@@ -307,8 +410,17 @@ def test_onset_STEREOA_SEPT_e_online():
|
|
|
307
410
|
assert peak_time.isoformat().split('.')[0] == '2021-10-28T18:58:27'
|
|
308
411
|
assert fig.get_axes()[0].get_title() == 'STA/SEPT 125-145 keV electrons\n5min averaging, viewing: ASUN'
|
|
309
412
|
|
|
413
|
+
# test dynamic spectrum:
|
|
414
|
+
Event1.dynamic_spectrum(view=None)
|
|
415
|
+
assert Event1.fig.get_axes()[0].get_title() == 'Radio & Dynamic Spectrum, STA/SEPT electrons, 2021-10-28'
|
|
310
416
|
|
|
311
|
-
|
|
417
|
+
# test tsa plot:
|
|
418
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
419
|
+
Event1.tsa_plot(None, selection=None, resample=None)
|
|
420
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'STEREO-A SEPT, electrons'
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
def test_onset_spectrum_tsa_SOHO_EPHIN_online():
|
|
312
424
|
startdate = datetime.date(2021, 10, 28)
|
|
313
425
|
enddate = datetime.date(2021, 10, 28)
|
|
314
426
|
lpath = f"{os.getcwd()}/data/"
|
|
@@ -326,12 +438,28 @@ def test_onset_SOHO_EPHIN_online():
|
|
|
326
438
|
assert fig.get_axes()[0].get_title() == 'SOHO/EPHIN 0.25 - 0.7 MeV electrons\n5min averaging'
|
|
327
439
|
# no channel combination inlcuded for SOHO/EPHIN electrons, yet
|
|
328
440
|
|
|
441
|
+
# test dynamic spectrum:
|
|
442
|
+
# check = False
|
|
443
|
+
# try:
|
|
444
|
+
# Event1.dynamic_spectrum(view=None)
|
|
445
|
+
# except Warning:
|
|
446
|
+
# check = True
|
|
447
|
+
# assert check
|
|
448
|
+
Event1.dynamic_spectrum(view=None)
|
|
449
|
+
assert Event1.fig.get_axes()[0].get_title() == 'SOHO/EPHIN electrons, 2021-10-28'
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
# test tsa plot:
|
|
453
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
454
|
+
Event1.tsa_plot(None, selection=(0, 4, 1), resample='5min')
|
|
455
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'SOHO EPHIN, electrons'
|
|
456
|
+
|
|
329
457
|
|
|
330
|
-
def
|
|
458
|
+
def test_onset_spectrum_tsa_SOHO_ERNE_online():
|
|
331
459
|
startdate = datetime.date(2021, 10, 28)
|
|
332
460
|
enddate = datetime.date(2021, 10, 29)
|
|
333
461
|
lpath = f"{os.getcwd()}/data/"
|
|
334
|
-
Event1 = Event(spacecraft='SOHO', sensor='ERNE-HED', data_level='l2', species='protons', start_date=startdate, end_date=enddate, data_path=lpath)
|
|
462
|
+
Event1 = Event(spacecraft='SOHO', sensor='ERNE-HED', data_level='l2', species='protons', start_date=startdate, end_date=enddate, data_path=lpath, radio_spacecraft=('ahead', 'STEREO-A'))
|
|
335
463
|
print(Event1.print_energies())
|
|
336
464
|
background_range = (datetime.datetime(2021, 10, 28, 10, 0, 0), datetime.datetime(2021, 10, 28, 12, 0, 0))
|
|
337
465
|
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing=None, background_range=background_range, channels=3, resample_period="5min", yscale='log', cusum_window=30)
|
|
@@ -344,8 +472,18 @@ def test_onset_SOHO_ERNE_online():
|
|
|
344
472
|
assert peak_time.isoformat().split('.')[0] == '2021-10-28T22:53:05'
|
|
345
473
|
assert fig.get_axes()[0].get_title() == 'SOHO/ERNE 25.0 - 32.0 MeV protons\n5min averaging'
|
|
346
474
|
|
|
475
|
+
# test dynamic spectrum:
|
|
476
|
+
Event1.dynamic_spectrum(view=None)
|
|
477
|
+
|
|
478
|
+
assert Event1.fig.get_axes()[0].get_title() == 'Radio & Dynamic Spectrum, SOHO/ERNE protons, 2021-10-28'
|
|
479
|
+
|
|
480
|
+
# test tsa plot:
|
|
481
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
482
|
+
Event1.tsa_plot(None, selection=(0, 4, 1), resample='5min')
|
|
483
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'SOHO ERNE, protons'
|
|
347
484
|
|
|
348
|
-
|
|
485
|
+
|
|
486
|
+
def test_onset_tsa_SOHO_ERNE_offline():
|
|
349
487
|
startdate = datetime.date(2021, 10, 28)
|
|
350
488
|
enddate = datetime.date(2021, 10, 29)
|
|
351
489
|
fullpath = get_pkg_data_filename('data/test/soho_erne-hed_l2-1min_20211028_v01.cdf', package='seppy')
|
|
@@ -363,6 +501,11 @@ def test_onset_SOHO_ERNE_offline():
|
|
|
363
501
|
assert peak_time.isoformat().split('.')[0] == '2021-10-28T22:53:05'
|
|
364
502
|
assert fig.get_axes()[0].get_title() == 'SOHO/ERNE 16.0 - 32.0 MeV protons\n5min averaging'
|
|
365
503
|
|
|
504
|
+
# test tsa plot:
|
|
505
|
+
plt.close('all') # in order to pick the right figure, make sure all previous are closed
|
|
506
|
+
Event1.tsa_plot(None, selection=(0, 4, 1), resample='5min')
|
|
507
|
+
assert plt.figure(1).get_axes()[0].get_title() == 'SOHO ERNE, protons'
|
|
508
|
+
|
|
366
509
|
|
|
367
510
|
def test_dynamic_spectrum_SOHO_ERNE_offline():
|
|
368
511
|
startdate = datetime.date(2021, 10, 28)
|
|
@@ -374,3 +517,22 @@ def test_dynamic_spectrum_SOHO_ERNE_offline():
|
|
|
374
517
|
Event1.dynamic_spectrum(view=None)
|
|
375
518
|
|
|
376
519
|
assert Event1.fig.get_axes()[0].get_title() == 'SOHO/ERNE protons, 2021-10-28'
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def test_onset_Bepi_SIXS_offline():
|
|
523
|
+
startdate = datetime.date(2023, 7, 19)
|
|
524
|
+
enddate = datetime.date(2023, 7, 19)
|
|
525
|
+
fullpath = get_pkg_data_filename('data/test/20230719_side1.csv', package='seppy')
|
|
526
|
+
lpath = Path(fullpath).parent.as_posix()
|
|
527
|
+
# lpath = '/home/jagies/data/bepi/bc_mpo_sixs/data_csv/cruise/sixs-p/raw'
|
|
528
|
+
Event1 = Event(spacecraft='Bepi', sensor='SIXS', data_level='l2', species='electrons', start_date=startdate, end_date=enddate, data_path=lpath, viewing='1')
|
|
529
|
+
background_range = (datetime.datetime(2023, 7, 19, 0, 30, 0), datetime.datetime(2023, 7, 19, 1, 30, 0))
|
|
530
|
+
flux, onset_stats, onset_found, peak_flux, peak_time, fig, bg_mean = Event1.find_onset(viewing='1', background_range=background_range, channels=2, resample_period="1min", yscale='log', cusum_window=30)
|
|
531
|
+
|
|
532
|
+
assert isinstance(flux, pd.Series)
|
|
533
|
+
assert flux.shape == (161,)
|
|
534
|
+
assert len(onset_stats) == 6
|
|
535
|
+
assert isinstance(onset_stats[5], pd._libs.tslibs.nattype.NaTType)
|
|
536
|
+
assert ~onset_found
|
|
537
|
+
assert peak_time.isoformat().split('.')[0] == '2023-07-19T02:25:42'
|
|
538
|
+
assert fig.get_axes()[0].get_title() == 'BEPI/SIXS 106 keV electrons\n1min averaging, viewing: 1'
|