-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommev.py
75 lines (60 loc) · 2.34 KB
/
commev.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import heliosat as heliosat
import logging as logging
import datetime as datetime
import numpy as np
import os as os
import pickle as pickle
import py3dcore_h4c as py3dcore_h4c
import matplotlib.pyplot as plt
import shutil as shutil
import pandas as pds
import event as evt
from heliosat.util import sanitize_dt
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
logging.getLogger("heliosat.spice").setLevel("WARNING")
logging.getLogger("heliosat.spacecraft").setLevel("WARNING")
wincat,stacat,stbcat,pspcat,solocat,bepicat,ulycat,messcat,vexcat = evt.get_cat()
i1au = wincat + stacat + stbcat
print('ICMECAT events near 1 AU',len(i1au))
slevent = evt.findevent(solocat, year=2022, month=9, day=7)
#t_launch = winevent[0].begin-datetime.timedelta(days=4)
t_launch = datetime.datetime(2022, 9, 5, 18, 45, tzinfo=datetime.timezone.utc)
t_s_psp = datetime.datetime(2022, 9, 7, 0, 30, tzinfo=datetime.timezone.utc)
t_e_psp = datetime.datetime(2022, 9, 8, 5, 0, tzinfo=datetime.timezone.utc)
t_psp = [
datetime.datetime(2022, 9, 7, 2, tzinfo=datetime.timezone.utc),
datetime.datetime(2022, 9, 7, 4, tzinfo=datetime.timezone.utc) ,
datetime.datetime(2022, 9, 7, 6, tzinfo=datetime.timezone.utc),
datetime.datetime(2022, 9, 7, 8, tzinfo=datetime.timezone.utc),
]
model_kwargs = {
"ensemble_size": int(2**17), #2**17
"iparams": {
"cme_longitude": {
"maximum": -110,
"minimum": -130
},
"cme_latitude": {
"maximum": -10,
"minimum": -50
},
"cme_inclination": {
"maximum": 10,
"minimum": 0
},
"cme_launch_velocity": {
"maximum": 750,
"minimum": 250
},
"cme_launch_radius": {
"maximum": 30,
"minimum": 5
}
}
}
output = 'solo01092022_heeq_512_4FP_ts12/'
fitter = py3dcore_h4c.ABC_SMC()
fitter.initialize(t_launch, py3dcore_h4c.ToroidalModel, model_kwargs)
fitter.add_observer("SOLO", t_psp, t_s_psp, t_e_psp)
fitter.run(ensemble_size=512, reference_frame="HEEQ", sampling_freq=3600, output=output, use_multiprocessing=True, custom_data='solo_2022sep.p')