-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_sample_SED.py
More file actions
executable file
·59 lines (51 loc) · 1.86 KB
/
plot_sample_SED.py
File metadata and controls
executable file
·59 lines (51 loc) · 1.86 KB
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
#!/usr/bin/env python
import sys
import matplotlib.pyplot as plt
import numpy as np
sys.path.append('./make_plot')
from plot_SED import plot_SED
def main():
SED_mag_array = np.loadtxt('./tables/C2D_HREL-ALL-SED_mag_exXU.txt',
ndmin=2)[:, :8]
evolved_star_mag_array = np.loadtxt('./tables/evolved_star_SED_mag.txt',
ndmin=2)[:, :8]
star_mag_array = np.loadtxt('./tables/star_SED_mag.txt', ndmin=2)[:, :8]
galaxy_mag_array = np.loadtxt('./tables/galaxy_SED_mag.txt',
ndmin=2)[:, :8]
YSO_mag_array = np.loadtxt(
'./results/C2D_HREL-ALL-SED_mag_exXU/result_model_evolved_star_star_galaxy_bin1.0/YSO-SED_mag.txt',
ndmin=2)[:, :8]
plt.subplots(2, 2, figsize=(20, 16))
plt.subplot(2, 2, 1)
plot_SED(star_mag_array,
JHK_system='2MASS',
title_name='Star sample SED',
mag_lim=(-10, 10),
new_fig=False,
save_fig=False)
plt.subplot(2, 2, 2)
plot_SED(evolved_star_mag_array,
JHK_system='UKIDSS',
title_name='Evolved star sample SED',
mag_lim=(-10, 10),
new_fig=False,
save_fig=False)
plt.subplot(2, 2, 3)
plot_SED(galaxy_mag_array,
JHK_system='UKIDSS',
title_name='Galaxy sample SED',
mag_lim=(-10, 10),
new_fig=False,
save_fig=False)
plt.subplot(2, 2, 4)
plot_SED(YSO_mag_array,
JHK_system='2MASS',
title_name='YSO sample SED',
mag_lim=(-10, 10),
new_fig=False,
save_fig=False)
plt.suptitle('SED in magnitude shifted to K magnitude = 1.0', fontsize=28)
plt.tight_layout()
plt.savefig('./figures/SED_this_work_sample.png')
if __name__ == '__main__':
main()