chanter 0.1.2__py3-none-any.whl → 0.1.4__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.
- chanter/examples/__init__.py +0 -0
- chanter/examples/create_galaxy_example.py +47 -0
- chanter/examples/filters/__init__.py +0 -0
- chanter/examples/filters/filt_list.txt +11 -0
- chanter/examples/filters/filt_list_jades.txt +14 -0
- chanter/examples/filters/g_HSC.txt +187 -0
- chanter/examples/filters/i_HSC.txt +566 -0
- chanter/examples/filters/r_HSC.txt +582 -0
- chanter/examples/filters/y_HSC.txt +101 -0
- chanter/examples/filters/z_HSC.txt +76 -0
- chanter/examples/fit_galaxy_example.py +58 -0
- {chanter-0.1.2.dist-info → chanter-0.1.4.dist-info}/METADATA +1 -1
- chanter-0.1.4.dist-info/RECORD +25 -0
- chanter-0.1.2.dist-info/RECORD +0 -14
- {chanter-0.1.2.dist-info → chanter-0.1.4.dist-info}/WHEEL +0 -0
- {chanter-0.1.2.dist-info → chanter-0.1.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
8160.00 -0.0011
|
|
2
|
+
8180.00 0.0042
|
|
3
|
+
8200.00 -0.0008
|
|
4
|
+
8220.00 0.0020
|
|
5
|
+
8240.00 -0.0011
|
|
6
|
+
8260.00 -0.0025
|
|
7
|
+
8280.00 0.0061
|
|
8
|
+
8300.00 0.0034
|
|
9
|
+
8320.00 0.0040
|
|
10
|
+
8340.00 0.0045
|
|
11
|
+
8360.00 0.0056
|
|
12
|
+
8380.00 0.0089
|
|
13
|
+
8400.00 0.0210
|
|
14
|
+
8420.00 0.0333
|
|
15
|
+
8440.00 0.0544
|
|
16
|
+
8460.00 0.0824
|
|
17
|
+
8480.00 0.1281
|
|
18
|
+
8500.00 0.1891
|
|
19
|
+
8520.00 0.2546
|
|
20
|
+
8540.00 0.3355
|
|
21
|
+
8560.00 0.4037
|
|
22
|
+
8580.00 0.4649
|
|
23
|
+
8600.00 0.5147
|
|
24
|
+
8620.00 0.5471
|
|
25
|
+
8640.00 0.5697
|
|
26
|
+
8660.00 0.5809
|
|
27
|
+
8680.00 0.5872
|
|
28
|
+
8700.00 0.5888
|
|
29
|
+
8720.00 0.5897
|
|
30
|
+
8740.00 0.5902
|
|
31
|
+
8760.00 0.5902
|
|
32
|
+
8780.00 0.5910
|
|
33
|
+
8800.00 0.5901
|
|
34
|
+
8820.00 0.5883
|
|
35
|
+
8840.00 0.5864
|
|
36
|
+
8860.00 0.5876
|
|
37
|
+
8880.00 0.5874
|
|
38
|
+
8900.00 0.5853
|
|
39
|
+
8920.00 0.5845
|
|
40
|
+
8940.00 0.5770
|
|
41
|
+
8960.00 0.5627
|
|
42
|
+
8980.00 0.5424
|
|
43
|
+
9000.00 0.5335
|
|
44
|
+
9020.00 0.5416
|
|
45
|
+
9040.00 0.5564
|
|
46
|
+
9060.00 0.5466
|
|
47
|
+
9080.00 0.5276
|
|
48
|
+
9100.00 0.5348
|
|
49
|
+
9120.00 0.5416
|
|
50
|
+
9140.00 0.5336
|
|
51
|
+
9160.00 0.5326
|
|
52
|
+
9180.00 0.5228
|
|
53
|
+
9200.00 0.5299
|
|
54
|
+
9220.00 0.5135
|
|
55
|
+
9240.00 0.4886
|
|
56
|
+
9260.00 0.4487
|
|
57
|
+
9280.00 0.3889
|
|
58
|
+
9300.00 0.3104
|
|
59
|
+
9320.00 0.2159
|
|
60
|
+
9340.00 0.1541
|
|
61
|
+
9360.00 0.1108
|
|
62
|
+
9380.00 0.0766
|
|
63
|
+
9400.00 0.0570
|
|
64
|
+
9420.00 0.0330
|
|
65
|
+
9440.00 0.0176
|
|
66
|
+
9460.00 0.0111
|
|
67
|
+
9480.00 0.0074
|
|
68
|
+
9500.00 0.0038
|
|
69
|
+
9520.00 0.0021
|
|
70
|
+
9540.00 0.0012
|
|
71
|
+
9560.00 0.0001
|
|
72
|
+
9580.00 0.0005
|
|
73
|
+
9600.00 -0.0003
|
|
74
|
+
9620.00 -0.0000
|
|
75
|
+
9640.00 0.0004
|
|
76
|
+
9660.00 0.0004
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import chanter as ch
|
|
2
|
+
import matplotlib.pyplot as plt
|
|
3
|
+
import numpy as np
|
|
4
|
+
from nautilus import Prior
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
# Define the filter curve filepaths
|
|
8
|
+
filt_list = np.loadtxt('filters/filt_list.txt', dtype="str")
|
|
9
|
+
|
|
10
|
+
# Define the observed photometry (microJy), along with their errors.
|
|
11
|
+
phot_data = np.array(([ [0.00000114, 0.00000011],
|
|
12
|
+
[0.00281023, 0.00028102],
|
|
13
|
+
[0.03039540, 0.00303954],
|
|
14
|
+
[0.04083275, 0.00408327],
|
|
15
|
+
[0.06158577, 0.00615858],
|
|
16
|
+
[0.08333301, 0.00833330],
|
|
17
|
+
[0.15811047, 0.01581105],
|
|
18
|
+
[0.63260459, 0.06326046],
|
|
19
|
+
[0.96879516, 0.09687952],
|
|
20
|
+
[1.15809244, 0.11580924],
|
|
21
|
+
[1.30375688, 0.13037569] ]))
|
|
22
|
+
|
|
23
|
+
# Define the priors for each parameter
|
|
24
|
+
prior = Prior()
|
|
25
|
+
prior.add_parameter("age", dist=(0., 14.))
|
|
26
|
+
prior.add_parameter("tau", dist=(0.1, 15.))
|
|
27
|
+
prior.add_parameter("massformed", dist=(0, 13.))
|
|
28
|
+
prior.add_parameter("Av", dist=(0, 8.))
|
|
29
|
+
prior.add_parameter("redshift", dist=(0., 10.))
|
|
30
|
+
|
|
31
|
+
# Fit observed photometry
|
|
32
|
+
fitter = ch.galaxyfitter()
|
|
33
|
+
median_instructions, wavs, spectrum_samples, photometry_samples = fitter.fit(phot_data.copy(), prior, filt_list)
|
|
34
|
+
|
|
35
|
+
# Print the median galaxy parameters
|
|
36
|
+
print(json.dumps(median_instructions, sort_keys=True, indent=4))
|
|
37
|
+
|
|
38
|
+
# Define figure
|
|
39
|
+
fig, ax = plt.subplots()
|
|
40
|
+
|
|
41
|
+
# Plot the observed photometry
|
|
42
|
+
filt = ch.utils.filter_set(filt_list)
|
|
43
|
+
effwavs = filt.eff_wavs
|
|
44
|
+
phot_data_erg = phot_data.copy()
|
|
45
|
+
phot_data_erg.T[0] = 2.99792458E-05 * ((1e-6 * phot_data_erg.T[0]) / ((effwavs)**2))
|
|
46
|
+
phot_data_erg.T[1] = 2.99792458E-05 * ((1e-6 * phot_data_erg.T[1]) / ((effwavs)**2))
|
|
47
|
+
ax.errorbar(effwavs, phot_data_erg.T[0], phot_data_erg.T[1], ls='none', marker='D', capsize=3, color='xkcd:cherry', mec='black', mew=1, ecolor='black', zorder=5)
|
|
48
|
+
|
|
49
|
+
# Plot the fitted model
|
|
50
|
+
ax.plot(wavs,np.median(fitter.spectrum_samples, axis=0), color='darkcyan', alpha=0.5)
|
|
51
|
+
ax.scatter(effwavs,np.median(fitter.photometry_samples, axis=0), color='darkcyan', marker='D')
|
|
52
|
+
ax.set_xlim(100, 50000)
|
|
53
|
+
ax.set_ylim(0,)
|
|
54
|
+
ax.set_ylabel('Observed Flux / erg s$^{-1}$ cm$^{-2}$ Å$^{-1}$')
|
|
55
|
+
ax.set_xlabel('Observed Wavelength / Å')
|
|
56
|
+
plt.show()
|
|
57
|
+
|
|
58
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
chanter/__init__.py,sha256=bubSIcCkkzRcatq5ry6iSidWzj4YK8HqTvelHLunHJs,119
|
|
2
|
+
chanter/galaxy_fitter.py,sha256=g_66TJC2TpNudVz6qHOtwDADISWhhFs1v5g3oObNCcA,4201
|
|
3
|
+
chanter/model_galaxy.py,sha256=o_A_hqcIVUPphhQYDIk0fpCCArZZkOHbf3IDtQBCDN4,8789
|
|
4
|
+
chanter/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
chanter/examples/create_galaxy_example.py,sha256=sMTZ8GVk5ZE5LAQQpek8HPB_wp6qC-k0gNthqyImV1w,1046
|
|
6
|
+
chanter/examples/fit_galaxy_example.py,sha256=675bD2gc7qan7qEL1qNo9v4J_UFilPfBqjz8PdDKwJ8,2250
|
|
7
|
+
chanter/examples/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
chanter/examples/filters/filt_list.txt,sha256=C3Q5S1qe-zVj46g-2_pI9IxPtJANTGCH7so3-lhyEL0,340
|
|
9
|
+
chanter/examples/filters/filt_list_jades.txt,sha256=JUvNcaaPC0UkKhc83CaclGwkuv1-BB3SC2Mz0TpkKB0,196
|
|
10
|
+
chanter/examples/filters/g_HSC.txt,sha256=Yi__018s40EAhwniq_ii1iQ39dHnkVryftW5aclYwjU,2805
|
|
11
|
+
chanter/examples/filters/i_HSC.txt,sha256=ghjvJeBhkvroIYBXRZ6Mph4kzobv6nEP-koQ2YMkTb0,8490
|
|
12
|
+
chanter/examples/filters/r_HSC.txt,sha256=NpG2fA2kD0D1-SV3mZRol3a8ZvYcn6B4a0IabfnnUeg,8730
|
|
13
|
+
chanter/examples/filters/y_HSC.txt,sha256=mEFfbEEn1XOsTP2p6RSVrATne5jM_9JnobEE3qirJU8,1566
|
|
14
|
+
chanter/examples/filters/z_HSC.txt,sha256=DdtRyrx4iNU-LyidbCRSilWAJbayncucAOxS0Asz0n4,1146
|
|
15
|
+
chanter/grids/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
chanter/grids/d_igm_grid_inoue14.fits,sha256=T5Fb71OZjOqY9YkdZaEe3zPt1lOQZNoFXTZ-N_Y_Cnc,9843840
|
|
17
|
+
chanter/grids/lyman_series_coefs_inoue_2014_table2.txt,sha256=xFZsQQ8aV27G--iK0WJgBY0idFnNirWduCswT8TJ8y8,2721
|
|
18
|
+
chanter/grids/ssps_5.fits,sha256=Vfr_8DMIoY-IZYTxVhiqP8nFeypVOEJ6FasBUNp52NQ,23480640
|
|
19
|
+
chanter/utils/__init__.py,sha256=hn-ho-lJeT0evKXL1tV5jX0cR4meSlJmPcdxC49cLok,34
|
|
20
|
+
chanter/utils/filter_set.py,sha256=EITLa2c3FG3n1-v7KatKRwHCRyfZ4TTjsi_WM7Bz64k,6819
|
|
21
|
+
chanter/utils/make_igm_grid.py,sha256=nO3NvO-l15oG65mgf48FH3QdatxCfgPT_kqwZzO14CA,10280
|
|
22
|
+
chanter-0.1.4.dist-info/METADATA,sha256=P7rZHAsf-iJCyPndDhU3ZQZapW8Nk2mLYvrIw80sY1Y,1016
|
|
23
|
+
chanter-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
chanter-0.1.4.dist-info/top_level.txt,sha256=Q23dLK1syz0D-XIZ6zeY6TOZ7BQsC-BLqRiVQE7_udk,8
|
|
25
|
+
chanter-0.1.4.dist-info/RECORD,,
|
chanter-0.1.2.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
chanter/__init__.py,sha256=bubSIcCkkzRcatq5ry6iSidWzj4YK8HqTvelHLunHJs,119
|
|
2
|
-
chanter/galaxy_fitter.py,sha256=g_66TJC2TpNudVz6qHOtwDADISWhhFs1v5g3oObNCcA,4201
|
|
3
|
-
chanter/model_galaxy.py,sha256=o_A_hqcIVUPphhQYDIk0fpCCArZZkOHbf3IDtQBCDN4,8789
|
|
4
|
-
chanter/grids/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
chanter/grids/d_igm_grid_inoue14.fits,sha256=T5Fb71OZjOqY9YkdZaEe3zPt1lOQZNoFXTZ-N_Y_Cnc,9843840
|
|
6
|
-
chanter/grids/lyman_series_coefs_inoue_2014_table2.txt,sha256=xFZsQQ8aV27G--iK0WJgBY0idFnNirWduCswT8TJ8y8,2721
|
|
7
|
-
chanter/grids/ssps_5.fits,sha256=Vfr_8DMIoY-IZYTxVhiqP8nFeypVOEJ6FasBUNp52NQ,23480640
|
|
8
|
-
chanter/utils/__init__.py,sha256=hn-ho-lJeT0evKXL1tV5jX0cR4meSlJmPcdxC49cLok,34
|
|
9
|
-
chanter/utils/filter_set.py,sha256=EITLa2c3FG3n1-v7KatKRwHCRyfZ4TTjsi_WM7Bz64k,6819
|
|
10
|
-
chanter/utils/make_igm_grid.py,sha256=nO3NvO-l15oG65mgf48FH3QdatxCfgPT_kqwZzO14CA,10280
|
|
11
|
-
chanter-0.1.2.dist-info/METADATA,sha256=40T32lxTtN-G6-hQVvKSoXqTfN3RQ8niOF8FiCVhyCU,1016
|
|
12
|
-
chanter-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
-
chanter-0.1.2.dist-info/top_level.txt,sha256=Q23dLK1syz0D-XIZ6zeY6TOZ7BQsC-BLqRiVQE7_udk,8
|
|
14
|
-
chanter-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|