chanter 0.0.2__py3-none-any.whl → 0.0.3__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/__init__.py CHANGED
@@ -1,4 +1,6 @@
1
1
  from .model_galaxy import modelgalaxy
2
2
  from .galaxy_fitter import galaxyfitter
3
3
 
4
- from . import utils
4
+ from . import utils
5
+
6
+ from . import grids
File without changes
chanter/model_galaxy.py CHANGED
@@ -30,7 +30,7 @@ def resample_ssp_wavs(target_wavs):
30
30
 
31
31
  def resample_igm_grid(wavs):
32
32
  # Import IGM grid
33
- raw_igm_grid = fits.open(os.path.dirname(os.path.realpath(__file__)) + 'grids/d_igm_grid_inoue14.fits')[1].data
33
+ raw_igm_grid = fits.open(os.path.dirname(os.path.realpath(__file__)) + '/grids/d_igm_grid_inoue14.fits')[1].data
34
34
  igm_wavelengths = np.arange(1.0, 1225.01, 1.0)
35
35
 
36
36
  # Resample in wavelength
@@ -47,7 +47,7 @@ def resample_igm_grid(wavs):
47
47
  return grid
48
48
 
49
49
 
50
- hdul = fits.open(os.path.dirname(os.path.realpath(__file__)) + 'grids/ssps.fits')
50
+ hdul = fits.open(os.path.dirname(os.path.realpath(__file__)) + '/grids/ssps.fits')
51
51
  master_base = np.array((hdul[1].data, hdul[2].data, hdul[3].data, hdul[4].data, hdul[5].data, hdul[6].data, hdul[7].data))
52
52
 
53
53
  rest_target_wavs = np.arange(100., 50000., 10.)
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.2
2
+ Name: chanter
3
+ Version: 0.0.3
4
+ Summary: Galaxy spectral fitting
5
+ Author: Struan Stevenson
6
+ Author-email: struan.stevenson@ed.ac.uk
7
+ Requires-Dist: numpy
8
+ Requires-Dist: astropy
9
+ Requires-Dist: matplotlib
10
+ Requires-Dist: spectres
11
+ Requires-Dist: nautilus-sampler
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: requires-dist
15
+ Dynamic: summary
@@ -0,0 +1,11 @@
1
+ chanter/__init__.py,sha256=bubSIcCkkzRcatq5ry6iSidWzj4YK8HqTvelHLunHJs,119
2
+ chanter/galaxy_fitter.py,sha256=JYDRc-iW5ZgDHprw4FCshrsBnG8ENvs3MEDNUtlFYxQ,3683
3
+ chanter/model_galaxy.py,sha256=LpgMw23oRsfAH3acS1yx0PKvJxN0LPyAJAQSR0H3FYQ,7832
4
+ chanter/grids/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ chanter/utils/__init__.py,sha256=hn-ho-lJeT0evKXL1tV5jX0cR4meSlJmPcdxC49cLok,34
6
+ chanter/utils/filter_set.py,sha256=EITLa2c3FG3n1-v7KatKRwHCRyfZ4TTjsi_WM7Bz64k,6819
7
+ chanter/utils/make_igm_grid.py,sha256=s9NeRmgOsj_OxvxXixIdPSSQZPlsLcPedIRr4soZUcU,10304
8
+ chanter-0.0.3.dist-info/METADATA,sha256=AoXqJlWkuelZZRVB5TqGcpbLNHMMueeW0qwp_wsXXR0,353
9
+ chanter-0.0.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
10
+ chanter-0.0.3.dist-info/top_level.txt,sha256=Q23dLK1syz0D-XIZ6zeY6TOZ7BQsC-BLqRiVQE7_udk,8
11
+ chanter-0.0.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- import sys
2
- import os
3
- import glob
4
-
5
- bins = [f for f in sorted(glob.glob(f'CHANTER/Miles_Atlas/Chabrier_IMF/*ised'))]
6
-
7
-
8
- for i in bins:
9
- os.system('$bc03/ascii_ised ~/Desktop/research/' + i)
@@ -1,24 +0,0 @@
1
- import numpy as np
2
- from astropy.table import Table
3
- import pandas as pd
4
- import matplotlib.pyplot as plt
5
- from astropy.io import fits
6
-
7
-
8
- base22 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m22_ssp.csv', delimiter=',')
9
- base32 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m32_ssp.csv', delimiter=',')
10
- base42 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m42_ssp.csv', delimiter=',')
11
- base52 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m52_ssp.csv', delimiter=',')
12
- base62 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m62_ssp.csv', delimiter=',')
13
- base72 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m72_ssp.csv', delimiter=',')
14
- base82 = np.genfromtxt('/Users/struanstevenson/Desktop/research/CHANTER/ssp/m82_ssp.csv', delimiter=',')
15
-
16
- master_base = np.array((base22, base32, base42, base52, base62, base72, base82))
17
-
18
- hdul = fits.HDUList()
19
- hdul.append(fits.PrimaryHDU())
20
-
21
- for img in master_base:
22
- hdul.append(fits.ImageHDU(data=img))
23
-
24
- hdul.writeto('/Users/struanstevenson/Desktop/research/CHANTER/ssp/ssps.fits')
@@ -1,32 +0,0 @@
1
- import numpy as np
2
- from astropy.table import Table
3
- import pandas as pd
4
- import matplotlib.pyplot as plt
5
-
6
- def get_ssp(ascii_file):
7
-
8
-
9
- ages = pd.read_table(ascii_file, sep='\s+', nrows=1, header=None, dtype='float')
10
- ages = ages.to_numpy()[0][1:]
11
- ages_df = pd.DataFrame(ages, columns=['age'])
12
-
13
- waves = pd.read_table(ascii_file, sep='\s+', skiprows=6, nrows=1, header=None, dtype='float')
14
- waves = waves.drop(waves.columns[0], axis=1)
15
-
16
- flux = pd.read_table(ascii_file, sep='\s+', skiprows=7, nrows=221, header=None)
17
- flux = flux.drop(flux.columns[0], axis=1)
18
- flux = flux.drop(flux.columns[-53:], axis=1)
19
- flux.columns = waves.to_numpy()[0]
20
-
21
-
22
- base = ages_df.join(flux)
23
-
24
- return base
25
-
26
- specs = ['m22', 'm32', 'm42', 'm52', 'm62', 'm72', 'm82']
27
-
28
-
29
- for spec in specs:
30
- df = get_ssp('/Users/struanstevenson/Desktop/research/CHANTER/ssp/ascii_files/bc2003_hr_xmiless_'+spec+'_chab_ssp.ised_ASCII')
31
- #df.to_csv('./CHANTER/ssp/'+spec+'_ssp.csv', index=False)
32
-
@@ -1,8 +0,0 @@
1
- import numpy as np
2
- from astropy.table import Table
3
- import pandas as pd
4
- import matplotlib.pyplot as plt
5
- from astropy.io import fits
6
-
7
- hdul = fits.open('output.fits')
8
- print(hdul[7].data)
@@ -1,625 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- # Rebuilds headers of BC/CB model fits file
4
-
5
- from astropy.io import fits
6
- import sys
7
-
8
- hdulist = fits.open(str(sys.argv[1]))
9
- prihdr = hdulist[0].header
10
- prihdr['stilts0'] = ''
11
- prihdr['stilts'] = 'Fits file created by STILTS v3.1-1, including header up to NTABLE'
12
- prihdr['modlhd0'] = ''
13
- prihdr['modlhdr'] = '---------------- CB2016 model header follows below ----------------'
14
- prihdr['biblio00'] = ''
15
- prihdr['biblio01'] = 'BIBLIOGRAPHY:'
16
- prihdr['biblio02'] = ''
17
- prihdr['biblio03'] = 'EVOLUTIONARY TRACKS:'
18
- prihdr['biblio04'] = ' PARSEC: Bressan, A., et al. 2012, MNRAS, 427'
19
- prihdr['biblio05'] = ' Chen, Y., et al. 2015, MNRAS, 452, 1068'
20
- prihdr['biblio06'] = ' TP-AGB: Marigo, P. et al. 2013, MNRAS, 434, 488'
21
- prihdr['biblio07'] = ''
22
- prihdr['biblio08'] = 'STELLAR SPECTRA:'
23
- prihdr['biblio09'] = ' Visible range: MILES stellar library'
24
- prihdr['biblio10'] = ' Sanchez-Blazquez et al. 2006, MNRAS, 371, 703'
25
- prihdr['biblio11'] = ' Falcon-Barroso, J., et al. 2011, A&A, 532, 95'
26
- prihdr['biblio12'] = ' Prugniel, Ph. 2011 A&A, 531, 165'
27
- prihdr['biblio13'] = ' Supplemented with:'
28
- prihdr['biblio14'] = ' Stelib: redward of Miles reddest point (7350 A)'
29
- prihdr['biblio15'] = ' Le Borgne, J.-F. et al. 2003, A&A, 402, 433'
30
- prihdr['biblio16'] = ' BaSeL 3.1: redward of Stelib reddest point (8750 A)'
31
- prihdr['biblio17'] = ' Westera P. et al. 2002, A&A, 381, 524'
32
- prihdr['biblio18'] = ' O-stars: Tlusty models'
33
- prihdr['biblio19'] = ' Lanz, T. & Hubeny, I. 2003, ApJS, 146, 417'
34
- prihdr['biblio20'] = ' B-stars: Tlusty models'
35
- prihdr['biblio21'] = ' Lanz, T. & Hubeny, I. 2007, ApJS, 169, 83'
36
- prihdr['biblio22'] = ' Massive MS stars: WM-Basic models'
37
- prihdr['biblio23'] = ' Leitherer, C., et al. 2010, ApJS, 189, 309'
38
- prihdr['biblio24'] = ' WR stars: PoWR models'
39
- prihdr['biblio25'] = ' Hamann, W-R & Gafener, G. 2004, A&A, 427, 697'
40
- prihdr['biblio26'] = ' A-stars: Martins et al. models'
41
- prihdr['biblio27'] = ' Martins, L.P. et al. 2005, MNRAS, 358, 49'
42
- prihdr['biblio28'] = ' Lower mass stars: UV-Blue models'
43
- prihdr['biblio29'] = ' Rodriguez-Merino, LH, et al. 2005,ApJ,626,411'
44
- prihdr['biblio30'] = ' CSPN: Rauch models'
45
- prihdr['biblio31'] = ' Rauch, T. 2002, RevMexAstronAstrof CS, 12, 150'
46
- prihdr['biblio32'] = ' TP-AGB stars: Aringer models for C stars'
47
- prihdr['biblio33'] = ' Aringer et al. 2009, A&A, 503, 913'
48
- prihdr['biblio34'] = ' IRTF library'
49
- prihdr['biblio35'] = ' Rayner et al. 2009, ApJS, 185, 289'
50
- prihdr['biblio36'] = ' Dusty code'
51
- prihdr['biblio37'] = ' Ivezic Z. & Elitzur M., 1997, MNRAS, 287, 799'
52
- prihdr['biblio38'] = ' Gonzalez-L. R. et al. 2010, MNRAS, 403, 1213'
53
- prihdr['biblio39'] = ''
54
- prihdr['biblio40'] = 'LINE INDICES:'
55
- prihdr['biblio41'] = ' Lick indices: Worthey, G., et al. 1994, ApJS, 94, 687'
56
- prihdr['biblio42'] = ' Trager, S.C., et al. 1998, ApJS, 116, 1'
57
- prihdr['biblio43'] = ' Other indices: Worthey G & Ottaviani DL 1997, ApJS, 111, 377'
58
- prihdr['biblio44'] = ' Brodie, J., & Hanes, D.A. 1986, ApJ, 300, 258'
59
- prihdr['biblio45'] = ' Diaz, A. & Terlevich**2 1989, MNRAS, 239, 325'
60
- prihdr['biblio46'] = ' Gorgas J, Cardiel N et al. 1999, A&AS, 139, 29'
61
- prihdr['biblio47'] = ' Marcillac, D., et al. 2006, A&A, 458, 369'
62
- prihdr['biblio48'] = ' UV indices: Fanelli, M. N., et al. 1987, ApJ, 321, 768'
63
- prihdr['biblio49'] = ' Fanelli, M. N., et al. 1990, ApJ, 364, 272'
64
- prihdr['biblio50'] = ' Fanelli, M. N., et al. 1992, ApJS, 82, 197'
65
- prihdr['biblio51'] = ' Chavez, M. et al. 2009, ApJ, 700, 694'
66
- prihdr['biblio52'] = ' Maraston, C. et al. 2009, A&A, 493, 425'
67
- prihdr['biblio53'] = ''
68
- prihdr['biblio54'] = 'Fuel Consumption Theorem: Renzini & Buzzoni 1986, in'
69
- prihdr['biblio55'] = ' Spectral Evolution of Galaxies, eds. C. Chiosi & A. Renzini, p195'
70
- prihdr['biblio56'] = ''
71
- prihdr['biblio57'] = '-------------------------------------------------------------------'
72
- prihdr['modlhd1'] = ''
73
- prihdr['modlid'] = 'CB2016 - Simple Stellar Population Synthesis Model'
74
- prihdr['modlref'] = 'Charlot & Bruzual (2016, MNRAS, in preparation)'
75
- prihdr['modlfile'] = str(sys.argv[1])
76
-
77
- # BC2003 models, Padova 1994 tracks + VWPAGB
78
- if str(sys.argv[2]) == '-22':
79
- prihdr['modltrks'] = ('0.7696, 0.2303, 0.0001 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
80
- elif str(sys.argv[2]) == '-32':
81
- prihdr['modltrks'] = ('0.7686, 0.2310, 0.0004 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
82
- elif str(sys.argv[2]) == '-42':
83
- prihdr['modltrks'] = ('0.7560, 0.2400, 0.0040 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
84
- elif str(sys.argv[2]) == '-52':
85
- prihdr['modltrks'] = ('0.7420, 0.2500, 0.0080 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
86
- elif str(sys.argv[2]) == '-62':
87
- prihdr['modltrks'] = ('0.7000, 0.2800, 0.0200 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
88
- elif str(sys.argv[2]) == '-72':
89
- prihdr['modltrks'] = ('0.5980, 0.3520, 0.0500 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
90
- elif str(sys.argv[2]) == '-82':
91
- prihdr['modltrks'] = ('0.4250, 0.4750, 0.1000 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
92
-
93
- # BC2003 models, Padova 2000 tracks + VWPAGB
94
- elif str(sys.argv[2]) == '-122':
95
- prihdr['modltrks'] = ('0.7696, 0.2300, 0.0004 ','X, Y, Z, Padova 2000 + TP-AGB + VWPAGB')
96
- elif str(sys.argv[2]) == '-132':
97
- prihdr['modltrks'] = ('0.7690, 0.2300, 0.0010 ','X, Y, Z, Padova 2000 + TP-AGB + VWPAGB')
98
- elif str(sys.argv[2]) == '-142':
99
- prihdr['modltrks'] = ('0.7560, 0.2400, 0.0040 ','X, Y, Z, Padova 2000 + TP-AGB + VWPAGB')
100
- elif str(sys.argv[2]) == '-152':
101
- prihdr['modltrks'] = ('0.7420, 0.2500, 0.0080 ','X, Y, Z, Padova 2000 + TP-AGB + VWPAGB')
102
- elif str(sys.argv[2]) == '-162':
103
- prihdr['modltrks'] = ('0.7080, 0.2730, 0.0190 ','X, Y, Z, Padova 2000 + TP-AGB + VWPAGB')
104
- elif str(sys.argv[2]) == '-172':
105
- prihdr['modltrks'] = ('0.6700, 0.3000, 0.0300 ','X, Y, Z, Padova 2000 + TP-AGB + VWPAGB')
106
-
107
- # CB2007 models, Padova 1994 tracks + VWPAGB + enhanced TP-AGB
108
- elif str(sys.argv[2]) == '-92':
109
- prihdr['modltrks'] = ('0.7696, 0.2303, 0.0001 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
110
- elif str(sys.argv[2]) == '-93':
111
- prihdr['modltrks'] = ('0.7686, 0.2310, 0.0004 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
112
- elif str(sys.argv[2]) == '-94':
113
- prihdr['modltrks'] = ('0.7560, 0.2400, 0.0040 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
114
- elif str(sys.argv[2]) == '-95':
115
- prihdr['modltrks'] = ('0.7420, 0.2500, 0.0080 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
116
- elif str(sys.argv[2]) == '-96':
117
- prihdr['modltrks'] = ('0.7000, 0.2800, 0.0200 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
118
- elif str(sys.argv[2]) == '-97':
119
- prihdr['modltrks'] = ('0.5980, 0.3520, 0.0500 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
120
- elif str(sys.argv[2]) == '-98':
121
- prihdr['modltrks'] = ('0.4250, 0.4750, 0.1000 ','X, Y, Z, Padova 1994 + TP-AGB + VWPAGB')
122
-
123
- # BC2019 models, PARSEC tracks + VWPAGB
124
- elif str(sys.argv[2]) == '-400':
125
- prihdr['modltrks'] = ('0.7700, 0.2300, 0.0000 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
126
- elif str(sys.argv[2]) == '-401':
127
- prihdr['modltrks'] = ('0.7509, 0.2490, 0.0001 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
128
- elif str(sys.argv[2]) == '-402':
129
- prihdr['modltrks'] = ('0.7508, 0.2490, 0.0002 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
130
- elif str(sys.argv[2]) == '-403':
131
- prihdr['modltrks'] = ('0.7505, 0.2490, 0.0005 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
132
- elif str(sys.argv[2]) == '-404':
133
- prihdr['modltrks'] = ('0.7490, 0.2500, 0.0010 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
134
- elif str(sys.argv[2]) == '-405':
135
- prihdr['modltrks'] = ('0.7460, 0.2520, 0.0020 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
136
- elif str(sys.argv[2]) == '-406':
137
- prihdr['modltrks'] = ('0.7400, 0.2560, 0.0040 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
138
- elif str(sys.argv[2]) == '-407':
139
- prihdr['modltrks'] = ('0.7350, 0.2590, 0.0060 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
140
- elif str(sys.argv[2]) == '-408':
141
- prihdr['modltrks'] = ('0.7290, 0.2630, 0.0080 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
142
- elif str(sys.argv[2]) == '-409':
143
- prihdr['modltrks'] = ('0.7230, 0.2670, 0.0100 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
144
- elif str(sys.argv[2]) == '-410':
145
- prihdr['modltrks'] = ('0.7130, 0.2730, 0.0140 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
146
- elif str(sys.argv[2]) == '-411':
147
- prihdr['modltrks'] = ('0.7040, 0.2790, 0.0170 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
148
- elif str(sys.argv[2]) == '-412':
149
- prihdr['modltrks'] = ('0.6960, 0.2840, 0.0200 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
150
- elif str(sys.argv[2]) == '-413':
151
- prihdr['modltrks'] = ('0.6680, 0.3020, 0.0300 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
152
- elif str(sys.argv[2]) == '-414':
153
- prihdr['modltrks'] = ('0.6390, 0.3210, 0.0400 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
154
- elif str(sys.argv[2]) == '-416':
155
- prihdr['modltrks'] = ('0.5840, 0.3560, 0.0600 ','X, Y, Z, PARSEC + TP-AGB + VWPAGB')
156
-
157
- # CB2019 models, PARSEC tracks + MBPAGB
158
- elif str(sys.argv[2]) == '-500':
159
- prihdr['modltrks'] = ('0.7700, 0.2300, 0.0000 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
160
- elif str(sys.argv[2]) == '-501':
161
- prihdr['modltrks'] = ('0.7509, 0.2490, 0.0001 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
162
- elif str(sys.argv[2]) == '-502':
163
- prihdr['modltrks'] = ('0.7508, 0.2490, 0.0002 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
164
- elif str(sys.argv[2]) == '-503':
165
- prihdr['modltrks'] = ('0.7505, 0.2490, 0.0005 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
166
- elif str(sys.argv[2]) == '-504':
167
- prihdr['modltrks'] = ('0.7490, 0.2500, 0.0010 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
168
- elif str(sys.argv[2]) == '-505':
169
- prihdr['modltrks'] = ('0.7460, 0.2520, 0.0020 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
170
- elif str(sys.argv[2]) == '-506':
171
- prihdr['modltrks'] = ('0.7400, 0.2560, 0.0040 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
172
- elif str(sys.argv[2]) == '-507':
173
- prihdr['modltrks'] = ('0.7350, 0.2590, 0.0060 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
174
- elif str(sys.argv[2]) == '-508':
175
- prihdr['modltrks'] = ('0.7290, 0.2630, 0.0080 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
176
- elif str(sys.argv[2]) == '-509':
177
- prihdr['modltrks'] = ('0.7230, 0.2670, 0.0100 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
178
- elif str(sys.argv[2]) == '-510':
179
- prihdr['modltrks'] = ('0.7130, 0.2730, 0.0140 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
180
- elif str(sys.argv[2]) == '-511':
181
- prihdr['modltrks'] = ('0.7040, 0.2790, 0.0170 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
182
- elif str(sys.argv[2]) == '-512':
183
- prihdr['modltrks'] = ('0.6960, 0.2840, 0.0200 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
184
- elif str(sys.argv[2]) == '-513':
185
- prihdr['modltrks'] = ('0.6680, 0.3020, 0.0300 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
186
- elif str(sys.argv[2]) == '-514':
187
- prihdr['modltrks'] = ('0.6390, 0.3210, 0.0400 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
188
- elif str(sys.argv[2]) == '-516':
189
- prihdr['modltrks'] = ('0.5840, 0.3560, 0.0600 ','X, Y, Z, PARSEC + TP-AGB + MBPAGB')
190
-
191
- # BC2020 models, SISSA 2020 tracks + VWPAGB
192
- elif str(sys.argv[2]) == '-600':
193
- prihdr['modltrks'] = ('0.7700, 0.2300, 0.0000 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
194
- elif str(sys.argv[2]) == '-601':
195
- prihdr['modltrks'] = ('0.7509, 0.2490, 0.0001 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
196
- elif str(sys.argv[2]) == '-602':
197
- prihdr['modltrks'] = ('0.7508, 0.2490, 0.0002 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
198
- elif str(sys.argv[2]) == '-603':
199
- prihdr['modltrks'] = ('0.7505, 0.2490, 0.0005 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
200
- elif str(sys.argv[2]) == '-604':
201
- prihdr['modltrks'] = ('0.7490, 0.2500, 0.0010 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
202
- elif str(sys.argv[2]) == '-605':
203
- prihdr['modltrks'] = ('0.7460, 0.2520, 0.0020 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
204
- elif str(sys.argv[2]) == '-606':
205
- prihdr['modltrks'] = ('0.7400, 0.2560, 0.0040 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
206
- elif str(sys.argv[2]) == '-607':
207
- prihdr['modltrks'] = ('0.7350, 0.2590, 0.0060 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
208
- elif str(sys.argv[2]) == '-608':
209
- prihdr['modltrks'] = ('0.7290, 0.2630, 0.0080 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
210
- elif str(sys.argv[2]) == '-609':
211
- prihdr['modltrks'] = ('0.7230, 0.2670, 0.0100 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
212
- elif str(sys.argv[2]) == '-610':
213
- prihdr['modltrks'] = ('0.7130, 0.2730, 0.0140 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
214
- elif str(sys.argv[2]) == '-611':
215
- prihdr['modltrks'] = ('0.7040, 0.2790, 0.0170 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
216
- elif str(sys.argv[2]) == '-612':
217
- prihdr['modltrks'] = ('0.6960, 0.2840, 0.0200 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
218
- elif str(sys.argv[2]) == '-613':
219
- prihdr['modltrks'] = ('0.6680, 0.3020, 0.0300 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
220
- elif str(sys.argv[2]) == '-614':
221
- prihdr['modltrks'] = ('0.6390, 0.3210, 0.0400 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
222
- elif str(sys.argv[2]) == '-616':
223
- prihdr['modltrks'] = ('0.5840, 0.3560, 0.0600 ','X, Y, Z, SISSA 2020 + TP-AGB + VWPAGB')
224
-
225
- # CB2020 models, SISSA 2020 tracks + MBPAGB
226
- elif str(sys.argv[2]) == '-700':
227
- prihdr['modltrks'] = ('0.7700, 0.2300, 0.0000 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
228
- elif str(sys.argv[2]) == '-701':
229
- prihdr['modltrks'] = ('0.7509, 0.2490, 0.0001 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
230
- elif str(sys.argv[2]) == '-702':
231
- prihdr['modltrks'] = ('0.7508, 0.2490, 0.0002 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
232
- elif str(sys.argv[2]) == '-703':
233
- prihdr['modltrks'] = ('0.7505, 0.2490, 0.0005 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
234
- elif str(sys.argv[2]) == '-704':
235
- prihdr['modltrks'] = ('0.7490, 0.2500, 0.0010 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
236
- elif str(sys.argv[2]) == '-705':
237
- prihdr['modltrks'] = ('0.7460, 0.2520, 0.0020 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
238
- elif str(sys.argv[2]) == '-706':
239
- prihdr['modltrks'] = ('0.7400, 0.2560, 0.0040 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
240
- elif str(sys.argv[2]) == '-707':
241
- prihdr['modltrks'] = ('0.7350, 0.2590, 0.0060 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
242
- elif str(sys.argv[2]) == '-708':
243
- prihdr['modltrks'] = ('0.7290, 0.2630, 0.0080 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
244
- elif str(sys.argv[2]) == '-709':
245
- prihdr['modltrks'] = ('0.7230, 0.2670, 0.0100 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
246
- elif str(sys.argv[2]) == '-710':
247
- prihdr['modltrks'] = ('0.7130, 0.2730, 0.0140 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
248
- elif str(sys.argv[2]) == '-711':
249
- prihdr['modltrks'] = ('0.7040, 0.2790, 0.0170 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
250
- elif str(sys.argv[2]) == '-712':
251
- prihdr['modltrks'] = ('0.6960, 0.2840, 0.0200 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
252
- elif str(sys.argv[2]) == '-713':
253
- prihdr['modltrks'] = ('0.6680, 0.3020, 0.0300 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
254
- elif str(sys.argv[2]) == '-714':
255
- prihdr['modltrks'] = ('0.6390, 0.3210, 0.0400 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
256
- elif str(sys.argv[2]) == '-716':
257
- prihdr['modltrks'] = ('0.5840, 0.3560, 0.0600 ','X, Y, Z, SISSA 2020 + TP-AGB + MBPAGB')
258
-
259
- prihdr['modlimf'] = ('0.10, 100 ','[Mo], ML, MU, Chabrier (2003) IMF')
260
- prihdr['modltstp'] = ('1E4, 15E9, 221 ','[yr], Initial, Final age, Nsteps')
261
- prihdr['modlwavl'] = (' 5.6, 3.6E+8, var,13216','[A], Initial, Final wavl, Step, Npoints')
262
- prihdr['modlstl1'] = (' 5.6, 911.0, 0.9, 1007','Tlusty,Martins,UVBlue,WMBasic,PoWR,Rauch')
263
- prihdr['modlstl2'] = (' 911.5, 3540.5, 0.5, 5259','Tlusty,Martins,UVBlue,WMBasic,PoWR,Rauch')
264
- prihdr['modlstl3'] = ('3541.4, 7349.3, 0.9, 4232','Miles')
265
- prihdr['modlstl4'] = ('7351.0, 8750.0, 1.0, 1400','Stelib')
266
- prihdr['modlstl5'] = ('8770.0, 3.6E+8, var, 1318','BaSeL3.1, Aringer+, IRTF, Dusty TP-AGB')
267
- prihdr['modlbnt0'] = ''
268
- prihdr['modlbnt1'] = ('BINTABLE 1 ','SED of SSP vs. age in Lo/A')
269
- prihdr['modlbt1a'] = (' SED(t) ','SED for 221 values of age t in Lo/A')
270
- prihdr['modlbt1b'] = (' SED(t=0) = SED(t=10 Myr) ','First time step, n=1')
271
- prihdr['modlbt1c'] = (' SED(t=10 Myr) ','Second time step, n=2')
272
- prihdr['modlbt1d'] = (' SED(t=15 Gyr) ','Last time step, n=221')
273
- prihdr['modlbt20'] = ''
274
- prihdr['modlbnt2'] = ('BINTABLE 2 ','PHYSICAL PROPERTIES OF SSP vs. AGE')
275
- prihdr['modlbt2a'] = (' logNLy, logNHeI, logNHeII ','H, HeI, and HeII ionizing photons')
276
- prihdr['modlbt2b'] = (' B912 ','Amplitude of Lyman break')
277
- prihdr['modlbt2c'] = (' B4000VN, B4000SDSS, B4000 ','Amplitude of 4000 A break')
278
- prihdr['modlbt2d'] = (' SNR_yr ','Super nova rate /yr')
279
- prihdr['modlbt2e'] = (' PNBR_yr ','Planetary Nebula birth rate /yr')
280
- prihdr['modlbt2f'] = (' NBH ','Number of Black Holes formed')
281
- prihdr['modlbt2g'] = (' NNS ','Number of Neutron Stars formed')
282
- prihdr['modlbt2h'] = (' NWD ','Number of White Dwarfs formed')
283
- prihdr['modlbt2i'] = (' Lx(Lo) ','X ray luminosity (Lo)')
284
- prihdr['modlbt2j'] = (' Mstars ','Mass in living stars in Mo')
285
- prihdr['modlbt2k'] = (' Mremnants ','Mass in stellar remnants in Mo')
286
- prihdr['modlbt2l'] = (' Mretgas ','Mass of gas returned to ISM in Mo')
287
- prihdr['modlbt2m'] = (' Mgalaxy ','Mass of galaxy Mo')
288
- prihdr['modlbt2n'] = (' SFR_yr ','Star Formation Rate in Mo/yr')
289
- prihdr['modlbt2o'] = (' Mtot ','Mstars + Mremnants in Mo')
290
- prihdr['modlbt2p'] = (' Mtot_Lb, Mtot_Lv, Mtot_Lk ','Mtot/light ratio in B,V,K bands')
291
- prihdr['modlbt2q'] = (' Mliv_Lb, Mliv_Lv, Mliv_Lk ','Mstars/light ratio in B,V,K bands')
292
- prihdr['modlbt2r'] = (' bt_yr ','Evolutionary flux,Renzini & Buzzoni')
293
- prihdr['modlbt2s'] = (' Bt_yr_Lo ','b(t)/Bolometric luminosity.')
294
- prihdr['modlbt2t'] = (' TurnoffMass ','Turnoff Mass in Mo')
295
- prihdr['modlbt2u'] = (' BPMS_BMS ','Ratio of PostMS/MS bolometric flux')
296
- prihdr['modlbt30'] = ''
297
- prihdr['modlbnt3'] = ('BINTABLE 3 ','MAGNITUDES vs. AGE')
298
- prihdr['modlbt3a'] = (' VEGA mags: ','Vega magnitude system')
299
- prihdr['modlbt3b'] = (' Mbol: ','Bolometric magnitude')
300
- prihdr['modlbt3c'] = (' UBVRIJKL: ','Johnson filters')
301
- prihdr['modlbt3d'] = (' RI: ','Cousins filters')
302
- prihdr['modlbt3e'] = (' JHK: ','Palomar filters')
303
- prihdr['modlbt3f'] = (' Kprime: ','Cowie Kprime filter')
304
- prihdr['modlbt3g'] = (' JHKs: ','2Mass filters')
305
- prihdr['modlbt3h'] = (' 3.6,4.5,5.7,7.9 micron: ','IRAC filters')
306
- prihdr['modlbt3i'] = (' 12,25,60,100 micron: ','IRAS filters')
307
- prihdr['modlbt3j'] = (' 24,70,160 micron: ','MIPS filters')
308
- prihdr['modlbt3k'] = (' F220w,F250w,F330w,F410w, ','HST ACS WFC wide filters')
309
- prihdr['modlbt3l'] = (' F435w,F475w,F555w,F606w, ',' " " " " " ')
310
- prihdr['modlbt3m'] = (' F625w,F775w,F814w: ',' " " " " " ')
311
- prihdr['modlbt3n'] = (' f225w,f275w,f336w,f438w, ','HST UVIS1 filters')
312
- prihdr['modlbt3o'] = (' f547m,f555w,f606w,f625w, ',' " " " ')
313
- prihdr['modlbt3p'] = (' f656n,f657n,f658n,f814w: ',' " " " ')
314
- prihdr['modlbt3q'] = (' AB mags: ','AB magnitude system')
315
- prihdr['modlbt3r'] = (' ugriz: ','SDSS filters')
316
- prihdr['modlbt3s'] = (' ugriyzKs: ','CFHT MegaCam filters')
317
- prihdr['modlbt3t'] = (' FUV,NUV: ','GALEX filters')
318
- prihdr['modlbt40'] = ''
319
- prihdr['modlbnt4'] = ('BINTABLE 4 ','LINE STRENGTH INDICES vs. AGE')
320
- prihdr['modlbt4a'] = (' CN1,CN2,Ca4227,G4300,Fe4383,','Lick Indices')
321
- prihdr['modlbt4b'] = (' Ca4455,Fe4531,Fe4668,Hbeta, ',' " "')
322
- prihdr['modlbt4c'] = (' Fe5015,Mg1,Mg2,Mgb,Fe5270, ',' " "')
323
- prihdr['modlbt4d'] = (' Fe5335,Fe5406,Fe5709,Fe5782,',' " "')
324
- prihdr['modlbt4e'] = (' NaD,TiO1,TiO2 ',' " "')
325
- prihdr['modlbt4f'] = (' HdelA, HgamA, HdelF, HgamF ','Worthey & Ottaviani (1997)')
326
- prihdr['modlbt4g'] = (' CaII8498, CaII8542, CaII8662','Diaz, Terlevich, &')
327
- prihdr['modlbt4h'] = (' MgI8807 ',' Terlevich (1989)')
328
- prihdr['modlbt4i'] = (' H8_3889, H9_3835, H10_3798 ','Marcillac et al. (2006)')
329
- prihdr['modlbt4j'] = (' BHHK ','Brodie & Hanes HK index')
330
- prihdr['modlbt4k'] = (' D4000 ','4000 A break index (Gorgas&Cardiel)')
331
- prihdr['modlbt4l'] = (' B4000VN ','Very narrow 4000 A break')
332
- prihdr['modlbt4m'] = (' BL1302,SiIV,BL1425,Fe1453, ','UV, Fanelli et al. (1987,1990,1992)')
333
- prihdr['modlbt4n'] = (' CIV1548a,CIV1548c,CIV1548e, ',' " " " "')
334
- prihdr['modlbt4o'] = (' BL1617,BL1664,BL1719,BL1853,',' " " " "')
335
- prihdr['modlbt4p'] = (' FeII2402,BL2538,FeII2609, ',' " " " "')
336
- prihdr['modlbt4q'] = (' MgII,MgI,Mgwide,FeI,BL3096 ',' " " " "')
337
- prihdr['modlbt4r'] = (' CIVa ','CIV 1540 A stellar absorption')
338
- prihdr['modlbt4s'] = (' HeIIe ','HeII 1640 A stellar emission')
339
-
340
- # Build fits compatible header for BINTABLE2 (physical properties)
341
- sechdr = hdulist[2].header
342
- sechdr['TTYPE1'] = 'logage' # label for column 1
343
- sechdr['TTYPE2'] = 'logNLy' # label for column 2
344
- sechdr['TTYPE3'] = 'logNHeI' # label for column 3
345
- sechdr['TTYPE4'] = 'logNHeII' # label for column 4
346
- sechdr['TTYPE5'] = 'logNHeII-logNLy' # label for column 5
347
- sechdr['TTYPE6'] = 'B912' # label for column 6
348
- sechdr['TTYPE7'] = 'B4000VN' # label for column 7
349
- sechdr['TTYPE8'] = 'B4000SDSS' # label for column 8
350
- sechdr['TTYPE9'] = 'B4000' # label for column 9
351
-
352
- sechdr['TTYPE10'] = 'SNR' # label for column 10
353
- sechdr['TTYPE11'] = 'PISNR' # label for column 11
354
- sechdr['TTYPE12'] = 'RegSNR' # label for column 12
355
- sechdr['TTYPE13'] = 'TypeIaSNR' # label for column 13
356
- sechdr['TTYPE14'] = 'FailedSNR' # label for column 14
357
- sechdr['TTYPE15'] = 'PNBR' # label for column 15
358
- sechdr['TTYPE16'] = 'NBH' # label for column 16
359
- sechdr['TTYPE17'] = 'NNS' # label for column 17
360
- sechdr['TTYPE18'] = 'NWD' # label for column 18
361
- sechdr['TTYPE19'] = 'Lx' # label for column 19
362
-
363
- sechdr['TTYPE20'] = 'Mstars' # label for column 20
364
- sechdr['TTYPE21'] = 'Mremnants' # label for column 21
365
- sechdr['TTYPE22'] = 'Mretgas' # label for column 22
366
- sechdr['TTYPE23'] = 'Mgalaxy' # label for column 23
367
- sechdr['TTYPE24'] = 'SFR' # label for column 24
368
- sechdr['TTYPE25'] = 'Mtot' # label for column 25
369
- sechdr['TTYPE26'] = 'Mtot_Lb' # label for column 26
370
- sechdr['TTYPE27'] = 'Mtot_Lv' # label for column 27
371
- sechdr['TTYPE28'] = 'Mtot_Lk' # label for column 28
372
- sechdr['TTYPE29'] = 'Mliv_Lb' # label for column 29
373
-
374
- sechdr['TTYPE30'] = 'Mliv_Lv' # label for column 30
375
- sechdr['TTYPE31'] = 'Mliv_Lk' # label for column 31
376
- sechdr['TTYPE32'] = 'EvolutionaryFlux' # label for column 32
377
- sechdr['TTYPE33'] = 'SpecificEvolFlux' # label for column 33
378
- sechdr['TTYPE34'] = 'TurnoffMass' # label for column 34
379
- sechdr['TTYPE35'] = 'BPMS_BMS' # label for column 35
380
- sechdr['TTYPE36'] = 'TotalMassLossRate' # label for column 36
381
- sechdr['TTYPE37'] = 'DustProductionRate' # label for column 37
382
-
383
- sechdr['TUNIT1'] = 'yr (log age of SSP)'
384
- sechdr['TUNIT2'] = 'photons/Mo (log number of HI ionizing photons)'
385
- sechdr['TUNIT3'] = 'photons/Mo (log number of HeI ionizing photons)'
386
- sechdr['TUNIT4'] = 'photons/Mo (log number of HeII ionizing photons)'
387
- sechdr['TUNIT5'] = '.......... (log ratio number of ionizing HeII/HI)'
388
- sechdr['TUNIT6'] = '.......... (Lyman break amplitude)'
389
- sechdr['TUNIT7'] = '.......... (4000 A break, very narrow definition)'
390
- sechdr['TUNIT8'] = '.......... (4000 A break, SDSS definition)'
391
- sechdr['TUNIT9'] = '.......... (4000 A break, original definition)'
392
-
393
- sechdr['TUNIT10'] = 'SN/yr (Total Supernova rate)'
394
- sechdr['TUNIT11'] = 'SN/yr (PI Supernova rate)'
395
- sechdr['TUNIT12'] = 'SN/yr (Regular Supernova rate)'
396
- sechdr['TUNIT13'] = 'SN/yr (Type Ia Supernova rate)'
397
- sechdr['TUNIT14'] = 'SN/yr (Failed Supernova rate)'
398
- sechdr['TUNIT15'] = 'PN/yr (Planetary Nebula birth rate)'
399
- sechdr['TUNIT16'] = 'number/Mo (Number of Black holes)'
400
- sechdr['TUNIT17'] = 'number/Mo (Number of Neutron stars)'
401
- sechdr['TUNIT18'] = 'number/Mo (Number of White dwarfs)'
402
- sechdr['TUNIT19'] = 'Lo (X ray luminosity)'
403
-
404
- sechdr['TUNIT20'] = 'Mo (Mliv = Mass in living stars)'
405
- sechdr['TUNIT21'] = 'Mo (Mrem = Mass in stellar remnants)'
406
- sechdr['TUNIT22'] = 'Mo (Mgas = Mass of processed gas)'
407
- sechdr['TUNIT23'] = 'Mo (Mass of galaxy)'
408
- sechdr['TUNIT24'] = 'Mo/yr (Star formation rate)'
409
- sechdr['TUNIT25'] = 'Mo (Mtot = Mliv + Mrem)'
410
- sechdr['TUNIT26'] = 'Mo/Lo (Mtot/Light ratio B band)'
411
- sechdr['TUNIT27'] = 'Mo/Lo (Mtot/Light ratio V band)'
412
- sechdr['TUNIT28'] = 'Mo/Lo (Mtot/Light ratio K band)'
413
- sechdr['TUNIT29'] = 'Mo/Lo (Mliv/Light ratio B band)'
414
-
415
- sechdr['TUNIT30'] = 'Mo/Lo (Mliv/Light ratio V band)'
416
- sechdr['TUNIT31'] = 'Mo/Lo (Mliv/Light ratio K band)'
417
- sechdr['TUNIT32'] = 'Nstars/yr (Evolutionary flux)'
418
- sechdr['TUNIT33'] = 'Nstars/yr/Lo (Specific Evolutionary flux)'
419
- sechdr['TUNIT34'] = 'Mo (MS Turnoff mass)'
420
- sechdr['TUNIT35'] = '.......... (PostMS/MS bolometric flux)'
421
- sechdr['TUNIT36'] = 'M/Mo/yr (Total Mass Loss Rate)'
422
- sechdr['TUNIT37'] = 'M/Mo/yr (Total Dust Production Rate)'
423
-
424
- # Build fits compatible header for BINTABLE3 (photometry)
425
- sechdr = hdulist[3].header
426
- sechdr['TTYPE1'] = 'logage'
427
- sechdr['TUNIT1'] = 'yr (log age of SED)' # label for column 1
428
- sechdr['TUNIT2'] = 'Vega mag (Bolometric magnitude)' # label for column 2
429
- sechdr['TUNIT3'] = 'AB mag (FUV_GALEX_AB)' # label for column 3
430
- sechdr['TUNIT4'] = 'AB mag (ACSWFC_F220w_AB)' # label for column 4
431
- sechdr['TUNIT5'] = 'AB mag (NUV_GALEX_AB)' # label for column 5
432
- sechdr['TUNIT6'] = 'AB mag (WFC3_F225W_AB)' # label for column 6
433
- sechdr['TUNIT7'] = 'AB mag (UVIS1_f225w_AB)' # label for column 7
434
- sechdr['TUNIT8'] = 'AB mag (UVIS1_f275w_AB)' # label for column 8
435
- sechdr['TUNIT9'] = 'AB mag (ACSWFC_F250w_AB)' # label for column 9
436
- sechdr['TUNIT10'] = 'AB mag (ACSWFC_F330w_AB)' # label for column 10
437
- sechdr['TUNIT11'] = 'AB mag (UVIS1_f336w_AB)' # label for column 11
438
- sechdr['TUNIT12'] = 'AB mag (WFC3_F336W_AB)' # label for column 12
439
- sechdr['TUNIT13'] = 'AB mag (u_SDSS_AB)' # label for column 13
440
- sechdr['TUNIT14'] = 'Vega mag (U_Johnson)' # label for column 14
441
- sechdr['TUNIT15'] = 'AB mag (u3_CFHT_MC_AB)' # label for column 15
442
- sechdr['TUNIT16'] = 'AB mag (u1_CFHT_MC_AB)' # label for column 16
443
- sechdr['TUNIT17'] = 'AB mag (ACSWFC_F410w_AB)' # label for column 17
444
- sechdr['TUNIT18'] = 'AB mag (WFC3_FR388N_AB)' # label for column 18
445
- sechdr['TUNIT19'] = 'AB mag (ACSWFC_F435w_AB)' # label for column 19
446
- sechdr['TUNIT20'] = 'AB mag (WFC3_F438W_AB)' # label for column 20
447
- sechdr['TUNIT21'] = 'AB mag (UVIS1_f438w_AB)' # label for column 21
448
- sechdr['TUNIT22'] = 'Vega mag (B3_Johnson)' # label for column 22
449
- sechdr['TUNIT23'] = 'Vega mag (B2_Johnson)' # label for column 23
450
- sechdr['TUNIT24'] = 'AB mag (g_SDSS_AB)' # label for column 24
451
- sechdr['TUNIT25'] = 'AB mag (ACSWFC_F475w_AB)' # label for column 25
452
- sechdr['TUNIT26'] = 'AB mag (g3_CFHT_MC_AB)' # label for column 26
453
- sechdr['TUNIT27'] = 'AB mag (g1_CFHT_MC_AB)' # label for column 27
454
- sechdr['TUNIT28'] = 'AB mag (UVIS1_f555w_AB)' # label for column 28
455
- sechdr['TUNIT29'] = 'AB mag (WFC3_F555W_AB)' # label for column 29
456
- sechdr['TUNIT30'] = 'AB mag (ACSWFC_F555w_AB)' # label for column 30
457
- sechdr['TUNIT31'] = 'AB mag (UVIS1_f547m_AB)' # label for column 31
458
- sechdr['TUNIT32'] = 'Vega mag (V_Johnson)' # label for column 32
459
- sechdr['TUNIT33'] = 'AB mag (ACSWFC_F606w_AB)' # label for column 33
460
- sechdr['TUNIT34'] = 'AB mag (UVIS1_f606w_AB)' # label for column 34
461
- sechdr['TUNIT35'] = 'AB mag (r_SDSS_AB)' # label for column 35
462
- sechdr['TUNIT36'] = 'AB mag (r1_CFHT_MC_AB)' # label for column 36
463
- sechdr['TUNIT37'] = 'AB mag (UVIS1_f625w_AB)' # label for column 37
464
- sechdr['TUNIT38'] = 'AB mag (ACSWFC_F625w_AB)' # label for column 38
465
- sechdr['TUNIT39'] = 'AB mag (r3_CFHT_MC_AB)' # label for column 39
466
- sechdr['TUNIT40'] = 'AB mag (UVIS1_f656n_AB)' # label for column 40
467
- sechdr['TUNIT41'] = 'AB mag (UVIS1_f657n_AB)' # label for column 41
468
- sechdr['TUNIT42'] = 'AB mag (UVIS1_f658n_AB)' # label for column 42
469
- sechdr['TUNIT43'] = 'Vega mag (R_Cousins)' # label for column 43
470
- sechdr['TUNIT44'] = 'Vega mag (R_Johnson)' # label for column 44
471
- sechdr['TUNIT45'] = 'AB mag (i_SDSS_AB)' # label for column 45
472
- sechdr['TUNIT46'] = 'AB mag (i2_CFHT_MC_AB)' # label for column 46
473
- sechdr['TUNIT47'] = 'AB mag (i3_CFHT_MC_AB)' # label for column 47
474
- sechdr['TUNIT48'] = 'AB mag (ACSWFC_F775w_AB)' # label for column 48
475
- sechdr['TUNIT49'] = 'Vega mag (I_Cousins)' # label for column 49
476
- sechdr['TUNIT50'] = 'AB mag (UVIS1_f814w_AB)' # label for column 50
477
- sechdr['TUNIT51'] = 'AB mag (ACSWFC_F814w_AB)' # label for column 51
478
- sechdr['TUNIT52'] = 'AB mag (WFC3_F814W_AB)' # label for column 52
479
- sechdr['TUNIT53'] = 'Vega mag (I_Johnson)' # label for column 53
480
- sechdr['TUNIT54'] = 'AB mag (z1_CFHT_MC_AB)' # label for column 54
481
- sechdr['TUNIT55'] = 'AB mag (z_SDSS_AB)' # label for column 55
482
- sechdr['TUNIT56'] = 'AB mag (z3_CFHT_MC_AB)' # label for column 56
483
- sechdr['TUNIT57'] = 'AB mag (WFC3_F110W_AB)' # label for column 57
484
- sechdr['TUNIT58'] = 'Vega mag (J_2Mass)' # label for column 58
485
- sechdr['TUNIT59'] = 'Vega mag (J_Johnson)' # label for column 59
486
- sechdr['TUNIT60'] = 'AB mag (WFC3_F125W_AB)' # label for column 60
487
- sechdr['TUNIT61'] = 'Vega mag (J_Palomar)' # label for column 61
488
- sechdr['TUNIT62'] = 'AB mag (WFC3_F160W_AB)' # label for column 62
489
- sechdr['TUNIT63'] = 'Vega mag (H_Palomar)' # label for column 63
490
- sechdr['TUNIT64'] = 'AB mag (H_2MASS_AB)' # label for column 64
491
- sechdr['TUNIT65'] = 'Vega mag (H_2Massr)' # label for column 65
492
- sechdr['TUNIT66'] = 'Vega mag (Kprime_Cowie)' # label for column 66
493
- sechdr['TUNIT67'] = 'AB mag (Ks_CFHT_WC_AB)' # label for column 67
494
- sechdr['TUNIT68'] = 'Vega mag (Ks_2Mass)' # label for column 68
495
- sechdr['TUNIT69'] = 'Vega mag (K_Johnson)' # label for column 69
496
- sechdr['TUNIT70'] = 'Vega mag (K_Palomar)' # label for column 70
497
- sechdr['TUNIT71'] = 'Vega mag (L_Johnson)' # label for column 71
498
- sechdr['TUNIT72'] = 'Vega mag (I3p6_IRAC)' # label for column 72
499
- sechdr['TUNIT73'] = 'Vega mag (I4p5_IRAC)' # label for column 73
500
- sechdr['TUNIT74'] = 'Vega mag (I5p7_IRAC)' # label for column 74
501
- sechdr['TUNIT75'] = 'Vega mag (I7p9_IRAC)' # label for column 75
502
- sechdr['TUNIT76'] = 'Vega mag (I12_IRAS)' # label for column 76
503
- sechdr['TUNIT77'] = 'Vega mag (M24_MIPS)' # label for column 77
504
- sechdr['TUNIT78'] = 'Vega mag (I25_IRAS)' # label for column 78
505
- sechdr['TUNIT79'] = 'Vega mag (I60_IRAS)' # label for column 79
506
- sechdr['TUNIT80'] = 'Vega mag (M70_MIPS)' # label for column 80
507
- sechdr['TUNIT81'] = 'Vega mag (I100_IRAS)' # label for column 81
508
- sechdr['TUNIT82'] = 'Vega mag (M160_MIPS)' # label for column 82
509
-
510
- # Build fits compatible header for BINTABLE4 (line indices)
511
- sechdr = hdulist[4].header
512
- sechdr['TTYPE1'] = 'logage' # label for column 1
513
- sechdr['TTYPE2'] = 'CN1' # label for column 2
514
- sechdr['TTYPE3'] = 'CN2' # label for column 3
515
- sechdr['TTYPE4'] = 'Ca4227' # label for column 4
516
- sechdr['TTYPE5'] = 'G4300' # label for column 5
517
- sechdr['TTYPE6'] = 'Fe4383' # label for column 6
518
- sechdr['TTYPE7'] = 'Ca4455' # label for column 7
519
- sechdr['TTYPE8'] = 'Fe4531' # label for column 8
520
- sechdr['TTYPE9'] = 'Fe4668' # label for column 9
521
- sechdr['TTYPE10'] = 'Hbeta' # label for column 10
522
- sechdr['TTYPE11'] = 'Fe5015' # label for column 11
523
- sechdr['TTYPE12'] = 'Mg1' # label for column 12
524
- sechdr['TTYPE13'] = 'Mg2' # label for column 13
525
- sechdr['TTYPE14'] = 'Mgb' # label for column 14
526
- sechdr['TTYPE15'] = 'Fe5270' # label for column 15
527
- sechdr['TTYPE16'] = 'Fe5335' # label for column 16
528
- sechdr['TTYPE17'] = 'Fe5406' # label for column 17
529
- sechdr['TTYPE18'] = 'Fe5709' # label for column 18
530
- sechdr['TTYPE19'] = 'Fe5782' # label for column 19
531
- sechdr['TTYPE20'] = 'NaD' # label for column 20
532
- sechdr['TTYPE21'] = 'TiO1' # label for column 21
533
- sechdr['TTYPE22'] = 'TiO2' # label for column 22
534
- sechdr['TTYPE23'] = 'HdeltaA' # label for column 23
535
- sechdr['TTYPE24'] = 'HgammaA' # label for column 24
536
- sechdr['TTYPE25'] = 'HdeltaF' # label for column 25
537
- sechdr['TTYPE26'] = 'HgammaF' # label for column 26
538
- sechdr['TTYPE27'] = 'D4000' # label for column 27
539
- sechdr['TTYPE28'] = 'B4000VN' # label for column 28
540
- sechdr['TTYPE29'] = 'CaII8498' # label for column 29
541
- sechdr['TTYPE30'] = 'CaII8542' # label for column 30
542
- sechdr['TTYPE31'] = 'CaII8662' # label for column 31
543
- sechdr['TTYPE32'] = 'MgI8807' # label for column 32
544
- sechdr['TTYPE33'] = 'H83889' # label for column 33
545
- sechdr['TTYPE34'] = 'H93835' # label for column 34
546
- sechdr['TTYPE35'] = 'H103798' # label for column 35
547
- sechdr['TTYPE36'] = 'BHHK' # label for column 36
548
- sechdr['TTYPE37'] = 'BL1302' # label for column 37
549
- sechdr['TTYPE38'] = 'SiIV' # label for column 38
550
- sechdr['TTYPE39'] = 'BL1425' # label for column 39
551
- sechdr['TTYPE40'] = 'Fe1453' # label for column 40
552
- sechdr['TTYPE41'] = 'CIV1548a' # label for column 41
553
- sechdr['TTYPE42'] = 'CIV1548c' # label for column 42
554
- sechdr['TTYPE43'] = 'CIV1548e' # label for column 43
555
- sechdr['TTYPE44'] = 'BL1617' # label for column 44
556
- sechdr['TTYPE45'] = 'BL1664' # label for column 45
557
- sechdr['TTYPE46'] = 'BL1719' # label for column 46
558
- sechdr['TTYPE47'] = 'BL1853' # label for column 47
559
- sechdr['TTYPE48'] = 'FeII2402' # label for column 48
560
- sechdr['TTYPE49'] = 'BL2538' # label for column 49
561
- sechdr['TTYPE50'] = 'FeII2609' # label for column 50
562
- sechdr['TTYPE51'] = 'MgII' # label for column 51
563
- sechdr['TTYPE52'] = 'MgI' # label for column 52
564
- sechdr['TTYPE53'] = 'Mgwide' # label for column 53
565
- sechdr['TTYPE54'] = 'FeI' # label for column 54
566
- sechdr['TTYPE55'] = 'BL3096' # label for column 55
567
- sechdr['TTYPE56'] = 'CIVabs' # label for column 56
568
- sechdr['TTYPE57'] = 'HeIIems' # label for column 57
569
- sechdr['TUNIT1'] = 'yr (log age of SED)'
570
- sechdr['TUNIT2'] = 'mag (CN1 Lick index)'
571
- sechdr['TUNIT3'] = 'mag (CN2 Lick index)'
572
- sechdr['TUNIT4'] = 'A (Ca4227 Lick index)'
573
- sechdr['TUNIT5'] = 'A (G4300 Lick index)'
574
- sechdr['TUNIT6'] = 'A (Fe4383 Lick index)'
575
- sechdr['TUNIT7'] = 'A (Ca4455 Lick index)'
576
- sechdr['TUNIT8'] = 'A (Fe4531 Lick index)'
577
- sechdr['TUNIT9'] = 'A (Fe4668 Lick index)'
578
- sechdr['TUNIT10'] = 'A (Hbeta Lick index)'
579
- sechdr['TUNIT11'] = 'A (Fe5015 Lick index)'
580
- sechdr['TUNIT12'] = 'mag (Mg1 Lick index)'
581
- sechdr['TUNIT13'] = 'mag (Mg2 Lick index)'
582
- sechdr['TUNIT14'] = 'A (Mgb Lick index)'
583
- sechdr['TUNIT15'] = 'A (Fe5270 Lick index)'
584
- sechdr['TUNIT16'] = 'A (Fe5335 Lick index)'
585
- sechdr['TUNIT17'] = 'A (Fe5406 Lick index)'
586
- sechdr['TUNIT18'] = 'A (Fe5709 Lick index)'
587
- sechdr['TUNIT19'] = 'A (Fe5782 Lick index)'
588
- sechdr['TUNIT20'] = 'A (NaD Lick index)'
589
- sechdr['TUNIT21'] = 'mag (TiO1 Lick index)'
590
- sechdr['TUNIT22'] = 'mag (TiO2 Lick index)'
591
- sechdr['TUNIT23'] = 'A (Worthey & Ottaviani HdeltaA index)'
592
- sechdr['TUNIT24'] = 'A (Worthey & Ottaviani HgammaA index)'
593
- sechdr['TUNIT25'] = 'A (Worthey & Ottaviani HdeltaF index)'
594
- sechdr['TUNIT26'] = 'A (Worthey & Ottaviani HgammaF index)'
595
- sechdr['TUNIT27'] = ' (Gorgas & Cardiel 4000 A break index)'
596
- sechdr['TUNIT28'] = ' (Very narrow 4000 A break index)'
597
- sechdr['TUNIT29'] = 'A (Diaz & Terlevich**2 CaII8498 index)'
598
- sechdr['TUNIT30'] = 'A (Diaz & Terlevich**2 CaII8542 index)'
599
- sechdr['TUNIT31'] = 'A (Diaz & Terlevich**2 CaII8662 index)'
600
- sechdr['TUNIT32'] = 'A (Diaz & Terlevich**2 MgI8807 index)'
601
- sechdr['TUNIT33'] = 'A (Marcillac et al. H83889 index)'
602
- sechdr['TUNIT34'] = 'A (Marcillac et al. H93835 index)'
603
- sechdr['TUNIT35'] = 'A (Marcillac et al. H103798 index)'
604
- sechdr['TUNIT36'] = 'A (Brodie & Hanes HK index)'
605
- sechdr['TUNIT37'] = 'A (Fanelli et al. BL1302 index)'
606
- sechdr['TUNIT38'] = 'A (Fanelli et al. SiIV index)'
607
- sechdr['TUNIT39'] = 'A (Fanelli et al. BL1425 index)'
608
- sechdr['TUNIT40'] = 'A (Fanelli et al. Fe1453 index)'
609
- sechdr['TUNIT41'] = 'A (Fanelli et al. CIV1548a index)'
610
- sechdr['TUNIT42'] = 'A (Fanelli et al. CIV1548c index)'
611
- sechdr['TUNIT43'] = 'A (Fanelli et al. CIV1548e index)'
612
- sechdr['TUNIT44'] = 'A (Fanelli et al. BL1617 index)'
613
- sechdr['TUNIT45'] = 'A (Fanelli et al. BL1664 index)'
614
- sechdr['TUNIT46'] = 'A (Fanelli et al. BL1719 index)'
615
- sechdr['TUNIT47'] = 'A (Fanelli et al. BL1853 index)'
616
- sechdr['TUNIT48'] = 'A (Fanelli et al. FeII2402 index)'
617
- sechdr['TUNIT49'] = 'A (Fanelli et al. BL2538 index)'
618
- sechdr['TUNIT50'] = 'A (Fanelli et al. FeII2609 index)'
619
- sechdr['TUNIT51'] = 'A (Fanelli et al. MgII index)'
620
- sechdr['TUNIT52'] = 'A (Fanelli et al. MgI index)'
621
- sechdr['TUNIT53'] = 'A (Fanelli et al. Mgwide index)'
622
- sechdr['TUNIT54'] = 'A (Fanelli et al. FeI index)'
623
- sechdr['TUNIT55'] = 'A (Fanelli et al. BL3096 index)'
624
- sechdr['TUNIT56'] = 'A (CIV 1540 A stellar absorption line index)'
625
- sechdr['TUNIT57'] = 'A (HeII 1640 A stellar emission line index)'
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- # Rebuilds headers of BC/CB model fits file
4
- import os
5
- import sys
6
- import warnings
7
- from astropy.table import Table
8
- from astropy.io import fits
9
- from astropy.utils.exceptions import AstropyWarning
10
-
11
- # Read fits table with BC models
12
- with fits.open(str(sys.argv[1])) as hdul:
13
- warnings.simplefilter('ignore', category=AstropyWarning)
14
- #f = Table.read(hdul,hdu=1) # hdu = 1 => SED's (luminosity vs. wavelength)
15
- #p = Table.read(hdul,hdu=2) # hdu = 2 => galaxy physical properties
16
- #m = Table.read(hdul,hdu=3) # hdu = 3 => photometric magnitude in different bands
17
- #d = Table.read(hdul,hdu=4) # hdu = 4 => line spectral indices
18
- t = Table.read(hdul,hdu=5) # hdu = 5 => time scale for spectral evolution (221 steps)
19
- t = t['age-yr'] # time scale without pre MS evolution (agrees with t for BC03 and C&B models)
20
-
21
- print("# Build fits compatible header for BINTABLE1 (model age)")
22
- print()
23
- print("sechdr = hdulist[1].header")
24
-
25
- # Build fits compatible header for BINTABLE1 (model age)
26
- sechdr = hdul[1].header
27
- for i in range(len(t)+1):
28
- if i==0:
29
- s = 'Wavelength'
30
- u = 'A (Wavelength)'
31
- else:
32
- c = t[i-1]
33
- if c < 10.E9:
34
- s = str('{:.5E}'.format(c))
35
- else:
36
- s = str('{:.4f}'.format(c*1.E-9)) + "E9"
37
- s = s.replace("E+0", "E")
38
- u = 'Lo/A (SED at t = ' + s + ' yr)'
39
- s = s.replace(".", "p")
40
- s = 't' + s
41
- s = "sechdr['TTYPE" + str(i+1) + "'] = '" + s + "'" # label for column i+1
42
- u = "sechdr['TUNIT" + str(i+1) + "'] = '" + u + "'" # units for column i+1
43
- print(s)
44
- print(u)
45
-
46
- print()
47
- print("# Write fits file")
48
- print("hdulist.writeto('newdata.fits')")
@@ -1,15 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: chanter
3
- Version: 0.0.2
4
- Summary: A very simple galaxy spectrum modeller
5
- Author-email: Struan Stevenson <struan.stevenson@ed.ac.uk>
6
- Requires-Python: >=3.12
7
- Description-Content-Type: text/markdown
8
- Requires-Dist: numpy
9
- Requires-Dist: astropy
10
- Requires-Dist: nautilus-sampler
11
- Requires-Dist: spectres
12
- Requires-Dist: matplotlib
13
- Requires-Dist: os
14
-
15
- # Chanter
@@ -1,16 +0,0 @@
1
- chanter/__init__.py,sha256=BDOShvS6R5VpS_iI7FErrUklA9lD34k5ZoEtacycoIg,98
2
- chanter/galaxy_fitter.py,sha256=JYDRc-iW5ZgDHprw4FCshrsBnG8ENvs3MEDNUtlFYxQ,3683
3
- chanter/model_galaxy.py,sha256=IgW93DlW0H9KLBNgh6SeyNSIqgHSwctsCUk4G5oHAc8,7830
4
- chanter/utils/__init__.py,sha256=hn-ho-lJeT0evKXL1tV5jX0cR4meSlJmPcdxC49cLok,34
5
- chanter/utils/filter_set.py,sha256=EITLa2c3FG3n1-v7KatKRwHCRyfZ4TTjsi_WM7Bz64k,6819
6
- chanter/utils/make_igm_grid.py,sha256=s9NeRmgOsj_OxvxXixIdPSSQZPlsLcPedIRr4soZUcU,10304
7
- chanter/utils/make_ssp_grid/csv_to_fits.py,sha256=zPb4yFrpN9_YNuXwSIY7WJoknPpIx0tzhWYfCBtWvCw,1148
8
- chanter/utils/make_ssp_grid/get_ssp.py,sha256=Rr-TaxYaW9BzuQ8i2X75XPwNKLq97h-kl7p3yXhS1aA,991
9
- chanter/utils/make_ssp_grid/load_fits_test.py,sha256=rX5IN6hV_yN2dlNEdy5JsMnpxA1Dk-Tk2A8irvxqb2Q,183
10
- chanter/utils/make_ssp_grid/ascii_files/bintoascii.py,sha256=y-AhZB_hi7K9aXbSMvojLEZDH61cE3itOKAJxl74sQ8,189
11
- chanter/utils/make_ssp_grid/raw_files/bc03/src/rebuildfitsheader.py,sha256=aIWLJPcZIb0gBMd4vcruEATIc2s4bDojybu_dI2noYg,39734
12
- chanter/utils/make_ssp_grid/raw_files/bc03/src/rebuildtimeheader.py,sha256=CBJR7Y-yieZUjMM4dXfBweYRGo7jyMZWKRPFJoUWlSs,1732
13
- chanter-0.0.2.dist-info/METADATA,sha256=eavNNNJ_WjbwG2hqnsEpUjCICkla3j20F9iAKZA0apM,377
14
- chanter-0.0.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
15
- chanter-0.0.2.dist-info/top_level.txt,sha256=Q23dLK1syz0D-XIZ6zeY6TOZ7BQsC-BLqRiVQE7_udk,8
16
- chanter-0.0.2.dist-info/RECORD,,