chanter 0.1.3__py3-none-any.whl → 0.1.5__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.
File without changes
@@ -0,0 +1,47 @@
1
+ import chanter as ch
2
+ import matplotlib.pyplot as plt
3
+
4
+ '''
5
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6
+ Define model galaxy parameters
7
+ '''
8
+
9
+ exp = {}
10
+ exp["age"] = 1 # Age of galaxy in its rest frame
11
+ exp["tau"] = 0.3 # Scale of star-formation exponential decline
12
+ exp["massformed"] = 11. # Total mass formed in stars
13
+ exp["metallicity"] = 0.02 # Z/Z_oldsolar
14
+
15
+ dust = {}
16
+ dust["type"] = "Calzetti" # Type of dust law
17
+ dust["Av"] = 1 # Dust extinction in magnitudes
18
+
19
+ fit_instructions = {}
20
+ fit_instructions["redshift"] = 5 # Redshift of galaxy
21
+ fit_instructions["exponential"] = exp
22
+ fit_instructions["dust"] = dust
23
+
24
+ '''
25
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
+ '''
27
+
28
+ # Plot CHANTER
29
+ model = ch.modelgalaxy(fit_instructions)
30
+ fig, ax = plt.subplots(figsize=(10, 3))
31
+ model.plot_spec(ax, dict(color='darkcyan'))
32
+ ax.set_xlim(1000, 50000)
33
+ fig, ax = plt.subplots(figsize=(10, 3))
34
+ model.plot_sfh(ax)
35
+ plt.show()
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+