-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparam.py
77 lines (56 loc) · 2.88 KB
/
param.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
#-------- options for plotting ----------------------------
plot_path = "./Plot/" # plots are saved in a directory here
result_path = "./Results/" # results are saved in a directory here
name = "all_boxes_sim_nth_sim_b_gaussian_dir0"
save_pdfs = True # If pdfs and bins of the matplotlib.hist command shall be saved to disk, for further comparisons
do_pi = True # If the polarized intensity shall be plotted instead of U
# -------- what to calculate ------------
do_rm = True # if the rotation measure should be calculated
do_i = True # if Stokes I should be calculated
do_qu = True # if Stokes Q and U should be calculated
faraday_rotate = False # if Qs and Us should be Faraday rotated along the way, computationally expensive compared to simple integration!
direction = 0 # direction the cubes are integrated and stacked along (possible are None, 0, 1, 2). If None, the cubes are also stacked over all directions
rotate_cubes = False
shape = (512, 512) # shape parameter, unused if any simulated data is used
#--------- some physics -----------------
spectral_index = 3. # spectral index of synchrotron radioation, used for the relative normalization of Q and U and the magnetic field dependence of synchtrotron radiation
lambda_square = 1./512 # squared observing frequency, necessary for faraday rotation of Qs and Us (if B=1, nth=1 over the full loS, 1/len(LoS) equals 1 rad)
#--------- options for the simulation files -------------------
data_path = "./Data/" # path where the magnetic field and thermal electron simulation boxes are stored, the fields are automatically loaded
single_file = None # "sm10_1210.h5" # None # name of the file that should be used, if None all files will be used, depending on choices below
low_mach = False # if the low or high mach cubes should be loaded
#--------- options for the magnetic fields -------------------
mag_type = "simulation" #possible are "simulation" or "constant"
# simulated params
gaussian = True # if the gaussian or non gaussian fields are used
# constant params
bx = 1.
by = 1.
bz = 1.
b_0 = 1.e-3 # normalization
#--------- options for the thermal electrons ---------------------
th_type = "simulation" #possible are "random", "simulation" or "constant"
# constant params, also used for normalization
th_n0 = 1.
# random params
th_random_params = {
"offset_mean": 3,
"offset_std": (1.e-16, 1.e-16),
"fluctuations": (4., 1.e-16),
"loglogavgslope": (3, 1.e-16),
"asperity": None,
"flexibility": None
}
#--------- options for the comsic ray electrons ---------------------
cr_type = "constant" #possible are "random" or "constant"
# constant params, also used for normalization
cr_n0 = 10.
# random params
cr_random_params = {
"offset_mean": 0,
"offset_std": (1.e-16, 1.e-16),
"fluctuations": (1., 1.e-16),
"loglogavgslope": (5, 1.e-16),
"asperity": None,
"flexibility": None
}