├── .gitignore ├── LICENSE ├── README.md ├── cloudyfsps ├── ASCIItools.py ├── __init__.py ├── astrodata │ ├── SokarClusters.py │ ├── __init__.py │ ├── data │ │ ├── WRclusters.dat │ │ ├── dopita_lines.dat │ │ ├── izotov.dat │ │ ├── sdss_data_ls.npz │ │ ├── vanzee_abund.dat │ │ └── vanzee_lines.dat │ ├── dopita.py │ ├── kewley.py │ ├── sdss.py │ └── vanzee.py ├── cloudyInputTools.py ├── cloudyOutputTools.py ├── data │ ├── FSPSlam.dat │ ├── cloudyLines.dat │ ├── cloudyLinesEXT.dat │ ├── emlines.dat │ ├── orderedLines.dat │ ├── orderedLinesEXT.dat │ ├── readme.dat │ ├── refLines.dat │ └── refLinesEXT.dat ├── generalTools.py ├── nebAbundTools.py ├── outObj.py ├── outputFormatting.py ├── plotting │ └── __init__.py └── readme.dat ├── demos ├── demo_plots.py ├── exampleCloudyGrid.py ├── fbhb.py └── generateCloudyBinaryFile.py ├── scripts ├── runCloudy.py └── runCloudy.sh └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *.py~ 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | 47 | # Translations 48 | *.mo 49 | *.pot 50 | 51 | # Django stuff: 52 | *.log 53 | 54 | # Sphinx documentation 55 | docs/_build/ 56 | 57 | # PyBuilder 58 | target/ 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Nell 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of cloudy-fsps nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cloudyfsps 2 | 3 | Python interface between FSPS and Cloudy. 4 | 5 | **Read the documentation:** [nell-byler.github.io/cloudyfsps](http://nell-byler.github.io/cloudyfsps/) 6 | 7 | If you use this code, follow the citation requirements [on the FSPS homepage](https://github.com/cconroy20/fsps) and reference these Python bindings: 8 | 9 | [![DOI](https://zenodo.org/badge/47210025.svg)](https://zenodo.org/badge/latestdoi/47210025) 10 | 11 | **For BibTex, cite with:** 12 | ``` 13 | @MISC{nell_byler_2018_1156412, 14 | author = {{Byler}, N.}, 15 | title = {cloudyFSPS}, 16 | version = {1.0.0}, 17 | publisher = {Zenodo}, 18 | month = jan, 19 | year = 2018, 20 | doi = {10.5281/zenodo.1156412}, 21 | url = {https://doi.org/10.5281/zenodo.1156412} 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /cloudyfsps/ASCIItools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import (division, print_function, absolute_import, 4 | unicode_literals) 5 | from builtins import object 6 | 7 | __all__ = ["writeASCII", "compileASCII", "checkCompiled", "compiledExists"] 8 | 9 | import os 10 | import numpy as np 11 | import fsps 12 | import subprocess 13 | from .generalTools import grouper 14 | 15 | try: 16 | CLOUDY_EXE = os.environ['CLOUDY_EXE'] 17 | except KeyError: 18 | print('Must have set system environment CLOUDY_EXE') 19 | 20 | try: 21 | # taking the last in path, if more than one directory given 22 | CLOUDY_DATA_PATH = os.environ['CLOUDY_DATA_PATH'].split(':')[-1] 23 | except KeyError: 24 | print('Cloudy data path not set. Assuming standard cloudy structure') 25 | CLOUDY_DATA_PATH = '/'.join(CLOUDY_EXE.split('/')[:-2])+'/data' 26 | 27 | class writeASCII(object): 28 | ''' 29 | Print FSPS data into ascii files readable by CLOUDY 30 | Calling sequence: 31 | writeASCII('outfile.ascii', lam_arr, spec_arr, model_arr, **kwargs) 32 | Dictionary with header information - change any of these values by 33 | inputting them as kwargs. 34 | ''' 35 | def __init__(self, outfile, lam, flu, modpars, **kwargs): 36 | self.nom_dict = {'nmod': 94, 'ndim': 1, 'npar':1, 'nx':1963, 37 | 'x':'lambda', 'conv1':1.0, 'peraa':False, 38 | 'conv2':3.839e33, 'par1':'age', 'par2':'logz'} 39 | self.init_pars(**kwargs) 40 | self.file = open('/'.join([CLOUDY_DATA_PATH,outfile]), 'w') 41 | self.write_header(modpars) 42 | self.write_body(lam, flu, modpars) 43 | self.file.close() 44 | 45 | def init_pars(self, **kwargs): 46 | for key, value in list(kwargs.items()): 47 | self.nom_dict[key] = value 48 | if self.nom_dict['peraa']: 49 | self.nom_dict['f_type'] = 'F_lambda' 50 | else: 51 | self.nom_dict['f_type'] = 'F_nu' 52 | 53 | def write_header(self, modpars): 54 | ''' 55 | Header for cloudy ascii files 56 | ''' 57 | self.file.write(" 20060612\n") 58 | self.file.write(" %i\n" %self.nom_dict['ndim']) 59 | self.file.write(" %i\n" %self.nom_dict['npar']) 60 | self.file.write(" %s\n" %self.nom_dict['par1']) #first param 61 | if self.nom_dict['npar'] > 1: 62 | self.file.write(" %s\n" %self.nom_dict['par2']) #second param 63 | self.file.write(" %i\n" %self.nom_dict['nmod']) #total number of mods 64 | self.file.write(" %i\n" %self.nom_dict['nx']) #number of lam pts 65 | self.file.write(" %s\n" %self.nom_dict['x']) #lambda or freq 66 | self.file.write(" %.8e\n" %self.nom_dict['conv1']) #AA or Hz 67 | self.file.write(" %s\n" %self.nom_dict['f_type'])#F_lam or F_nu 68 | self.file.write(" %.8e\n" %self.nom_dict['conv2'])#units 69 | for chunk in grouper(4, modpars): 70 | if self.nom_dict['npar'] > 1: 71 | self.file.write(" " + " ".join("{0:<8.2e}{1:>10.2e}".format(x[0], x[1]) for x in chunk) + "\n") 72 | else: 73 | self.file.write(" " + " ".join("{0:>4.2e}".format(x) for x in chunk) + "\n") 74 | 75 | def write_data(self, array): 76 | ''' 77 | write array with 5 items per line in format 1.0000e+00 78 | ''' 79 | for chunk in grouper(5, array): 80 | self.file.write(" " + " ".join("%1.7e" %x for x in chunk) + "\n") 81 | def write_body(self, lam, flu, modpars): 82 | self.write_data(lam) 83 | flu[(flu < 0.0)] = 0.0 84 | [self.write_data(fl) for fl in flu] 85 | 86 | def compileASCII(ascii_file, **kwargs): 87 | comp_file = CLOUDY_DATA_PATH+'/compile.in' 88 | f = open(comp_file, 'w') 89 | f.write('compile stars "{}"\n'.format(ascii_file)) 90 | f.close() 91 | to_run = 'cd {} ; {} compile.in'.format(CLOUDY_DATA_PATH, CLOUDY_EXE) 92 | print('compiling {}'.format(ascii_file)) 93 | proc = subprocess.Popen(to_run, shell=True) 94 | proc.communicate() 95 | 96 | def checkCompiled(ascii_file, **kwargs): 97 | ''' 98 | checks to make sure ascii_file.mod exists and that 99 | the words "Cloudy exited OK' are in compile.out 100 | ''' 101 | out_file = CLOUDY_DATA_PATH+'/compile.out' 102 | f = open(out_file, 'r') 103 | content = f.readlines() 104 | f.close() 105 | comp_mod = '{}/{}.mod'.format(CLOUDY_DATA_PATH, ascii_file.split('.')[0]) 106 | check = np.all(['OK' in content[-1], 107 | os.path.exists(comp_mod)]) 108 | return check 109 | 110 | def compiledExists(filename): 111 | if filename.split('.')[-1] == 'mod': 112 | return os.path.exists('/'.join([CLOUDY_DATA_PATH, filename])) 113 | else: 114 | return os.path.exists('/'.join([CLOUDY_DATA_PATH, filename.split('.')[0]+'.mod'])) 115 | -------------------------------------------------------------------------------- /cloudyfsps/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | 7 | import os 8 | try: 9 | __CLOUDY_EXE__ = os.environ["CLOUDY_EXE"] 10 | except KeyError: 11 | raise ImportError("You need to have the CLOUDY_EXE environment variable") 12 | 13 | __version__ = "0.1" 14 | 15 | __all__ = ["generalTools", "cloudyInputTools", "ASCIItools", "cloudyOutputTools", "outputFormatting", "nebAbundTools", "outObj"] 16 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/SokarClusters.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | __all__ = ["plot_bpt", "plot_NO"] 7 | 8 | import numpy as np 9 | import matplotlib.pyplot as plt 10 | import pkg_resources 11 | 12 | def get_cluster_lines(cluster_type='WR'): 13 | ''' 14 | returns data, with column names 15 | temp, logO, logOerr, logNO, logNOerr 16 | T(O++), log(O/H), log(N/O) 17 | ''' 18 | if cluster_type == 'WR': 19 | fl = "data/WRclusters.dat" 20 | else: 21 | fl = "data/nonWRclusters.dat" 22 | filename = pkg_resources.resource_filename(__name__, fl) 23 | 24 | data = np.genfromtxt(linefile, dtype=None, names=True, 25 | delimiter='\t', skip_header=4) 26 | n_col = len(dat[0]) 27 | names = [dat.dtype.names[i] for i in range(1,n_col-1)] 28 | linelam = [float(dat[0][i]) for i in range(1,n_col-1)] 29 | lines = {} 30 | for name in names: 31 | sarr = dat[name][1::] 32 | farr = np.array([float(x.split('(')[0]) 33 | if x.split('(')[0] != ' ... ' 34 | else -99.9 35 | for x in sarr]) 36 | lines[name] = farr 37 | return (linelam, names, lines) 38 | 39 | def return_ratio(numerator=['NII_6584', 'NII_6548'], denominator='Ha', 40 | lines): 41 | tops = np.sum([lines[n] for n in numerator], axis=0) 42 | bottoms = lines[denominator] 43 | return np.log10(tops/bottoms) 44 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | 7 | __all__ = ["vanzee", "dopita", "sdss", "kewley"] 8 | 9 | #import vanzee 10 | #import dopita 11 | #import sdss 12 | #import kewley 13 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/data/WRclusters.dat: -------------------------------------------------------------------------------- 1 | Table 9 2 | Emission Line Fluxes for WR Clusters 3 | Note: The extinction corrected flux of measured emission lines in comparison to Hbeta, given in the last column with units of 10-15 erg cm-2 s-1. 4 | 5 | Source OII_3727 Hdelta Hgamma OIII_4363 OIII_4959 OIII_5007 NII_6548 Halpha NII_6584 SII_6717 SII_6732 OII_7319 OII_7330 Hbeta 6 | lam 3727 4102 4341 4363 4959 5007 6548 6563 6584 6717 6732 7319 7330 4861 7 | N2366-Obj 10 45 (4) 23 (2) 46 (4) 15 (1) 238 (20) 705 (60) 0.8 (0.1) 292 (24) 2.0 (0.2) 3.6 (0.3) 3.4 (0.3) 1.0 (0.1) 0.8 (0.1) 590 (50) 8 | N2366-Obj 11 69 (10) 23 (3) 39 (5) 12 (2) 205 (25) 707 (87) 1.1 (0.2) 305 (33) 2.6 (0.3) 5.2 (0.6) 3.9 (0.5) 1.1 (0.3) 1.5 (0.5) 225 (28) 9 | N4214-Obj 13 277 (41) 22 (3) 46 (6) 2.0 (0.4) 97 (12) 292 (36) 7.2 (0.8) 274 (30) 20 (2) 19 (2) 14 (2) 3.0 (0.5) 2.6 (0.5) 80.8 (10.2) 10 | N4214-Obj 14 219 (37) 23 (4) 45 (7) 2.8 (0.5) 108 (15) 326 (45) 6.1 (0.7) 245 (29) 20 (2) 18 (2) 14 (2) 2.9 (0.4) 2.8 (0.4) 133 (19) 11 | N4214-Obj 15/16 248 (27) 30 (3) 46 (5) 3.8 (0.4) 145 (14) 316 (31) 6.1 (0.6) 296 (27) 21 (2) 20 (2) 14 (1) 2.8 (0.3) 3.2 (0.4) 194 (19) 12 | N4449-Obj 4 327 (77) 16 (4) 34 (7) 7 (2) 92 (17) 240 (45) 13 (2) 312 (49) 33 (5) 34 (6) 26 (4) 11 (3) ... 34.1 (6.6) 13 | N4449-Obj 18 316 (36) 26 (3) 48 (5) 2.2 (0.3) 54 (5) 170 (17) 10.2 (1.0) 268 (25) 29 (3) 27 (3) 18 (2) 2.8 (0.5) 2.8 (0.6) 30.7 (3.1) 14 | N4449-Obj 22 417 (96) 29 (6) 57 (12) 6 (1) 69 (13) 190 (35) 10 (2) 304 (47) 35 (5) 51 (8) 36 (5) 6 (1) 3.6 (0.7) 24.0 (4.5) 15 | N4449-Obj 26 204 (19) 24 (2) 46 (4) 2.1 (0.2) 126 (11) 376 (32) 5.3 (0.4) 294 (24) 16 (1) 16 (1) 12 (1) 2.4 (0.2) 2.1 (0.2) 289 (25) 16 | N6946-Obj 13 195 (73) 22 (7) 43 (14) ... 28 (8) 84 (24) 41 (10) 457 (109) 128 (31) 57 (13) 41 (10) 3.4 (0.8) 2.8 (0.7) 14.6 (4.4) 17 | N6946-Obj 48 129 (49) 23 (8) 42 (14) 3 (1) 13 (4) 43 (13) 75 (18) 452 (110) 232 (56) 67 (16) 68 (16) 7 (2) 5 (1) 12.6 (3.9) 18 | N6946-Obj 110 197 (71) 24 (8) 43 (14) 1.6 (0.6) 69 (20) 212 (60) 35 (8) 486 (113) 107 (25) 52 (12) 40 (9) 4.2 (1.0) 4 (1) 28.9 (8.4) 19 | N6946-Obj 115 179 (39) 25 (5) 44 (8) 1.9 (0.5) 25 (4) 76 (13) 43 (6) 480 (71) 159 (23) 51 (7) 37 (5) 2.7 (0.7) 2.0 (0.6) 11.0 (2.0) 20 | N6946-Obj 117 218 (62) 23 (6) 46 (12) 5 (1) 51 (12) 156 (35) 30 (6) 395 (74) 91 (17) 39 (7) 36 (7) 3.3 (0.6) 3.5 (0.7) 18.3 (4.2) 21 | M 51-Obj 46 49 (5) 26 (2) 47 (4) ... 2.0 (0.2) 6.0 (0.5) 43 (4) 369 (31) 129 (11) 28 (2) 22 (2) 0.9 (0.2) ... 70.6 (6.3) 22 | M 51-Obj 57 157 (46) 24 (6) 45 (12) 2.0 (0.5) 27 (6) 82 (19) 56 (11) 413 (79) 174 (33) 33 (6) 27 (5) 1.9 (0.5) 1.1 (0.3) 7.18 (1.70) 23 | M 51-Obj 73 216 (112) 29 (14) 50 (23) 1.0 (0.7) 9 (4) 30 (12) 49 (16) 343 (112) 152 (50) 47 (15) 37 (12) 4 (1) ... 14.1 (5.9) 24 | M 51-Obj 94 160 (61) 28 (10) 49 (16) 1.1 (0.4) 7 (2) 20 (6) 47 (11) 333 (81) 138 (34) 28 (7) 20 (5) 0.7 (0.3) 0.6 (0.3) 17.7 (5.4) 25 | M 51-Obj 100 109 (9) 26 (2) 46 (4) 0.9 (0.2) 7.2 (0.6) 22 (2) 54 (4) 401 (31) 161 (12) 31 (2) 26 (2) 0.9 (0.3) 0.7 (0.2) 207 (16) 26 | M 51-Obj 101 148 (13) 26 (2) 47 (4) 2.8 (0.3) 11.8 (1.0) 36 (3) 48 (4) 350 (28) 142 (11) 24 (2) 18 (1) 0.6 (0.3) 0.6 (0.2) 12.5 (1.0) 27 | M 51-Obj 103 181 (51) 24 (6) 45 (11) 3.1 (0.8) 20 (5) 64 (15) 66 (12) 484 (90) 200 (37) 44 (8) 32 (6) 1.9 (0.4) 1.4 (0.4) 8.78 (2.02) 28 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/data/dopita_lines.dat: -------------------------------------------------------------------------------- 1 | # 2 | # VizieR Astronomical Server vizier.cfa.harvard.edu 3 | # Date: 2015-12-07T21:20:05 [V1.99+ (14-Oct-2013)] 4 | # In case of problem, please report to: cds-question@unistra.fr 5 | # 6 | # 7 | #Coosys J2000: eq_FK5 J2000 8 | #INFO votable-version=1.99+ (14-Oct-2013) 9 | #INFO -ref=VIZ5665f73e2bf6 10 | #INFO -out.max=unlimited 11 | #INFO queryParameters=18 12 | #-oc.form=dec 13 | #-out.max=unlimited 14 | #-nav=cat:J/ApJS/208/10&tab:{J/ApJS/208/10/model}&key:source=J/ApJS/208/10/model&HTTPPRM:& 15 | #-source=J/ApJS/208/10/model 16 | #-order=I 17 | #-out=Z 18 | #-out=kappa 19 | #-out=logq 20 | #-out=O2-3727 21 | #-out=O2-3729 22 | #-out=O3-4959 23 | #-out=O3-5007 24 | #-out=O1-6300 25 | #-out=N2-6548 26 | #-out=Ha 27 | #-out=N2-6584 28 | #-out=S2-6717 29 | #-out=S2-6731 30 | # 31 | 32 | #RESOURCE=yCat_22080010 33 | #Name: J/ApJS/208/10 34 | #Title: Effects of a {kappa}-distribution in HII regions (Dopita+, 2013) 35 | #Table J_ApJS_208_10_model: 36 | #Name: J/ApJS/208/10/model 37 | #Title: Line fluxes (relative to H{beta}=1.0) and temperatures given by the MAPPINGS 4 models {\em(tables 4--6 of paper)} 38 | #Column Z (F5.2) [0.05/5] Model metallicity (relative to Sun) [ucd=phys.abund.Z;meta.modelled] 39 | #Column kappa (I2) [10/50]? Model {kappa} value (blank values mean {\bf{infinity}}) [NULL integer written as an empty string] [ucd=stat.param] 40 | #Column logq (F5.2) [6.5/8.5] Model ionization parameter (G1) [ucd=stat.param] 41 | #Column O2-3727 (F7.4) The [O II] 3727{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 42 | #Column O2-3729 (F7.4) The [O II] 3729{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 43 | #Column O3-4959 (F7.4) The [O III] 4959 line flux (1) [ucd=spect.line.intensity;arith.ratio] 44 | #Column O3-5007 (F7.4) The [O III] 5007 line flux (1) [ucd=spect.line.intensity;arith.ratio] 45 | #Column O1-6300 (F7.4) The [O I] 6300{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 46 | #Column N2-6548 (F7.4) The [N II] 6548{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 47 | #Column Ha (F7.4) The H{alpha} line flux (1) [ucd=spect.line.intensity;arith.ratio] 48 | #Column N2-6584 (F7.4) The [N II] 6584{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 49 | #Column S2-6717 (F7.4) The [S II] 6717{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 50 | #Column S2-6731 (F7.4) The [S II] 6731{AA} line flux (1) [ucd=spect.line.intensity;arith.ratio] 51 | #Z;kappa;logq;O2-3727;O2-3729;O3-4959;O3-5007;O1-6300;N2-6548;Ha;N2-6584;S2-6717;S2-6731 52 | #Sun; ;[m/s]; ; ; ; ; ; ; ; ; ; 53 | #-----;--;-----;-------;-------;-------;-------;-------;-------;-------;-------;-------;------- 54 | 5.00; ; 8.50; 0.0105; 0.0148; 0.0021; 0.0061; 0.0012; 0.0565; 3.3420; 0.1661; 0.0267; 0.0188 55 | 5.00; ; 8.25; 0.0067; 0.0095; 0.0014; 0.0039; 0.0010; 0.0472; 3.3210; 0.1387; 0.0259; 0.0182 56 | 5.00; ; 8.00; 0.0048; 0.0068; 0.0010; 0.0029; 0.0010; 0.0429; 3.2950; 0.1263; 0.0277; 0.0194 57 | 5.00; ; 7.75; 0.0039; 0.0055; 0.0008; 0.0023; 0.0011; 0.0422; 3.2730; 0.1243; 0.0322; 0.0226 58 | 5.00; ; 7.50; 0.0030; 0.0043; 0.0006; 0.0017; 0.0012; 0.0416; 3.2580; 0.1223; 0.0375; 0.0263 59 | 5.00; ; 7.25; 0.0019; 0.0027; 0.0003; 0.0010; 0.0011; 0.0355; 3.2660; 0.1044; 0.0378; 0.0266 60 | 5.00; ; 7.00; 0.0008; 0.0012; 0.0001; 0.0004; 0.0008; 0.0235; 3.3000; 0.0692; 0.0298; 0.0210 61 | 5.00; ; 6.75; 0.0003; 0.0004; 0.0000; 0.0001; 0.0005; 0.0124; 3.3670; 0.0365; 0.0187; 0.0132 62 | 5.00; ; 6.50; 0.0000; 0.0001; 0.0000; 0.0000; 0.0002; 0.0035; 3.4790; 0.0103; 0.0065; 0.0046 63 | 5.00;50; 8.50; 0.0204; 0.0285; 0.0036; 0.0104; 0.0015; 0.0683; 3.3460; 0.2009; 0.0318; 0.0224 64 | 5.00;50; 8.25; 0.0143; 0.0200; 0.0025; 0.0073; 0.0013; 0.0592; 3.3250; 0.1741; 0.0318; 0.0223 65 | 5.00;50; 8.00; 0.0113; 0.0159; 0.0020; 0.0058; 0.0013; 0.0560; 3.3010; 0.1647; 0.0351; 0.0246 66 | 5.00;50; 7.75; 0.0098; 0.0138; 0.0017; 0.0048; 0.0015; 0.0570; 3.2790; 0.1677; 0.0420; 0.0295 67 | 5.00;50; 7.50; 0.0085; 0.0120; 0.0013; 0.0037; 0.0017; 0.0579; 3.2640; 0.1704; 0.0502; 0.0353 68 | 5.00;50; 7.25; 0.0062; 0.0086; 0.0007; 0.0021; 0.0017; 0.0516; 3.2730; 0.1518; 0.0529; 0.0372 69 | 5.00;50; 7.00; 0.0034; 0.0047; 0.0003; 0.0008; 0.0014; 0.0368; 3.3060; 0.1083; 0.0449; 0.0317 70 | 5.00;50; 6.75; 0.0015; 0.0021; 0.0001; 0.0002; 0.0009; 0.0208; 3.3730; 0.0613; 0.0303; 0.0215 71 | 5.00;50; 6.50; 0.0003; 0.0004; 0.0000; 0.0000; 0.0004; 0.0070; 3.4820; 0.0207; 0.0125; 0.0089 72 | 5.00;20; 8.50; 0.0437; 0.0602; 0.0075; 0.0216; 0.0019; 0.0862; 3.3520; 0.2536; 0.0394; 0.0278 73 | 5.00;20; 8.25; 0.0338; 0.0467; 0.0056; 0.0161; 0.0018; 0.0782; 3.3330; 0.2299; 0.0408; 0.0288 74 | 5.00;20; 8.00; 0.0296; 0.0408; 0.0047; 0.0137; 0.0018; 0.0777; 3.3090; 0.2287; 0.0471; 0.0331 75 | 5.00;20; 7.75; 0.0281; 0.0386; 0.0041; 0.0117; 0.0021; 0.0821; 3.2890; 0.2415; 0.0581; 0.0408 76 | 5.00;20; 7.50; 0.0268; 0.0366; 0.0031; 0.0090; 0.0025; 0.0864; 3.2750; 0.2542; 0.0717; 0.0504 77 | 5.00;20; 7.25; 0.0235; 0.0319; 0.0019; 0.0056; 0.0028; 0.0841; 3.2800; 0.2474; 0.0819; 0.0577 78 | 5.00;20; 7.00; 0.0153; 0.0205; 0.0008; 0.0022; 0.0025; 0.0643; 3.3150; 0.1891; 0.0749; 0.0530 79 | 5.00;20; 6.75; 0.0074; 0.0096; 0.0002; 0.0006; 0.0018; 0.0381; 3.3820; 0.1121; 0.0533; 0.0379 80 | 5.00;20; 6.50; 0.0021; 0.0026; 0.0000; 0.0001; 0.0010; 0.0151; 3.4900; 0.0445; 0.0255; 0.0183 81 | 5.00;10; 8.50; 0.1030; 0.1361; 0.0193; 0.0558; 0.0026; 0.1130; 3.3670; 0.3324; 0.0511; 0.0364 82 | 5.00;10; 8.25; 0.0900; 0.1183; 0.0159; 0.0460; 0.0025; 0.1096; 3.3500; 0.3225; 0.0558; 0.0396 83 | 5.00;10; 8.00; 0.0876; 0.1137; 0.0142; 0.0410; 0.0027; 0.1158; 3.3270; 0.3406; 0.0677; 0.0479 84 | 5.00;10; 7.75; 0.0906; 0.1158; 0.0122; 0.0353; 0.0032; 0.1274; 3.3090; 0.3749; 0.0862; 0.0610 85 | 5.00;10; 7.50; 0.0934; 0.1181; 0.0091; 0.0262; 0.0040; 0.1387; 3.2980; 0.4079; 0.1097; 0.0776 86 | 5.00;10; 7.25; 0.0887; 0.1110; 0.0053; 0.0153; 0.0049; 0.1396; 3.3060; 0.4107; 0.1303; 0.0922 87 | 5.00;10; 7.00; 0.0660; 0.0796; 0.0021; 0.0061; 0.0050; 0.1155; 3.3390; 0.3399; 0.1296; 0.0921 88 | 5.00;10; 6.75; 0.0368; 0.0407; 0.0006; 0.0017; 0.0042; 0.0767; 3.4030; 0.2257; 0.1031; 0.0739 89 | 5.00;10; 6.50; 0.0126; 0.0116; 0.0001; 0.0003; 0.0027; 0.0368; 3.5050; 0.1084; 0.0586; 0.0427 90 | 3.00; ; 8.50; 0.2716; 0.3893; 0.1242; 0.3591; 0.0113; 0.1468; 3.1290; 0.4318; 0.0999; 0.0694 91 | 3.00; ; 8.25; 0.2880; 0.4139; 0.1162; 0.3358; 0.0124; 0.1674; 3.1080; 0.4925; 0.1198; 0.0829 92 | 3.00; ; 8.00; 0.3166; 0.4555; 0.1095; 0.3164; 0.0147; 0.2002; 3.0850; 0.5891; 0.1553; 0.1073 93 | 3.00; ; 7.75; 0.3512; 0.5055; 0.0994; 0.2875; 0.0183; 0.2449; 3.0620; 0.7206; 0.2128; 0.1470 94 | 3.00; ; 7.50; 0.3806; 0.5478; 0.0811; 0.2345; 0.0232; 0.2950; 3.0450; 0.8679; 0.2975; 0.2054 95 | 3.00; ; 7.25; 0.3884; 0.5589; 0.0547; 0.1581; 0.0289; 0.3347; 3.0350; 0.9847; 0.4052; 0.2797 96 | 3.00; ; 7.00; 0.3620; 0.5208; 0.0286; 0.0827; 0.0348; 0.3458; 3.0350; 1.0180; 0.5182; 0.3577 97 | 3.00; ; 6.75; 0.3058; 0.4398; 0.0118; 0.0340; 0.0402; 0.3246; 3.0410; 0.9551; 0.6114; 0.4222 98 | 3.00; ; 6.50; 0.2356; 0.3388; 0.0041; 0.0117; 0.0447; 0.2809; 3.0530; 0.8264; 0.6606; 0.4563 99 | 3.00;50; 8.50; 0.3144; 0.4499; 0.1458; 0.4213; 0.0113; 0.1469; 3.1340; 0.4321; 0.1009; 0.0701 100 | 3.00;50; 8.25; 0.3371; 0.4836; 0.1374; 0.3972; 0.0124; 0.1680; 3.1150; 0.4944; 0.1212; 0.0840 101 | 3.00;50; 8.00; 0.3759; 0.5400; 0.1301; 0.3760; 0.0147; 0.2018; 3.0920; 0.5938; 0.1575; 0.1091 102 | 3.00;50; 7.75; 0.4245; 0.6100; 0.1176; 0.3400; 0.0184; 0.2478; 3.0700; 0.7291; 0.2163; 0.1496 103 | 3.00;50; 7.50; 0.4692; 0.6743; 0.0945; 0.2730; 0.0235; 0.2994; 3.0540; 0.8809; 0.3028; 0.2093 104 | 3.00;50; 7.25; 0.4880; 0.7012; 0.0622; 0.1797; 0.0298; 0.3404; 3.0450; 1.0010; 0.4136; 0.2859 105 | 3.00;50; 7.00; 0.4643; 0.6670; 0.0320; 0.0924; 0.0363; 0.3531; 3.0440; 1.0390; 0.5313; 0.3672 106 | 3.00;50; 6.75; 0.4009; 0.5757; 0.0131; 0.0377; 0.0428; 0.3334; 3.0500; 0.9809; 0.6311; 0.4363 107 | 3.00;50; 6.50; 0.3163; 0.4540; 0.0045; 0.0130; 0.0483; 0.2906; 3.0630; 0.8550; 0.6873; 0.4753 108 | 3.00;20; 8.50; 0.3713; 0.5295; 0.1810; 0.5232; 0.0107; 0.1435; 3.1450; 0.4224; 0.1000; 0.0697 109 | 3.00;20; 8.25; 0.4043; 0.5783; 0.1718; 0.4965; 0.0118; 0.1651; 3.1270; 0.4859; 0.1207; 0.0838 110 | 3.00;20; 8.00; 0.4588; 0.6570; 0.1624; 0.4694; 0.0141; 0.1993; 3.1060; 0.5865; 0.1572; 0.1090 111 | 3.00;20; 7.75; 0.5298; 0.7591; 0.1447; 0.4183; 0.0178; 0.2463; 3.0860; 0.7248; 0.2167; 0.1502 112 | 3.00;20; 7.50; 0.5966; 0.8549; 0.1128; 0.3260; 0.0232; 0.2984; 3.0700; 0.8781; 0.3040; 0.2106 113 | 3.00;20; 7.25; 0.6321; 0.9056; 0.0716; 0.2071; 0.0299; 0.3400; 3.0620; 1.0000; 0.4164; 0.2884 114 | 3.00;20; 7.00; 0.6132; 0.8784; 0.0358; 0.1034; 0.0374; 0.3541; 3.0620; 1.0420; 0.5385; 0.3729 115 | 3.00;20; 6.75; 0.5423; 0.7765; 0.0144; 0.0415; 0.0454; 0.3369; 3.0700; 0.9913; 0.6461; 0.4475 116 | 3.00;20; 6.50; 0.4428; 0.6336; 0.0049; 0.0143; 0.0528; 0.2981; 3.0830; 0.8772; 0.7140; 0.4947 117 | 3.00;10; 8.50; 0.4468; 0.6319; 0.2441; 0.7056; 0.0096; 0.1322; 3.1670; 0.3890; 0.0959; 0.0670 118 | 3.00;10; 8.25; 0.5009; 0.7108; 0.2317; 0.6698; 0.0108; 0.1542; 3.1510; 0.4538; 0.1169; 0.0815 119 | 3.00;10; 8.00; 0.5854; 0.8324; 0.2154; 0.6227; 0.0130; 0.1887; 3.1330; 0.5552; 0.1537; 0.1070 120 | 3.00;10; 7.75; 0.6944; 0.9885; 0.1850; 0.5346; 0.0169; 0.2359; 3.1160; 0.6942; 0.2134; 0.1484 121 | 3.00;10; 7.50; 0.8030; 1.1440; 0.1372; 0.3965; 0.0226; 0.2890; 3.1030; 0.8504; 0.3017; 0.2097 122 | 3.00;10; 7.25; 0.8721; 1.2430; 0.0828; 0.2394; 0.0303; 0.3326; 3.0970; 0.9787; 0.4176; 0.2902 123 | 3.00;10; 7.00; 0.8662; 1.2340; 0.0397; 0.1149; 0.0395; 0.3494; 3.0980; 1.0280; 0.5459; 0.3794 124 | 3.00;10; 6.75; 0.7891; 1.1230; 0.0157; 0.0454; 0.0495; 0.3366; 3.1060; 0.9904; 0.6627; 0.4606 125 | 3.00;10; 6.50; 0.6641; 0.9438; 0.0054; 0.0156; 0.0590; 0.3016; 3.1200; 0.8873; 0.7395; 0.5142 126 | 2.00; ; 8.50; 0.5862; 0.8442; 0.5160; 1.4920; 0.0283; 0.1255; 3.0100; 0.3694; 0.1419; 0.0983 127 | 2.00; ; 8.25; 0.6283; 0.9058; 0.4930; 1.4250; 0.0292; 0.1400; 3.0050; 0.4118; 0.1593; 0.1102 128 | 2.00; ; 8.00; 0.7061; 1.0190; 0.4666; 1.3490; 0.0317; 0.1656; 2.9970; 0.4874; 0.1929; 0.1334 129 | 2.00; ; 7.75; 0.8266; 1.1930; 0.4233; 1.2240; 0.0366; 0.2067; 2.9870; 0.6083; 0.2538; 0.1754 130 | 2.00; ; 7.50; 0.9796; 1.4140; 0.3498; 1.0110; 0.0446; 0.2629; 2.9780; 0.7735; 0.3544; 0.2447 131 | 2.00; ; 7.25; 1.1300; 1.6310; 0.2467; 0.7131; 0.0569; 0.3248; 2.9710; 0.9555; 0.5043; 0.3481 132 | 2.00; ; 7.00; 1.2210; 1.7630; 0.1399; 0.4044; 0.0745; 0.3736; 2.9680; 1.0990; 0.7042; 0.4859 133 | 2.00; ; 6.75; 1.2090; 1.7440; 0.0628; 0.1816; 0.0975; 0.3927; 2.9700; 1.1550; 0.9368; 0.6462 134 | 2.00; ; 6.50; 1.0970; 1.5840; 0.0235; 0.0679; 0.1249; 0.3807; 2.9750; 1.1200; 1.1680; 0.8055 135 | 2.00;50; 8.50; 0.6060; 0.8718; 0.5587; 1.6150; 0.0255; 0.1194; 3.0190; 0.3513; 0.1352; 0.0938 136 | 2.00;50; 8.25; 0.6559; 0.9447; 0.5329; 1.5400; 0.0266; 0.1337; 3.0140; 0.3934; 0.1526; 0.1057 137 | 2.00;50; 8.00; 0.7441; 1.0720; 0.5010; 1.4480; 0.0292; 0.1589; 3.0060; 0.4674; 0.1859; 0.1286 138 | 2.00;50; 7.75; 0.8807; 1.2700; 0.4494; 1.2990; 0.0340; 0.1991; 2.9970; 0.5857; 0.2457; 0.1699 139 | 2.00;50; 7.50; 1.0550; 1.5210; 0.3653; 1.0560; 0.0423; 0.2541; 2.9880; 0.7476; 0.3448; 0.2383 140 | 2.00;50; 7.25; 1.2240; 1.7640; 0.2526; 0.7300; 0.0548; 0.3141; 2.9810; 0.9241; 0.4919; 0.3399 141 | 2.00;50; 7.00; 1.3230; 1.9080; 0.1403; 0.4056; 0.0727; 0.3607; 2.9790; 1.0610; 0.6873; 0.4748 142 | 2.00;50; 6.75; 1.3120; 1.8920; 0.0621; 0.1794; 0.0963; 0.3786; 2.9810; 1.1140; 0.9156; 0.6323 143 | 2.00;50; 6.50; 1.1990; 1.7280; 0.0230; 0.0665; 0.1247; 0.3674; 2.9860; 1.0810; 1.1440; 0.7897 144 | 2.00;20; 8.50; 0.6082; 0.8733; 0.6125; 1.7700; 0.0202; 0.1073; 3.0370; 0.3158; 0.1215; 0.0843 145 | 2.00;20; 8.25; 0.6645; 0.9553; 0.5817; 1.6810; 0.0212; 0.1208; 3.0320; 0.3553; 0.1380; 0.0957 146 | 2.00;20; 8.00; 0.7658; 1.1020; 0.5414; 1.5650; 0.0236; 0.1446; 3.0250; 0.4256; 0.1698; 0.1177 147 | 2.00;20; 7.75; 0.9173; 1.3200; 0.4765; 1.3770; 0.0281; 0.1823; 3.0160; 0.5363; 0.2264; 0.1568 148 | 2.00;20; 7.50; 1.1070; 1.5940; 0.3769; 1.0900; 0.0357; 0.2332; 3.0080; 0.6862; 0.3189; 0.2207 149 | 2.00;20; 7.25; 1.2820; 1.8460; 0.2515; 0.7270; 0.0473; 0.2875; 3.0030; 0.8457; 0.4549; 0.3148 150 | 2.00;20; 7.00; 1.3760; 1.9800; 0.1344; 0.3885; 0.0640; 0.3275; 3.0030; 0.9636; 0.6340; 0.4386 151 | 2.00;20; 6.75; 1.3460; 1.9370; 0.0572; 0.1653; 0.0861; 0.3396; 3.0070; 0.9992; 0.8403; 0.5812 152 | 2.00;20; 6.50; 1.2170; 1.7520; 0.0205; 0.0592; 0.1132; 0.3259; 3.0140; 0.9590; 1.0440; 0.7222 153 | 2.00;10; 8.50; 0.5729; 0.8190; 0.6676; 1.9300; 0.0144; 0.0854; 3.0680; 0.2514; 0.1016; 0.0707 154 | 2.00;10; 8.25; 0.6371; 0.9121; 0.6285; 1.8170; 0.0154; 0.0972; 3.0640; 0.2860; 0.1168; 0.0812 155 | 2.00;10; 8.00; 0.7463; 1.0690; 0.5731; 1.6560; 0.0175; 0.1176; 3.0570; 0.3461; 0.1454; 0.1010 156 | 2.00;10; 7.75; 0.9042; 1.2960; 0.4862; 1.4050; 0.0214; 0.1493; 3.0480; 0.4394; 0.1953; 0.1356 157 | 2.00;10; 7.50; 1.0870; 1.5580; 0.3633; 1.0500; 0.0280; 0.1907; 3.0410; 0.5610; 0.2752; 0.1910 158 | 2.00;10; 7.25; 1.2430; 1.7830; 0.2248; 0.6499; 0.0384; 0.2331; 3.0380; 0.6860; 0.3915; 0.2717 159 | 2.00;10; 7.00; 1.3170; 1.8880; 0.1104; 0.3190; 0.0539; 0.2631; 3.0400; 0.7740; 0.5445; 0.3778 160 | 2.00;10; 6.75; 1.2780; 1.8330; 0.0436; 0.1260; 0.0753; 0.2703; 3.0440; 0.7952; 0.7220; 0.5009 161 | 2.00;10; 6.50; 1.1670; 1.6740; 0.0149; 0.0431; 0.1021; 0.2600; 3.0510; 0.7650; 0.9012; 0.6250 162 | 1.00; ; 8.50; 0.8748; 1.2640; 1.3340; 3.8560; 0.0386; 0.0704; 2.9180; 0.2072; 0.1596; 0.1106 163 | 1.00; ; 8.25; 0.9168; 1.3250; 1.2870; 3.7200; 0.0395; 0.0745; 2.9180; 0.2193; 0.1684; 0.1167 164 | 1.00; ; 8.00; 1.0070; 1.4550; 1.2160; 3.5160; 0.0418; 0.0830; 2.9170; 0.2443; 0.1875; 0.1298 165 | 1.00; ; 7.75; 1.1790; 1.7040; 1.1050; 3.1940; 0.0469; 0.0994; 2.9140; 0.2924; 0.2264; 0.1567 166 | 1.00; ; 7.50; 1.4610; 2.1120; 0.9331; 2.6970; 0.0570; 0.1271; 2.9090; 0.3738; 0.2979; 0.2062 167 | 1.00; ; 7.25; 1.8350; 2.6530; 0.6946; 2.0080; 0.0744; 0.1660; 2.9040; 0.4883; 0.4171; 0.2886 168 | 1.00; ; 7.00; 2.1960; 3.1750; 0.4274; 1.2360; 0.1020; 0.2081; 2.9010; 0.6124; 0.5972; 0.4131 169 | 1.00; ; 6.75; 2.3950; 3.4640; 0.2082; 0.6018; 0.1425; 0.2392; 2.9010; 0.7037; 0.8431; 0.5831 170 | 1.00; ; 6.50; 2.3760; 3.4360; 0.0818; 0.2365; 0.1979; 0.2502; 2.9040; 0.7362; 1.1450; 0.7917 171 | 1.00;50; 8.50; 0.8257; 1.1920; 1.3390; 3.8690; 0.0316; 0.0640; 2.9320; 0.1883; 0.1443; 0.1000 172 | 1.00;50; 8.25; 0.8691; 1.2550; 1.2900; 3.7290; 0.0324; 0.0679; 2.9320; 0.1997; 0.1527; 0.1058 173 | 1.00;50; 8.00; 0.9604; 1.3870; 1.2160; 3.5140; 0.0345; 0.0759; 2.9310; 0.2234; 0.1708; 0.1183 174 | 1.00;50; 7.75; 1.1320; 1.6360; 1.0980; 3.1730; 0.0390; 0.0913; 2.9290; 0.2687; 0.2073; 0.1436 175 | 1.00;50; 7.50; 1.4090; 2.0350; 0.9158; 2.6470; 0.0477; 0.1171; 2.9250; 0.3446; 0.2741; 0.1898 176 | 1.00;50; 7.25; 1.7610; 2.5440; 0.6680; 1.9310; 0.0629; 0.1528; 2.9220; 0.4495; 0.3843; 0.2660 177 | 1.00;50; 7.00; 2.0750; 2.9990; 0.3987; 1.1520; 0.0869; 0.1900; 2.9220; 0.5590; 0.5484; 0.3795 178 | 1.00;50; 6.75; 2.2090; 3.1930; 0.1864; 0.5388; 0.1219; 0.2150; 2.9250; 0.6324; 0.7689; 0.5320 179 | 1.00;50; 6.50; 2.1260; 3.0730; 0.0699; 0.2020; 0.1696; 0.2203; 2.9320; 0.6481; 1.0330; 0.7146 180 | 1.00;20; 8.50; 0.7338; 1.0580; 1.3120; 3.7920; 0.0222; 0.0539; 2.9590; 0.1585; 0.1205; 0.0836 181 | 1.00;20; 8.25; 0.7772; 1.1210; 1.2610; 3.6460; 0.0229; 0.0574; 2.9590; 0.1689; 0.1282; 0.0889 182 | 1.00;20; 8.00; 0.8660; 1.2500; 1.1810; 3.4130; 0.0245; 0.0646; 2.9600; 0.1901; 0.1445; 0.1001 183 | 1.00;20; 7.75; 1.0280; 1.4840; 1.0510; 3.0380; 0.0279; 0.0782; 2.9590; 0.2300; 0.1769; 0.1226 184 | 1.00;20; 7.50; 1.2770; 1.8440; 0.8534; 2.4670; 0.0346; 0.1004; 2.9600; 0.2954; 0.2351; 0.1629 185 | 1.00;20; 7.25; 1.5680; 2.2630; 0.5943; 1.7180; 0.0462; 0.1298; 2.9630; 0.3820; 0.3289; 0.2278 186 | 1.00;20; 7.00; 1.7770; 2.5660; 0.3306; 0.9555; 0.0641; 0.1578; 2.9690; 0.4642; 0.4643; 0.3216 187 | 1.00;20; 6.75; 1.7880; 2.5800; 0.1409; 0.4073; 0.0897; 0.1718; 2.9810; 0.5056; 0.6382; 0.4419 188 | 1.00;20; 6.50; 1.6090; 2.3230; 0.0477; 0.1378; 0.1233; 0.1679; 2.9950; 0.4941; 0.8336; 0.5769 189 | 1.00;10; 8.50; 0.5761; 0.8286; 1.1910; 3.4440; 0.0139; 0.0385; 3.0110; 0.1134; 0.0904; 0.0628 190 | 1.00;10; 8.25; 0.6160; 0.8864; 1.1360; 3.2830; 0.0144; 0.0414; 3.0120; 0.1217; 0.0969; 0.0673 191 | 1.00;10; 8.00; 0.6941; 0.9991; 1.0430; 3.0150; 0.0156; 0.0470; 3.0150; 0.1384; 0.1107; 0.0768 192 | 1.00;10; 7.75; 0.8281; 1.1920; 0.8923; 2.5790; 0.0182; 0.0574; 3.0190; 0.1690; 0.1373; 0.0953 193 | 1.00;10; 7.50; 1.0110; 1.4560; 0.6734; 1.9460; 0.0232; 0.0736; 3.0260; 0.2165; 0.1837; 0.1275 194 | 1.00;10; 7.25; 1.1780; 1.6960; 0.4161; 1.2030; 0.0317; 0.0928; 3.0340; 0.2729; 0.2551; 0.1770 195 | 1.00;10; 7.00; 1.2220; 1.7590; 0.1952; 0.5641; 0.0448; 0.1066; 3.0400; 0.3137; 0.3525; 0.2445 196 | 1.00;10; 6.75; 1.1060; 1.5900; 0.0682; 0.1971; 0.0630; 0.1075; 3.0410; 0.3163; 0.4688; 0.3251 197 | 1.00;10; 6.50; 0.9097; 1.3080; 0.0190; 0.0550; 0.0869; 0.0980; 3.0430; 0.2884; 0.5915; 0.4099 198 | 0.50; ; 8.50; 0.9135; 1.3210; 1.7650; 5.1020; 0.0338; 0.0333; 2.8630; 0.0980; 0.1363; 0.0946 199 | 0.50; ; 8.25; 0.9385; 1.3570; 1.7370; 5.0210; 0.0343; 0.0342; 2.8640; 0.1008; 0.1398; 0.0969 200 | 0.50; ; 8.00; 0.9963; 1.4410; 1.6780; 4.8510; 0.0355; 0.0364; 2.8640; 0.1071; 0.1479; 0.1026 201 | 0.50; ; 7.75; 1.1190; 1.6190; 1.5660; 4.5260; 0.0384; 0.0410; 2.8640; 0.1206; 0.1661; 0.1152 202 | 0.50; ; 7.50; 1.3490; 1.9510; 1.3670; 3.9530; 0.0447; 0.0498; 2.8650; 0.1466; 0.2029; 0.1407 203 | 0.50; ; 7.25; 1.6970; 2.4560; 1.0590; 3.0620; 0.0568; 0.0642; 2.8670; 0.1889; 0.2694; 0.1868 204 | 0.50; ; 7.00; 2.0820; 3.0130; 0.6784; 1.9610; 0.0777; 0.0825; 2.8710; 0.2428; 0.3765; 0.2611 205 | 0.50; ; 6.75; 2.3170; 3.3520; 0.3361; 0.9715; 0.1107; 0.0984; 2.8770; 0.2895; 0.5325; 0.3691 206 | 0.50; ; 6.50; 2.2860; 3.3080; 0.1285; 0.3714; 0.1582; 0.1051; 2.8840; 0.3093; 0.7372; 0.5107 207 | 0.50;50; 8.50; 0.8099; 1.1710; 1.6870; 4.8760; 0.0267; 0.0293; 2.8820; 0.0863; 0.1198; 0.0831 208 | 0.50;50; 8.25; 0.8335; 1.2050; 1.6580; 4.7920; 0.0271; 0.0302; 2.8830; 0.0889; 0.1230; 0.0853 209 | 0.50;50; 8.00; 0.8872; 1.2830; 1.5960; 4.6120; 0.0282; 0.0322; 2.8840; 0.0946; 0.1305; 0.0905 210 | 0.50;50; 7.75; 0.9998; 1.4460; 1.4760; 4.2670; 0.0306; 0.0363; 2.8850; 0.1069; 0.1471; 0.1020 211 | 0.50;50; 7.50; 1.2050; 1.7430; 1.2670; 3.6610; 0.0358; 0.0443; 2.8880; 0.1303; 0.1806; 0.1252 212 | 0.50;50; 7.25; 1.5040; 2.1760; 0.9509; 2.7490; 0.0457; 0.0570; 2.8930; 0.1676; 0.2404; 0.1667 213 | 0.50;50; 7.00; 1.8020; 2.6060; 0.5784; 1.6720; 0.0629; 0.0724; 2.9030; 0.2130; 0.3352; 0.2324 214 | 0.50;50; 6.75; 1.9270; 2.7880; 0.2673; 0.7726; 0.0894; 0.0843; 2.9150; 0.2479; 0.4700; 0.3256 215 | 0.50;50; 6.50; 1.8160; 2.6260; 0.0948; 0.2739; 0.1268; 0.0872; 2.9300; 0.2566; 0.6408; 0.4437 216 | 0.50;20; 8.50; 0.6589; 0.9519; 1.5320; 4.4280; 0.0179; 0.0236; 2.9250; 0.0694; 0.0958; 0.0665 217 | 0.50;20; 8.25; 0.6797; 0.9820; 1.5000; 4.3350; 0.0182; 0.0243; 2.9260; 0.0716; 0.0986; 0.0684 218 | 0.50;20; 8.00; 0.7263; 1.0490; 1.4320; 4.1380; 0.0190; 0.0260; 2.9280; 0.0765; 0.1050; 0.0729 219 | 0.50;20; 7.75; 0.8219; 1.1880; 1.3010; 3.7600; 0.0207; 0.0295; 2.9330; 0.0868; 0.1194; 0.0828 220 | 0.50;20; 7.50; 0.9890; 1.4290; 1.0780; 3.1150; 0.0245; 0.0361; 2.9410; 0.1063; 0.1479; 0.1026 221 | 0.50;20; 7.25; 1.2100; 1.7490; 0.7603; 2.1970; 0.0317; 0.0462; 2.9550; 0.1360; 0.1976; 0.1370 222 | 0.50;20; 7.00; 1.3840; 1.9990; 0.4205; 1.2150; 0.0438; 0.0573; 2.9730; 0.1686; 0.2737; 0.1897 223 | 0.50;20; 6.75; 1.3800; 1.9940; 0.1721; 0.4974; 0.0618; 0.0637; 2.9950; 0.1874; 0.3762; 0.2607 224 | 0.50;20; 6.50; 1.2020; 1.7370; 0.0539; 0.1558; 0.0859; 0.0622; 3.0160; 0.1830; 0.4969; 0.3440 225 | 0.50;10; 8.50; 0.4504; 0.6494; 1.2270; 3.5470; 0.0104; 0.0156; 3.0010; 0.0458; 0.0666; 0.0462 226 | 0.50;10; 8.25; 0.4666; 0.6728; 1.1900; 3.4400; 0.0106; 0.0161; 3.0040; 0.0475; 0.0688; 0.0478 227 | 0.50;10; 8.00; 0.5018; 0.7236; 1.1120; 3.2130; 0.0111; 0.0174; 3.0090; 0.0511; 0.0740; 0.0514 228 | 0.50;10; 7.75; 0.5708; 0.8233; 0.9658; 2.7920; 0.0124; 0.0199; 3.0190; 0.0587; 0.0855; 0.0593 229 | 0.50;10; 7.50; 0.6797; 0.9803; 0.7353; 2.1250; 0.0151; 0.0246; 3.0340; 0.0723; 0.1078; 0.0748 230 | 0.50;10; 7.25; 0.7925; 1.1430; 0.4518; 1.3060; 0.0201; 0.0310; 3.0550; 0.0911; 0.1450; 0.1006 231 | 0.50;10; 7.00; 0.8220; 1.1850; 0.2051; 0.5929; 0.0285; 0.0363; 3.0740; 0.1067; 0.1985; 0.1377 232 | 0.50;10; 6.75; 0.7256; 1.0450; 0.0669; 0.1934; 0.0405; 0.0368; 3.0830; 0.1084; 0.2650; 0.1838 233 | 0.50;10; 6.50; 0.5705; 0.8210; 0.0172; 0.0496; 0.0562; 0.0331; 3.0730; 0.0973; 0.3373; 0.2337 234 | 0.30; ; 8.50; 0.7972; 1.1530; 1.6890; 4.8810; 0.0274; 0.0185; 2.8550; 0.0543; 0.1082; 0.0751 235 | 0.30; ; 8.25; 0.8101; 1.1720; 1.6730; 4.8350; 0.0277; 0.0187; 2.8550; 0.0552; 0.1097; 0.0762 236 | 0.30; ; 8.00; 0.8419; 1.2180; 1.6310; 4.7130; 0.0283; 0.0195; 2.8560; 0.0573; 0.1135; 0.0788 237 | 0.30; ; 7.75; 0.9134; 1.3220; 1.5370; 4.4410; 0.0299; 0.0211; 2.8580; 0.0621; 0.1225; 0.0851 238 | 0.30; ; 7.50; 1.0570; 1.5300; 1.3550; 3.9180; 0.0335; 0.0245; 2.8610; 0.0721; 0.1423; 0.0988 239 | 0.30; ; 7.25; 1.2960; 1.8760; 1.0590; 3.0600; 0.0410; 0.0306; 2.8670; 0.0900; 0.1808; 0.1255 240 | 0.30; ; 7.00; 1.5780; 2.2830; 0.6769; 1.9560; 0.0551; 0.0391; 2.8750; 0.1151; 0.2464; 0.1710 241 | 0.30; ; 6.75; 1.7470; 2.5290; 0.3290; 0.9510; 0.0783; 0.0471; 2.8850; 0.1386; 0.3455; 0.2397 242 | 0.30; ; 6.50; 1.7000; 2.4600; 0.1210; 0.3497; 0.1126; 0.0506; 2.8950; 0.1489; 0.4794; 0.3324 243 | 0.30;50; 8.50; 0.6762; 0.9782; 1.5500; 4.4790; 0.0212; 0.0159; 2.8820; 0.0467; 0.0929; 0.0645 244 | 0.30;50; 8.25; 0.6878; 0.9950; 1.5320; 4.4290; 0.0214; 0.0161; 2.8820; 0.0474; 0.0943; 0.0654 245 | 0.30;50; 8.00; 0.7158; 1.0360; 1.4870; 4.2970; 0.0219; 0.0168; 2.8830; 0.0493; 0.0978; 0.0679 246 | 0.30;50; 7.75; 0.7788; 1.1270; 1.3870; 4.0090; 0.0232; 0.0182; 2.8860; 0.0536; 0.1059; 0.0735 247 | 0.30;50; 7.50; 0.9036; 1.3070; 1.1990; 3.4650; 0.0262; 0.0213; 2.8920; 0.0625; 0.1239; 0.0860 248 | 0.30;50; 7.25; 1.1020; 1.5940; 0.9032; 2.6110; 0.0324; 0.0266; 2.9020; 0.0783; 0.1586; 0.1100 249 | 0.30;50; 7.00; 1.3120; 1.8990; 0.5456; 1.5770; 0.0438; 0.0338; 2.9140; 0.0993; 0.2166; 0.1502 250 | 0.30;50; 6.75; 1.3970; 2.0210; 0.2464; 0.7121; 0.0622; 0.0397; 2.9290; 0.1167; 0.3017; 0.2092 251 | 0.30;50; 6.50; 1.2970; 1.8770; 0.0839; 0.2426; 0.0887; 0.0412; 2.9430; 0.1213; 0.4127; 0.2859 252 | 0.30;20; 8.50; 0.5186; 0.7497; 1.3320; 3.8490; 0.0138; 0.0123; 2.9310; 0.0362; 0.0719; 0.0499 253 | 0.30;20; 8.25; 0.5282; 0.7636; 1.3120; 3.7930; 0.0139; 0.0125; 2.9320; 0.0369; 0.0731; 0.0507 254 | 0.30;20; 8.00; 0.5513; 0.7969; 1.2620; 3.6470; 0.0143; 0.0131; 2.9350; 0.0384; 0.0760; 0.0527 255 | 0.30;20; 7.75; 0.6024; 0.8710; 1.1550; 3.3370; 0.0152; 0.0143; 2.9400; 0.0420; 0.0830; 0.0576 256 | 0.30;20; 7.50; 0.7008; 1.0130; 0.9612; 2.7780; 0.0173; 0.0168; 2.9510; 0.0495; 0.0984; 0.0683 257 | 0.30;20; 7.25; 0.8442; 1.2210; 0.6783; 1.9610; 0.0218; 0.0211; 2.9670; 0.0621; 0.1274; 0.0884 258 | 0.30;20; 7.00; 0.9643; 1.3940; 0.3713; 1.0730; 0.0299; 0.0263; 2.9890; 0.0773; 0.1741; 0.1207 259 | 0.30;20; 6.75; 0.9584; 1.3850; 0.1482; 0.4284; 0.0422; 0.0295; 3.0130; 0.0867; 0.2388; 0.1655 260 | 0.30;20; 6.50; 0.8237; 1.1900; 0.0447; 0.1292; 0.0589; 0.0289; 3.0350; 0.0849; 0.3168; 0.2194 261 | 0.30;10; 8.50; 0.3287; 0.4744; 0.9962; 2.8800; 0.0077; 0.0078; 3.0160; 0.0229; 0.0479; 0.0333 262 | 0.30;10; 8.25; 0.3357; 0.4844; 0.9732; 2.8130; 0.0078; 0.0079; 3.0180; 0.0233; 0.0488; 0.0339 263 | 0.30;10; 8.00; 0.3523; 0.5085; 0.9169; 2.6500; 0.0080; 0.0083; 3.0230; 0.0245; 0.0512; 0.0355 264 | 0.30;10; 7.75; 0.3883; 0.5604; 0.8026; 2.3200; 0.0087; 0.0092; 3.0340; 0.0271; 0.0569; 0.0395 265 | 0.30;10; 7.50; 0.4517; 0.6518; 0.6137; 1.7740; 0.0102; 0.0110; 3.0510; 0.0325; 0.0693; 0.0481 266 | 0.30;10; 7.25; 0.5242; 0.7563; 0.3757; 1.0860; 0.0135; 0.0138; 3.0740; 0.0406; 0.0915; 0.0635 267 | 0.30;10; 7.00; 0.5449; 0.7857; 0.1679; 0.4852; 0.0190; 0.0163; 3.0940; 0.0480; 0.1246; 0.0865 268 | 0.30;10; 6.75; 0.4773; 0.6877; 0.0530; 0.1533; 0.0272; 0.0167; 3.1030; 0.0490; 0.1667; 0.1156 269 | 0.30;10; 6.50; 0.3690; 0.5312; 0.0131; 0.0378; 0.0379; 0.0149; 3.0930; 0.0439; 0.2133; 0.1478 270 | 0.20; ; 8.50; 0.6113; 0.8847; 1.4680; 4.2430; 0.0225; 0.0108; 2.8650; 0.0317; 0.0847; 0.0588 271 | 0.20; ; 8.25; 0.6182; 0.8946; 1.4560; 4.2080; 0.0227; 0.0109; 2.8660; 0.0320; 0.0854; 0.0593 272 | 0.20; ; 8.00; 0.6353; 0.9195; 1.4220; 4.1110; 0.0231; 0.0112; 2.8670; 0.0329; 0.0875; 0.0608 273 | 0.20; ; 7.75; 0.6760; 0.9784; 1.3460; 3.8900; 0.0240; 0.0119; 2.8690; 0.0349; 0.0925; 0.0643 274 | 0.20; ; 7.50; 0.7636; 1.1050; 1.1950; 3.4550; 0.0263; 0.0134; 2.8730; 0.0395; 0.1043; 0.0724 275 | 0.20; ; 7.25; 0.9221; 1.3350; 0.9432; 2.7260; 0.0314; 0.0164; 2.8790; 0.0483; 0.1287; 0.0894 276 | 0.20; ; 7.00; 1.1270; 1.6320; 0.6099; 1.7630; 0.0415; 0.0210; 2.8880; 0.0618; 0.1725; 0.1197 277 | 0.20; ; 6.75; 1.2650; 1.8310; 0.2981; 0.8617; 0.0585; 0.0257; 2.8980; 0.0755; 0.2402; 0.1667 278 | 0.20; ; 6.50; 1.2380; 1.7910; 0.1088; 0.3144; 0.0840; 0.0279; 2.9070; 0.0822; 0.3332; 0.2311 279 | 0.20;50; 8.50; 0.5035; 0.7285; 1.3100; 3.7900; 0.0171; 0.0091; 2.9000; 0.0267; 0.0715; 0.0496 280 | 0.20;50; 8.25; 0.5095; 0.7371; 1.3000; 3.7600; 0.0173; 0.0092; 2.9000; 0.0270; 0.0722; 0.0501 281 | 0.20;50; 8.00; 0.5244; 0.7587; 1.2600; 3.6500; 0.0176; 0.0095; 2.9000; 0.0278; 0.0740; 0.0514 282 | 0.20;50; 7.75; 0.5598; 0.8100; 1.1800; 3.4200; 0.0183; 0.0101; 2.9000; 0.0296; 0.0786; 0.0546 283 | 0.20;50; 7.50; 0.6356; 0.9197; 1.0300; 2.9800; 0.0202; 0.0115; 2.9100; 0.0338; 0.0894; 0.0621 284 | 0.20;50; 7.25; 0.7677; 1.1110; 0.7846; 2.2680; 0.0245; 0.0141; 2.9180; 0.0416; 0.1117; 0.0776 285 | 0.20;50; 7.00; 0.9228; 1.3350; 0.4796; 1.3860; 0.0326; 0.0180; 2.9310; 0.0530; 0.1505; 0.1045 286 | 0.20;50; 6.75; 0.9974; 1.4430; 0.2178; 0.6294; 0.0462; 0.0215; 2.9440; 0.0633; 0.2088; 0.1448 287 | 0.20;50; 6.50; 0.9311; 1.3470; 0.0736; 0.2128; 0.0657; 0.0226; 2.9580; 0.0666; 0.2857; 0.1980 288 | 0.20;20; 8.50; 0.3725; 0.5386; 1.0900; 3.1600; 0.0109; 0.0069; 2.9500; 0.0203; 0.0541; 0.0376 289 | 0.20;20; 8.25; 0.3773; 0.5455; 1.0800; 3.1200; 0.0110; 0.0070; 2.9500; 0.0206; 0.0547; 0.0380 290 | 0.20;20; 8.00; 0.3894; 0.5630; 1.0400; 3.0100; 0.0112; 0.0072; 2.9600; 0.0212; 0.0563; 0.0391 291 | 0.20;20; 7.75; 0.4181; 0.6046; 0.9580; 2.7700; 0.0118; 0.0077; 2.9600; 0.0228; 0.0603; 0.0418 292 | 0.20;20; 7.50; 0.4782; 0.6914; 0.8040; 2.3200; 0.0132; 0.0089; 2.9700; 0.0262; 0.0697; 0.0484 293 | 0.20;20; 7.25; 0.5749; 0.8313; 0.5730; 1.6600; 0.0162; 0.0111; 2.9900; 0.0326; 0.0886; 0.0615 294 | 0.20;20; 7.00; 0.6666; 0.9638; 0.3180; 0.9180; 0.0220; 0.0139; 3.0100; 0.0410; 0.1200; 0.0832 295 | 0.20;20; 6.75; 0.6733; 0.9732; 0.1270; 0.3680; 0.0310; 0.0159; 3.0300; 0.0468; 0.1640; 0.1140 296 | 0.20;20; 6.50; 0.5814; 0.8402; 0.0381; 0.1100; 0.0432; 0.0157; 3.0500; 0.0463; 0.2180; 0.1510 297 | 0.20;10; 8.50; 0.2257; 0.3258; 0.7910; 2.2900; 0.0059; 0.0042; 3.0400; 0.0125; 0.0352; 0.0244 298 | 0.20;10; 8.25; 0.2291; 0.3307; 0.7740; 2.2400; 0.0060; 0.0043; 3.0400; 0.0127; 0.0356; 0.0247 299 | 0.20;10; 8.00; 0.2378; 0.3432; 0.7320; 2.1200; 0.0061; 0.0045; 3.0500; 0.0131; 0.0369; 0.0256 300 | 0.20;10; 7.75; 0.2581; 0.3726; 0.6450; 1.8640; 0.0065; 0.0049; 3.0540; 0.0143; 0.0402; 0.0279 301 | 0.20;10; 7.50; 0.2977; 0.4298; 0.4980; 1.4400; 0.0076; 0.0057; 3.0700; 0.0169; 0.0481; 0.0334 302 | 0.20;10; 7.25; 0.3490; 0.5037; 0.3080; 0.8910; 0.0098; 0.0072; 3.0900; 0.0212; 0.0628; 0.0436 303 | 0.20;10; 7.00; 0.3704; 0.5343; 0.1390; 0.4030; 0.0138; 0.0086; 3.1100; 0.0254; 0.0853; 0.0592 304 | 0.20;10; 6.75; 0.3289; 0.4740; 0.0440; 0.1270; 0.0196; 0.0090; 3.1200; 0.0263; 0.1140; 0.0791 305 | 0.20;10; 6.50; 0.2544; 0.3663; 0.0107; 0.0311; 0.0273; 0.0081; 3.1100; 0.0237; 0.1470; 0.1020 306 | 0.10; ; 8.50; 0.3394; 0.4913; 0.9360; 2.7100; 0.0140; 0.0043; 2.9000; 0.0125; 0.0496; 0.0345 307 | 0.10; ; 8.25; 0.3417; 0.4945; 0.9290; 2.6900; 0.0141; 0.0043; 2.9000; 0.0126; 0.0499; 0.0347 308 | 0.10; ; 8.00; 0.3476; 0.5031; 0.9090; 2.6300; 0.0142; 0.0043; 2.9000; 0.0128; 0.0506; 0.0352 309 | 0.10; ; 7.75; 0.3631; 0.5256; 0.8630; 2.4900; 0.0147; 0.0045; 2.9000; 0.0133; 0.0526; 0.0365 310 | 0.10; ; 7.50; 0.4002; 0.5793; 0.7720; 2.2300; 0.0158; 0.0050; 2.9000; 0.0147; 0.0576; 0.0400 311 | 0.10; ; 7.25; 0.4755; 0.6883; 0.6170; 1.7800; 0.0184; 0.0060; 2.9100; 0.0176; 0.0692; 0.0481 312 | 0.10; ; 7.00; 0.5855; 0.8474; 0.4060; 1.1700; 0.0238; 0.0077; 2.9100; 0.0225; 0.0911; 0.0633 313 | 0.10; ; 6.75; 0.6715; 0.9719; 0.2020; 0.5840; 0.0334; 0.0095; 2.9200; 0.0280; 0.1260; 0.0874 314 | 0.10; ; 6.50; 0.6666; 0.9648; 0.0739; 0.2140; 0.0478; 0.0106; 2.9300; 0.0311; 0.1750; 0.1210 315 | 0.10;50; 8.50; 0.2725; 0.3944; 0.8210; 2.3700; 0.0105; 0.0035; 2.9300; 0.0104; 0.0412; 0.0286 316 | 0.10;50; 8.25; 0.2744; 0.3971; 0.8130; 2.3500; 0.0106; 0.0036; 2.9300; 0.0104; 0.0415; 0.0288 317 | 0.10;50; 8.00; 0.2796; 0.4047; 0.7920; 2.2900; 0.0107; 0.0036; 2.9300; 0.0106; 0.0421; 0.0293 318 | 0.10;50; 7.75; 0.2932; 0.4244; 0.7450; 2.1500; 0.0110; 0.0038; 2.9400; 0.0111; 0.0440; 0.0305 319 | 0.10;50; 7.50; 0.3257; 0.4714; 0.6540; 1.8900; 0.0119; 0.0042; 2.9400; 0.0124; 0.0487; 0.0338 320 | 0.10;50; 7.25; 0.3893; 0.5633; 0.5040; 1.4600; 0.0141; 0.0051; 2.9500; 0.0150; 0.0594; 0.0412 321 | 0.10;50; 7.00; 0.4740; 0.6859; 0.3140; 0.9080; 0.0186; 0.0065; 2.9600; 0.0192; 0.0790; 0.0548 322 | 0.10;50; 6.75; 0.5247; 0.7591; 0.1450; 0.4190; 0.0261; 0.0080; 2.9700; 0.0234; 0.1090; 0.0756 323 | 0.10;50; 6.50; 0.4966; 0.7184; 0.0491; 0.1420; 0.0371; 0.0085; 2.9800; 0.0251; 0.1490; 0.1030 324 | 0.10;20; 8.50; 0.1953; 0.2824; 0.6680; 1.9300; 0.0066; 0.0026; 2.9900; 0.0077; 0.0306; 0.0213 325 | 0.10;20; 8.25; 0.1968; 0.2846; 0.6600; 1.9100; 0.0066; 0.0027; 2.9900; 0.0078; 0.0308; 0.0214 326 | 0.10;20; 8.00; 0.2010; 0.2907; 0.6380; 1.8500; 0.0067; 0.0027; 2.9900; 0.0080; 0.0314; 0.0218 327 | 0.10;20; 7.75; 0.2122; 0.3069; 0.5900; 1.7100; 0.0070; 0.0029; 3.0000; 0.0084; 0.0330; 0.0229 328 | 0.10;20; 7.50; 0.2385; 0.3449; 0.4990; 1.4400; 0.0076; 0.0032; 3.0100; 0.0095; 0.0373; 0.0259 329 | 0.10;20; 7.25; 0.2861; 0.4138; 0.3610; 1.0400; 0.0092; 0.0040; 3.0200; 0.0117; 0.0465; 0.0323 330 | 0.10;20; 7.00; 0.3385; 0.4895; 0.2040; 0.5890; 0.0124; 0.0050; 3.0400; 0.0148; 0.0624; 0.0433 331 | 0.10;20; 6.75; 0.3505; 0.5067; 0.0830; 0.2400; 0.0174; 0.0059; 3.0500; 0.0173; 0.0853; 0.0591 332 | 0.10;20; 6.50; 0.3064; 0.4428; 0.0248; 0.0718; 0.0242; 0.0059; 3.0700; 0.0174; 0.1140; 0.0786 333 | 0.10;10; 8.50; 0.1136; 0.1640; 0.4700; 1.3600; 0.0035; 0.0016; 3.0800; 0.0046; 0.0194; 0.0135 334 | 0.10;10; 8.25; 0.1147; 0.1656; 0.4610; 1.3300; 0.0035; 0.0016; 3.0800; 0.0047; 0.0196; 0.0136 335 | 0.10;10; 8.00; 0.1178; 0.1700; 0.4380; 1.2700; 0.0036; 0.0016; 3.0800; 0.0048; 0.0201; 0.0139 336 | 0.10;10; 7.75; 0.1259; 0.1818; 0.3878; 1.1210; 0.0037; 0.0018; 3.0870; 0.0052; 0.0215; 0.0149 337 | 0.10;10; 7.50; 0.1438; 0.2077; 0.3020; 0.8730; 0.0043; 0.0020; 3.1000; 0.0060; 0.0251; 0.0175 338 | 0.10;10; 7.25; 0.1705; 0.2461; 0.1900; 0.5490; 0.0054; 0.0026; 3.1200; 0.0075; 0.0326; 0.0226 339 | 0.10;10; 7.00; 0.1861; 0.2686; 0.0875; 0.2530; 0.0076; 0.0031; 3.1300; 0.0092; 0.0441; 0.0306 340 | 0.10;10; 6.75; 0.1690; 0.2436; 0.0280; 0.0808; 0.0108; 0.0033; 3.1400; 0.0097; 0.0590; 0.0409 341 | 0.10;10; 6.50; 0.1316; 0.1895; 0.0068; 0.0196; 0.0151; 0.0030; 3.1200; 0.0089; 0.0761; 0.0527 342 | 0.05; ; 8.50; 0.1801; 0.2606; 0.5135; 1.4840; 0.0077; 0.0018; 2.9180; 0.0054; 0.0266; 0.0185 343 | 0.05; ; 8.25; 0.1809; 0.2618; 0.5098; 1.4740; 0.0077; 0.0019; 2.9180; 0.0055; 0.0267; 0.0186 344 | 0.05; ; 8.00; 0.1832; 0.2652; 0.4990; 1.4400; 0.0078; 0.0019; 2.9200; 0.0055; 0.0270; 0.0188 345 | 0.05; ; 7.75; 0.1898; 0.2748; 0.4750; 1.3700; 0.0079; 0.0020; 2.9200; 0.0057; 0.0279; 0.0194 346 | 0.05; ; 7.50; 0.2068; 0.2993; 0.4260; 1.2300; 0.0085; 0.0021; 2.9200; 0.0062; 0.0302; 0.0210 347 | 0.05; ; 7.25; 0.2433; 0.3522; 0.3420; 0.9890; 0.0098; 0.0025; 2.9300; 0.0074; 0.0358; 0.0248 348 | 0.05; ; 7.00; 0.2995; 0.4336; 0.2270; 0.6550; 0.0126; 0.0032; 2.9300; 0.0094; 0.0467; 0.0324 349 | 0.05; ; 6.75; 0.3459; 0.5007; 0.1130; 0.3280; 0.0176; 0.0040; 2.9300; 0.0118; 0.0645; 0.0447 350 | 0.05; ; 6.50; 0.3450; 0.4993; 0.0414; 0.1200; 0.0252; 0.0045; 2.9400; 0.0132; 0.0894; 0.0620 351 | 0.05;50; 8.50; 0.1434; 0.2074; 0.4476; 1.2940; 0.0057; 0.0015; 2.9540; 0.0045; 0.0220; 0.0153 352 | 0.05;50; 8.25; 0.1440; 0.2085; 0.4438; 1.2830; 0.0057; 0.0015; 2.9540; 0.0045; 0.0221; 0.0153 353 | 0.05;50; 8.00; 0.1461; 0.2114; 0.4330; 1.2520; 0.0058; 0.0016; 2.9550; 0.0046; 0.0223; 0.0155 354 | 0.05;50; 7.75; 0.1520; 0.2199; 0.4081; 1.1800; 0.0059; 0.0016; 2.9570; 0.0048; 0.0231; 0.0161 355 | 0.05;50; 7.50; 0.1670; 0.2416; 0.3590; 1.0380; 0.0064; 0.0018; 2.9610; 0.0052; 0.0253; 0.0176 356 | 0.05;50; 7.25; 0.1980; 0.2865; 0.2781; 0.8040; 0.0075; 0.0021; 2.9660; 0.0063; 0.0305; 0.0212 357 | 0.05;50; 7.00; 0.2416; 0.3496; 0.1743; 0.5038; 0.0098; 0.0027; 2.9720; 0.0080; 0.0404; 0.0280 358 | 0.05;50; 6.75; 0.2694; 0.3898; 0.0808; 0.2336; 0.0137; 0.0034; 2.9810; 0.0099; 0.0557; 0.0386 359 | 0.05;50; 6.50; 0.2560; 0.3704; 0.0273; 0.0789; 0.0195; 0.0036; 2.9890; 0.0106; 0.0763; 0.0529 360 | 0.05;20; 8.50; 0.1016; 0.1469; 0.3620; 1.0460; 0.0035; 0.0011; 3.0130; 0.0033; 0.0162; 0.0113 361 | 0.05;20; 8.25; 0.1022; 0.1477; 0.3579; 1.0340; 0.0036; 0.0011; 3.0140; 0.0033; 0.0163; 0.0113 362 | 0.05;20; 8.00; 0.1039; 0.1502; 0.3466; 1.0020; 0.0036; 0.0012; 3.0160; 0.0034; 0.0165; 0.0115 363 | 0.05;20; 7.75; 0.1087; 0.1573; 0.3210; 0.9279; 0.0037; 0.0012; 3.0190; 0.0036; 0.0172; 0.0120 364 | 0.05;20; 7.50; 0.1210; 0.1750; 0.2724; 0.7874; 0.0040; 0.0014; 3.0250; 0.0040; 0.0192; 0.0133 365 | 0.05;20; 7.25; 0.1445; 0.2090; 0.1979; 0.5721; 0.0049; 0.0017; 3.0360; 0.0049; 0.0238; 0.0165 366 | 0.05;20; 7.00; 0.1718; 0.2485; 0.1123; 0.3247; 0.0065; 0.0021; 3.0500; 0.0062; 0.0318; 0.0221 367 | 0.05;20; 6.75; 0.1792; 0.2591; 0.0459; 0.1325; 0.0091; 0.0025; 3.0660; 0.0073; 0.0435; 0.0301 368 | 0.05;20; 6.50; 0.1571; 0.2271; 0.0137; 0.0395; 0.0127; 0.0025; 3.0840; 0.0074; 0.0579; 0.0401 369 | 0.05;10; 8.50; 0.0582; 0.0841; 0.2523; 0.7292; 0.0019; 0.0007; 3.0950; 0.0020; 0.0102; 0.0071 370 | 0.05;10; 8.25; 0.0586; 0.0847; 0.2478; 0.7163; 0.0019; 0.0007; 3.0960; 0.0020; 0.0102; 0.0071 371 | 0.05;10; 8.00; 0.0599; 0.0865; 0.2358; 0.6817; 0.0019; 0.0007; 3.0990; 0.0020; 0.0104; 0.0073 372 | 0.05;10; 7.75; 0.0635; 0.0917; 0.2095; 0.6057; 0.0020; 0.0007; 3.1050; 0.0022; 0.0111; 0.0077 373 | 0.05;10; 7.50; 0.0720; 0.1040; 0.1636; 0.4730; 0.0022; 0.0008; 3.1160; 0.0025; 0.0129; 0.0089 374 | 0.05;10; 7.25; 0.0854; 0.1233; 0.1032; 0.2984; 0.0028; 0.0011; 3.1320; 0.0031; 0.0166; 0.0115 375 | 0.05;10; 7.00; 0.0940; 0.1357; 0.0477; 0.1379; 0.0040; 0.0013; 3.1450; 0.0038; 0.0224; 0.0156 376 | 0.05;10; 6.75; 0.0859; 0.1238; 0.0153; 0.0441; 0.0057; 0.0014; 3.1460; 0.0041; 0.0301; 0.0208 377 | 0.05;10; 6.50; 0.0669; 0.0964; 0.0037; 0.0107; 0.0079; 0.0013; 3.1300; 0.0037; 0.0389; 0.0269 378 | 379 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/data/sdss_data_ls.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nell-byler/cloudyfsps/e31ac5b81fd2d709f3b493079aa47d594f2294ce/cloudyfsps/astrodata/data/sdss_data_ls.npz -------------------------------------------------------------------------------- /cloudyfsps/astrodata/data/vanzee_abund.dat: -------------------------------------------------------------------------------- 1 | # 2 | # VizieR Astronomical Server vizier.u-strasbg.fr 3 | # Date: 2014-10-16T21:19:14 [V1.99+ (14-Oct-2013)] 4 | # In case of problem, please report to: cds-question@unistra.fr 5 | # 6 | # 7 | #Coosys J2000: eq_FK5 J2000 8 | #INFO votable-version=1.99+ (14-Oct-2013) 9 | #INFO -ref=VIZ544035f488c4 10 | #INFO -out.max=unlimited 11 | #INFO queryParameters=10 12 | #-oc.form=dec 13 | #-out.max=unlimited 14 | #-nav=cat:J/AJ/116/2805&tab:{J/AJ/116/2805/table5}&key:source=J/AJ/116/2805/table5&HTTPPRM:& 15 | #-source=J/AJ/116/2805/table5 16 | #-order=I 17 | #-out=T(O++) 18 | #-out=12+log(O/H) 19 | #-out=e_12+log(O/H) 20 | #-out=log(N/O) 21 | #-out=e_log(N/O) 22 | # 23 | 24 | #RESOURCE=yCat_51162805 25 | #Name: J/AJ/116/2805 26 | #Title: H II regions in spiral galaxies (Van Zee+, 1998) 27 | #Table J_AJ_116_2805_table5: 28 | #Name: J/AJ/116/2805/table5 29 | #Title: H II region abundances 30 | #Column T(O++) (I5) Temperature from O++ [ucd=phys.temperature] 31 | #Column 12+log(O/H) (F5.2) 12+log(O/H abundance [ucd=phys.abund] 32 | #Column e_12+log(O/H) (F5.2) rms uncertainty on 12+log(O/H) [ucd=stat.error] 33 | #Column log(N/O) (F5.2) log(N/O) abundance ratio [ucd=phys.abund] 34 | #Column e_log(N/O) (F5.2) rms uncertainty on log(N/O) [ucd=stat.error] 35 | #T(O++) 12+log(O/H) e_12+log(O/H) log(N/O) e_log(N/O) 36 | #K 37 | #----- ----- ----- ----- ----- 38 | 5700 8.88 0.12 -1.15 0.17 39 | 4800 8.95 0.19 -1.14 0.24 40 | 5500 8.90 0.12 -1.17 0.18 41 | 6200 8.82 0.10 -1.12 0.15 42 | 5100 8.94 0.14 -1.15 0.21 43 | 5300 8.95 0.14 -1.14 0.20 44 | 6400 8.79 0.10 -1.19 0.14 45 | 6700 8.69 0.10 -1.23 0.13 46 | 6000 8.85 0.11 -0.97 0.16 47 | 6200 8.80 0.10 -1.18 0.15 48 | 6900 8.73 0.10 -1.15 0.12 49 | 7000 8.69 0.11 -1.16 0.16 50 | 8500 8.48 0.10 -1.20 0.13 51 | 6400 8.70 0.10 -1.47 0.14 52 | 7500 8.60 0.10 -1.18 0.11 53 | 7400 8.65 0.10 -1.26 0.11 54 | 8300 8.55 0.10 -1.22 0.14 55 | 7400 8.64 0.10 -1.39 0.11 56 | 12000 8.10 0.10 -1.39 0.13 57 | 5100 8.98 0.15 -1.09 0.21 58 | 5100 8.94 0.14 -1.14 0.21 59 | 5500 8.89 0.12 -1.18 0.18 60 | 5500 8.87 0.12 -1.16 0.18 61 | 5100 8.96 0.15 -1.03 0.21 62 | 5400 8.86 0.13 -1.19 0.19 63 | 5800 8.82 0.11 -1.23 0.17 64 | 5800 8.84 0.11 -1.18 0.17 65 | 6900 8.71 0.10 -1.30 0.13 66 | 8890 8.48 0.05 -1.34 0.08 67 | 7400 8.60 0.10 -1.37 0.11 68 | 7900 8.58 0.10 -1.42 0.13 69 | 7900 8.48 0.23 -1.25 0.30 70 | 8900 8.38 0.25 -1.37 0.33 71 | 7000 8.68 0.10 -1.35 0.12 72 | 10300 8.23 0.17 -1.28 0.23 73 | 8300 8.48 0.10 -1.42 0.14 74 | 8500 8.51 0.10 -1.45 0.13 75 | 8700 8.38 0.24 -1.46 0.35 76 | 8900 8.28 0.11 -1.64 0.16 77 | 12500 8.01 0.10 -1.43 0.12 78 | 7800 8.61 0.10 -1.41 0.10 79 | 8300 8.56 0.10 -1.49 0.14 80 | 8500 8.53 0.10 -1.44 0.13 81 | 10000 8.35 0.18 -1.40 0.25 82 | 8600 8.39 0.19 -1.52 0.26 83 | 7500 8.65 0.10 -1.34 0.11 84 | 11200 8.19 0.10 -1.48 0.15 85 | 7700 8.59 0.10 -1.46 0.12 86 | 7100 8.67 0.10 -1.50 0.12 87 | 11200 8.27 0.11 -1.27 0.15 88 | 11000 8.20 0.10 -1.57 0.15 89 | 9300 8.31 0.23 -1.27 0.29 90 | 7400 8.65 0.10 -1.45 0.11 91 | 10000 8.39 0.10 -1.47 0.12 92 | 11000 8.19 0.10 -1.43 0.15 93 | 9800 8.30 0.10 -1.52 0.14 94 | 9700 8.29 0.10 -1.55 0.15 95 | 10300 8.29 0.16 -1.41 0.23 96 | 9700 8.30 0.10 -1.58 0.15 97 | 7800 8.49 0.10 -1.51 0.14 98 | 8100 8.50 0.10 -1.43 0.14 99 | 8600 8.38 0.18 -1.51 0.26 100 | 9440 8.39 0.09 -1.53 0.13 101 | 4700 9.04 0.13 -0.82 0.15 102 | 4200 9.07 0.10 -0.95 0.13 103 | 4900 8.94 0.11 -1.07 0.14 104 | 5200 8.87 0.10 -1.00 0.13 105 | 4300 9.08 0.10 -0.88 0.12 106 | 5100 8.94 0.14 -1.00 0.26 107 | 5900 8.83 0.10 -1.07 0.13 108 | 5800 8.85 0.10 -1.02 0.14 109 | 5900 8.80 0.10 -1.03 0.13 110 | 7000 8.67 0.10 -1.12 0.16 111 | 6600 8.74 0.10 -1.21 0.14 112 | 5800 8.85 0.10 -1.05 0.17 113 | 6500 8.77 0.10 -1.18 0.14 114 | 6700 8.71 0.10 -1.16 0.13 115 | 7300 8.64 0.11 -1.16 0.17 116 | 6400 8.75 0.10 -1.22 0.14 117 | 10670 8.20 0.05 -1.09 0.08 118 | 4000 9.18 0.11 -0.55 0.14 119 | 4900 8.91 0.13 -0.97 0.16 120 | 5200 8.94 0.11 -0.82 0.15 121 | 3300 9.30 0.21 -0.61 0.20 122 | 4300 9.10 0.10 -0.79 0.12 123 | 4100 9.10 0.10 -0.90 0.13 124 | 3900 9.12 0.11 -0.96 0.14 125 | 4100 9.11 0.11 -0.92 0.13 126 | 3500 9.26 0.16 -0.79 0.17 127 | 3550 9.24 0.17 -0.63 0.17 128 | 4900 8.95 0.11 -0.89 0.14 129 | 3900 9.12 0.10 -0.88 0.14 130 | 4000 9.12 0.10 -0.88 0.14 131 | 4500 9.04 0.10 -0.78 0.12 132 | 6200 8.74 0.10 -1.14 0.12 133 | 7600 8.74 0.24 -1.16 0.30 134 | 8200 8.40 0.21 -1.23 0.27 135 | 6200 8.72 0.11 -1.28 0.15 136 | 7100 8.66 0.10 -1.38 0.12 137 | 9100 8.44 0.10 -1.35 0.14 138 | 8000 8.44 0.18 -1.36 0.28 139 | 8500 8.42 0.18 -1.39 0.25 140 | 10300 8.23 0.17 -1.53 0.23 141 | 8000 8.46 0.20 -1.40 0.28 142 | 7800 8.33 0.22 -1.48 0.31 143 | 7400 8.44 0.23 -1.48 0.32 144 | 8600 8.43 0.19 -1.47 0.26 145 | 9100 8.35 0.23 -1.56 0.31 146 | 8500 8.34 0.18 -1.58 0.25 147 | 8900 8.33 0.24 -1.58 0.32 148 | 9300 8.26 0.21 -1.56 0.29 149 | 9000 8.21 0.11 -1.55 0.15 150 | 5900 8.84 0.10 -1.14 0.13 151 | 7300 8.64 0.11 -1.27 0.17 152 | 6500 8.75 0.10 -1.25 0.14 153 | 6200 8.79 0.10 -1.18 0.15 154 | 7300 8.62 0.11 -1.32 0.17 155 | 6800 8.75 0.10 -1.28 0.13 156 | 7300 8.65 0.11 -1.29 0.17 157 | 8000 8.56 0.10 -1.35 0.15 158 | 9710 8.33 0.04 -1.34 0.08 159 | 7900 8.61 0.10 -1.37 0.13 160 | 11480 8.19 0.05 -1.31 0.08 161 | 10000 8.38 0.10 -1.38 0.13 162 | 9700 8.28 0.20 -1.30 0.27 163 | 9180 8.49 0.13 -1.53 0.19 164 | 10970 8.22 0.03 -1.37 0.06 165 | 9300 8.40 0.10 -1.42 0.14 166 | 12000 8.16 0.10 -1.32 0.13 167 | 13120 8.06 0.03 -1.43 0.07 168 | 13100 7.87 0.10 -1.68 0.14 169 | 13210 7.98 0.05 -1.48 0.09 170 | 6000 8.95 0.25 -1.30 0.34 171 | 6900 8.69 0.10 -1.22 0.14 172 | 6000 8.83 0.10 -1.08 0.13 173 | 8000 8.60 0.10 -1.25 0.15 174 | 6200 8.78 0.10 -0.96 0.15 175 | 5500 8.79 0.16 -1.16 0.19 176 | 5800 8.81 0.11 -1.09 0.17 177 | 5600 8.79 0.14 -1.12 0.18 178 | 6700 8.71 0.10 -1.19 0.13 179 | 6400 8.78 0.10 -1.19 0.14 180 | 6400 8.70 0.11 -1.26 0.14 181 | 6000 8.74 0.12 -1.25 0.16 182 | 5700 8.79 0.12 -1.24 0.17 183 | 3400 9.27 0.15 -0.70 0.18 184 | 3700 9.23 0.15 -0.67 0.16 185 | 3800 9.19 0.11 -0.74 0.15 186 | 3900 9.18 0.10 -0.78 0.14 187 | 3600 9.24 0.14 -0.81 0.16 188 | 4000 9.12 0.10 -0.89 0.14 189 | 4300 9.11 0.11 -0.79 0.12 190 | 4100 9.09 0.10 -0.99 0.13 191 | 5000 9.10 0.19 -1.08 0.28 192 | 4200 9.05 0.10 -1.06 0.13 193 | 4400 9.05 0.10 -0.97 0.12 194 | 5400 9.01 0.22 -1.21 0.28 195 | 4700 8.97 0.11 -1.07 0.15 196 | 6000 8.71 0.10 -1.02 0.16 197 | 5500 8.90 0.13 -1.05 0.18 198 | 5500 8.87 0.12 -1.06 0.18 199 | 6200 8.82 0.10 -1.09 0.15 200 | 7800 8.48 0.21 -1.50 0.31 201 | 8100 8.57 0.10 -1.29 0.25 202 | 9700 8.29 0.20 -1.44 0.27 203 | 8900 8.39 0.23 -1.60 0.32 204 | 8930 8.41 0.17 -1.44 0.27 205 | 10300 8.33 0.17 -1.59 0.23 206 | 8500 8.39 0.17 -1.41 0.25 207 | 10000 8.31 0.17 -1.66 0.25 208 | 9100 8.38 0.22 -1.48 0.31 209 | 12000 8.06 0.10 -1.46 0.13 210 | 10050 8.33 0.05 -1.55 0.09 211 | 3600 9.23 0.17 -0.57 0.17 212 | 4250 9.13 0.12 -0.80 0.15 213 | 9880 8.41 0.03 -1.17 0.06 214 | 10450 8.22 0.04 -1.39 0.07 215 | 7600 8.49 0.21 -1.49 0.30 216 | 8600 8.30 0.19 -1.47 0.26 217 | 8900 8.38 0.24 -1.54 0.33 218 | 9100 8.28 0.23 -1.48 0.31 219 | 12750 8.01 0.03 -1.44 0.06 220 | 8300 8.44 0.19 -1.55 0.27 221 | 10300 8.09 0.10 -1.43 0.14 222 | 13630 7.92 0.03 -1.45 0.06 223 | 12200 7.95 0.10 -1.51 0.13 224 | 225 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/data/vanzee_lines.dat: -------------------------------------------------------------------------------- 1 | # 2 | # VizieR Astronomical Server vizier.cfa.harvard.edu 3 | # Date: 2015-12-06T22:00:08 [V1.99+ (14-Oct-2013)] 4 | # In case of problem, please report to: cds-question@unistra.fr 5 | # 6 | # 7 | #Coosys J2000: eq_FK5 J2000 8 | #INFO votable-version=1.99+ (14-Oct-2013) 9 | #INFO -ref=VIZ5664af9a5d2d 10 | #INFO -out.max=unlimited 11 | #INFO queryParameters=25 12 | #-oc.form=dec 13 | #-out.max=unlimited 14 | #-nav=cat:J/AJ/116/2805&tab:{J/AJ/116/2805/table3}&key:source=J/AJ/116/2805/table3&HTTPPRM:&&-meta=1&-meta.foot=1&-meta.ucd=2& 15 | #-source=J/AJ/116/2805/table3 16 | #-order=I 17 | #-out=[OII] 18 | #-out=e_[OII] 19 | #-out=[NeIII] 20 | #-out=e_[NeIII] 21 | #-out=[OIII] 22 | #-out=e_[OIII] 23 | #-out=[OI] 24 | #-out=e_[OI] 25 | #-out=[SIII] 26 | #-out=e_[SIII] 27 | #-out=Halpha 28 | #-out=e_Halpha 29 | #-out=[NII] 30 | #-out=e_[NII] 31 | #-out=[SII] 32 | #-out=e_[SII] 33 | #-out=[ArIII] 34 | #-out=e_[ArIII] 35 | #-out=cHbeta 36 | #-out=e_cHbeta 37 | # 38 | 39 | #RESOURCE=yCat_51162805 40 | #Name: J/AJ/116/2805 41 | #Title: H II regions in spiral galaxies (Van Zee+, 1998) 42 | #Table J_AJ_116_2805_table3: 43 | #Name: J/AJ/116/2805/table3 44 | #Title: H II region line strengths 45 | #Column [OII] (F5.2) Relative [O II]3727+3729 line strength (2) [ucd=spect.line.intensity;arith.ratio] 46 | #Column e_[OII] (F5.2) rms uncertainty on [OII] [ucd=stat.error] 47 | #Column [NeIII] (F6.3) ? Relative [Ne III] 3869 line strength (2) [ucd=spect.line.intensity] 48 | #Column e_[NeIII] (F6.3) ? rms uncertainty on [NeIII] [ucd=stat.error] 49 | #Column [OIII] (F6.3) Relative [O III] 4959+5007 line strength (2) [ucd=spect.line.intensity;arith.ratio] 50 | #Column e_[OIII] (F6.3) rms uncertainty on [OIII] [ucd=stat.error] 51 | #Column [OI] (F6.3) ? Relative [O I] 6300 line strength (2) [ucd=spect.line.intensity;arith.ratio] 52 | #Column e_[OI] (F6.3) ? rms uncertainty on [OI] [ucd=stat.error] 53 | #Column [SIII] (F6.3) ? Relative [S III] 6312 line strength (2) [ucd=spect.line.intensity;arith.ratio] 54 | #Column e_[SIII] (F6.3) ? rms uncertainty on [SIII] [ucd=stat.error] 55 | #Column Halpha (F5.2) Relative H{alpha} 6563 line strength (2) [ucd=spect.line.intensity;arith.ratio] 56 | #Column e_Halpha (F5.2) rms uncertainty on Halpha [ucd=stat.error] 57 | #Column [NII] (F6.3) Relative [N II] 6548+6583 line strength (2) [ucd=spect.line.intensity;arith.ratio] 58 | #Column e_[NII] (F6.3) rms uncertainty on [NII] [ucd=stat.error] 59 | #Column [SII] (F6.3) Relative [S II] 6717+6731 line strength (2) [ucd=spect.line.intensity;arith.ratio] 60 | #Column e_[SII] (F6.3) rms uncertainty on [SII] [ucd=stat.error] 61 | #Column [ArIII] (F6.3) ? Relative [Ar III] 7136 line strength (2) [ucd=spect.line.intensity;arith.ratio] 62 | #Column e_[ArIII] (F6.3) ? rms uncertainty on [ArIII] [ucd=stat.error] 63 | #Column cHbeta (F5.2) Reddening coefficient c_H{beta}_ [ucd=phot.color.excess] 64 | #Column e_cHbeta (F5.2) rms uncertainty on cHbeta [ucd=stat.error] 65 | #[OII];e_[OII];[NeIII];e_[NeIII];[OIII];e_[OIII];[OI];e_[OI];[SIII];e_[SIII];Halpha;e_Halpha;[NII];e_[NII];[SII];e_[SII];[ArIII];e_[ArIII];cHbeta;e_cHbeta 66 | # ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 67 | #——;——;———;———;———;———;———;———;———;———;——;——;———;———;———;———;———;———;——;—— 68 | 2.19; 0.08; 0.059; 0.005; 1.486; 0.034; 0.010; 0.001; ; ; 2.86; 0.13; 0.676; 0.024; 0.426; 0.014; 0.066; 0.004; 0.29; 0.05 69 | 2.32; 0.16; ; ; 0.353; 0.036; ; ; ; ; 2.86; 0.20; 0.960; 0.057; 0.695; 0.040; ; ; 0.48; 0.07 70 | 2.62; 0.12; ; ; 1.035; 0.031; 0.029; 0.005; ; ; 2.65; 0.13; 0.807; 0.033; 0.631; 0.025; 0.055; 0.006; 0.45; 0.05 71 | 2.48; 0.10; ; ; 2.070; 0.050; 0.029; 0.003; ; ; 2.87; 0.13; 0.722; 0.027; 0.464; 0.017; 0.089; 0.005; 0.51; 0.05 72 | 2.26; 0.09; ; ; 0.709; 0.022; 0.015; 0.004; ; ; 2.86; 0.13; 0.879; 0.034; 0.698; 0.026; 0.054; 0.005; 0.48; 0.05 73 | 1.89; 0.07; 0.049; 0.004; 1.141; 0.025; 0.021; 0.001; ; ; 2.86; 0.13; 0.739; 0.027; 0.482; 0.017; 0.058; 0.003; 0.36; 0.05 74 | 2.96; 0.11; 0.070; 0.003; 2.068; 0.045; 0.018; 0.001; 0.010; 0.001; 2.81; 0.12; 0.686; 0.024; 0.360; 0.012; 0.078; 0.004; 0.39; 0.05 75 | 4.05; 0.21; ; ; 1.476; 0.052; ; ; ; ; 2.86; 0.16; 0.846; 0.040; 0.611; 0.028; 0.069; 0.008; 0.27; 0.06 76 | 2.35; 0.12; ; ; 1.925; 0.064; ; ; ; ; 3.74; 0.20; 1.001; 0.044; 0.736; 0.030; 0.101; 0.007; 0.40; 0.05 77 | 3.12; 0.14; ; ; 1.591; 0.042; ; ; ; ; 2.86; 0.14; 0.788; 0.032; 0.610; 0.023; 0.071; 0.005; 0.33; 0.05 78 | 2.88; 0.11; 0.122; 0.006; 2.715; 0.060; 0.036; 0.002; 0.007; 0.001; 2.72; 0.12; 0.666; 0.023; 0.500; 0.016; 0.084; 0.004; 0.41; 0.05 79 | 3.74; 0.15; ; ; 2.221; 0.051; ; ; ; ; 2.76; 0.13; 0.821; 0.030; 0.875; 0.031; 0.065; 0.004; 0.28; 0.05 80 | 4.76; 0.26; ; ; 2.488; 0.085; ; ; ; ; 2.82; 0.16; 0.795; 0.037; 0.958; 0.041; 0.086; 0.008; 0.05; 0.06 81 | 4.23; 0.25; ; ; 0.866; 0.053; ; ; ; ; 2.86; 0.19; 0.569; 0.037; 0.682; 0.039; ; ; 0.24; 0.07 82 | 4.12; 0.26; ; ; 2.254; 0.094; ; ; ; ; 2.83; 0.19; 0.822; 0.045; 0.946; 0.048; 0.096; 0.010; 0.38; 0.07 83 | 3.43; 0.16; ; ; 2.936; 0.080; ; ; ; ; 2.86; 0.15; 0.581; 0.027; 0.760; 0.032; 0.083; 0.008; 0.16; 0.05 84 | 3.39; 0.20; ; ; 4.014; 0.150; ; ; ; ; 2.83; 0.18; 0.532; 0.029; 0.626; 0.032; 0.082; 0.010; 0.08; 0.06 85 | 3.38; 0.16; ; ; 2.936; 0.082; ; ; ; ; 2.78; 0.15; 0.426; 0.020; 0.425; 0.018; 0.061; 0.006; 0.26; 0.05 86 | 2.48; 0.10; 0.395; 0.017; 5.365; 0.120; 0.022; 0.002; ; ; 2.56; 0.12; 0.211; 0.008; 0.205; 0.007; 0.068; 0.004; 0.39; 0.05 87 | 1.69; 0.08; ; ; 1.036; 0.031; ; ; ; ; 2.86; 0.14; 0.726; 0.030; 0.668; 0.027; 0.062; 0.006; 0.00; 0.05 88 | 2.37; 0.09; ; ; 0.698; 0.019; 0.043; 0.004; 0.011; 0.003; 2.87; 0.13; 0.899; 0.034; 0.931; 0.032; 0.041; 0.004; 0.18; 0.05 89 | 2.88; 0.11; ; ; 0.915; 0.023; ; ; ; ; 2.89; 0.13; 0.866; 0.032; 0.873; 0.030; 0.051; 0.003; 0.34; 0.05 90 | 2.94; 0.12; ; ; 0.826; 0.024; 0.059; 0.005; 0.013; 0.004; 2.89; 0.14; 0.919; 0.035; 0.945; 0.034; 0.047; 0.005; 0.38; 0.05 91 | 1.59; 0.06; ; ; 0.995; 0.025; ; ; ; ; 2.90; 0.13; 0.768; 0.028; 0.806; 0.028; 0.058; 0.004; 0.04; 0.05 92 | 3.20; 0.14; ; ; 0.545; 0.021; ; ; ; ; 2.90; 0.14; 0.959; 0.037; 0.867; 0.032; 0.046; 0.003; 0.53; 0.05 93 | 3.40; 0.14; ; ; 0.889; 0.023; ; ; ; ; 2.86; 0.13; 0.825; 0.031; 0.822; 0.029; 0.062; 0.004; 0.52; 0.05 94 | 2.82; 0.12; ; ; 1.275; 0.035; ; ; ; ; 2.86; 0.14; 0.758; 0.030; 0.751; 0.029; 0.057; 0.004; 0.28; 0.05 95 | 3.44; 0.17; 0.283; 0.017; 2.286; 0.072; 0.036; 0.003; ; ; 2.83; 0.15; 0.553; 0.023; 0.698; 0.027; 0.087; 0.006; 0.62; 0.05 96 | 2.54; 0.12; 0.365; 0.017; 5.129; 0.154; 0.034; 0.002; 0.011; 0.001; 2.84; 0.14; 0.289; 0.012; 0.339; 0.013; 0.112; 0.006; 0.33; 0.05 97 | 4.57; 0.22; 0.220; 0.012; 1.544; 0.048; 0.081; 0.004; ; ; 2.75; 0.14; 0.577; 0.023; 0.896; 0.035; 0.062; 0.004; 0.24; 0.05 98 | 4.12; 0.20; 0.416; 0.021; 2.716; 0.083; 0.079; 0.004; ; ; 2.80; 0.14; 0.430; 0.017; 0.779; 0.030; 0.074; 0.005; 0.19; 0.05 99 | 2.51; 0.10; 0.242; 0.011; 2.834; 0.063; 0.025; 0.002; 0.010; 0.001; 2.86; 0.13; 0.397; 0.015; 0.459; 0.017; 0.083; 0.005; 0.24; 0.05 100 | 3.04; 0.20; ; ; 3.489; 0.142; ; ; ; ; 2.83; 0.19; 0.324; 0.022; 0.727; 0.039; 0.051; 0.010; 0.31; 0.07 101 | 3.47; 0.16; ; ; 2.409; 0.070; ; ; ; ; 2.92; 0.15; 0.501; 0.023; 0.434; 0.019; 0.071; 0.007; 0.26; 0.06 102 | 2.72; 0.10; 0.270; 0.011; 4.091; 0.090; 0.032; 0.002; 0.013; 0.001; 2.65; 0.12; 0.318; 0.012; 0.378; 0.013; 0.088; 0.005; 0.51; 0.05 103 | 4.86; 0.24; ; ; 1.947; 0.059; 0.045; 0.002; 0.011; 0.001; 2.80; 0.14; 0.491; 0.020; 0.667; 0.025; 0.067; 0.004; 0.29; 0.05 104 | 4.86; 0.25; ; ; 2.656; 0.083; 0.117; 0.007; ; ; 2.86; 0.15; 0.451; 0.020; 0.917; 0.037; 0.068; 0.005; 0.29; 0.06 105 | 3.74; 0.19; ; ; 2.256; 0.071; ; ; ; ; 2.83; 0.15; 0.328; 0.014; 0.573; 0.023; 0.052; 0.004; 0.22; 0.05 106 | 4.67; 0.29; ; ; 1.087; 0.055; ; ; ; ; 2.83; 0.18; 0.319; 0.024; 0.657; 0.036; ; ; 0.17; 0.06 107 | 2.46; 0.12; 0.219; 0.012; 4.575; 0.139; ; ; ; ; 2.83; 0.14; 0.168; 0.007; 0.272; 0.011; 0.073; 0.005; 0.19; 0.05 108 | 3.32; 0.13; 0.195; 0.008; 3.423; 0.076; 0.068; 0.003; ; ; 2.86; 0.13; 0.366; 0.013; 0.601; 0.020; 0.069; 0.004; 0.23; 0.05 109 | 3.54; 0.18; 0.233; 0.013; 3.875; 0.120; 0.083; 0.004; 0.013; 0.001; 2.80; 0.14; 0.344; 0.015; 0.742; 0.029; 0.069; 0.004; 0.35; 0.05 110 | 3.55; 0.14; 0.227; 0.009; 3.760; 0.083; 0.056; 0.003; ; ; 2.68; 0.12; 0.303; 0.011; 0.502; 0.017; 0.070; 0.004; 0.32; 0.05 111 | 3.29; 0.16; 0.282; 0.015; 4.573; 0.140; 0.096; 0.005; 0.011; 0.001; 2.79; 0.14; 0.296; 0.013; 0.603; 0.024; 0.076; 0.005; 0.43; 0.05 112 | 4.62; 0.27; ; ; 1.721; 0.067; ; ; ; ; 2.83; 0.17; 0.361; 0.020; 0.533; 0.026; 0.066; 0.008; 0.26; 0.06 113 | 3.11; 0.12; 0.292; 0.012; 3.467; 0.077; 0.057; 0.003; ; ; 2.86; 0.13; 0.411; 0.014; 0.586; 0.020; 0.077; 0.004; 0.20; 0.05 114 | 3.08; 0.16; 0.570; 0.031; 4.906; 0.155; ; ; ; ; 2.83; 0.15; 0.234; 0.012; 0.521; 0.022; 0.051; 0.005; 0.20; 0.05 115 | 4.37; 0.22; ; ; 2.219; 0.068; 0.089; 0.005; 0.014; 0.002; 2.82; 0.15; 0.431; 0.018; 0.730; 0.028; 0.064; 0.004; 0.35; 0.05 116 | 3.97; 0.19; 0.095; 0.005; 1.994; 0.061; 0.045; 0.002; 0.010; 0.001; 2.85; 0.14; 0.392; 0.016; 0.577; 0.022; 0.061; 0.004; 0.44; 0.05 117 | 2.41; 0.14; ; ; 6.583; 0.222; 0.086; 0.007; ; ; 2.83; 0.16; 0.257; 0.014; 0.543; 0.025; 0.067; 0.007; 0.08; 0.06 118 | 3.39; 0.17; 0.325; 0.020; 4.487; 0.142; ; ; ; ; 2.83; 0.15; 0.215; 0.010; 0.358; 0.015; 0.089; 0.006; 0.43; 0.05 119 | 2.19; 0.11; 0.193; 0.010; 3.913; 0.118; 0.039; 0.002; 0.012; 0.001; 2.82; 0.14; 0.266; 0.011; 0.403; 0.016; 0.081; 0.005; 0.44; 0.05 120 | 3.38; 0.18; ; ; 2.976; 0.099; ; ; ; ; 2.83; 0.16; 0.359; 0.017; 0.653; 0.029; 0.073; 0.007; 0.16; 0.05 121 | 2.93; 0.15; 0.586; 0.030; 5.950; 0.184; 0.060; 0.004; 0.012; 0.003; 2.77; 0.14; 0.218; 0.010; 0.388; 0.015; 0.079; 0.005; 0.31; 0.05 122 | 3.67; 0.19; 0.285; 0.019; 3.678; 0.118; 0.050; 0.005; 0.013; 0.004; 2.83; 0.15; 0.284; 0.013; 0.598; 0.024; 0.068; 0.006; 0.22; 0.05 123 | 4.75; 0.32; ; ; 2.650; 0.118; ; ; ; ; 3.14; 0.22; 0.324; 0.033; 0.666; 0.041; ; ; 0.44; 0.07 124 | 4.60; 0.26; ; ; 2.320; 0.081; ; ; ; ; 2.86; 0.17; 0.316; 0.019; 0.821; 0.038; 0.043; 0.008; 0.43; 0.06 125 | 3.75; 0.18; 0.574; 0.028; 3.854; 0.118; 0.100; 0.005; ; ; 2.84; 0.15; 0.319; 0.013; 0.757; 0.029; 0.061; 0.004; 0.00; 0.05 126 | 4.73; 0.24; 0.216; 0.017; 2.145; 0.070; 0.043; 0.006; 0.032; 0.006; 2.86; 0.16; 0.308; 0.016; 0.633; 0.027; 0.048; 0.006; 0.35; 0.05 127 | 4.96; 0.30; ; ; 1.334; 0.062; ; ; ; ; 3.06; 0.20; 0.429; 0.028; 1.138; 0.058; ; ; 0.22; 0.07 128 | 4.98; 0.25; ; ; 1.499; 0.049; 0.136; 0.008; ; ; 3.26; 0.17; 0.502; 0.022; 1.024; 0.041; 0.092; 0.007; 0.10; 0.05 129 | 3.94; 0.20; 0.125; 0.010; 1.872; 0.060; 0.045; 0.004; 0.008; 0.003; 2.86; 0.15; 0.323; 0.015; 0.611; 0.024; 0.044; 0.004; 0.22; 0.05 130 | 2.04; 0.10; 0.238; 0.015; 5.653; 0.177; ; ; ; ; 2.79; 0.15; 0.148; 0.008; 0.258; 0.011; 0.076; 0.005; 0.14; 0.05 131 | 1.58; 0.11; ; ; 0.632; 0.049; ; ; ; ; 2.86; 0.19; 1.443; 0.079; 0.711; 0.038; ; ; 0.49; 0.06 132 | 1.47; 0.07; ; ; 0.204; 0.011; 0.032; 0.003; ; ; 2.90; 0.15; 1.172; 0.048; 0.692; 0.027; ; ; 0.37; 0.05 133 | 2.74; 0.16; ; ; 0.303; 0.032; ; ; ; ; 2.86; 0.18; 1.315; 0.069; 0.826; 0.043; ; ; 0.20; 0.06 134 | 2.90; 0.16; ; ; 0.412; 0.024; 0.076; 0.007; ; ; 2.86; 0.16; 1.431; 0.065; 0.858; 0.036; ; ; 0.52; 0.06 135 | 1.49; 0.07; ; ; 0.300; 0.010; 0.019; 0.001; 0.002; 0.001; 2.88; 0.15; 1.349; 0.054; 0.663; 0.025; 0.019; 0.001; 0.23; 0.05 136 | 2.28; 0.11; ; ; 0.652; 0.021; 0.046; 0.003; ; ; 2.84; 0.14; 1.166; 0.047; 0.724; 0.028; 0.033; 0.003; 0.26; 0.05 137 | 3.12; 0.16; ; ; 1.066; 0.037; 0.068; 0.008; ; ; 2.86; 0.16; 1.066; 0.047; 0.676; 0.029; 0.035; 0.007; 0.27; 0.05 138 | 2.53; 0.12; ; ; 1.349; 0.041; 0.032; 0.002; 0.007; 0.001; 2.86; 0.14; 1.018; 0.041; 0.580; 0.021; 0.057; 0.003; 0.49; 0.05 139 | 3.18; 0.15; ; ; 0.979; 0.030; 0.045; 0.002; 0.007; 0.001; 2.88; 0.15; 1.203; 0.048; 0.728; 0.027; 0.048; 0.003; 0.40; 0.05 140 | 4.18; 0.22; ; ; 1.590; 0.055; 0.131; 0.009; 0.018; 0.005; 2.94; 0.16; 1.030; 0.042; 1.028; 0.042; 0.062; 0.006; 0.39; 0.05 141 | 3.26; 0.25; ; ; 1.987; 0.110; ; ; ; ; 2.72; 0.22; 0.685; 0.054; 0.687; 0.053; ; ; 0.00; 0.08 142 | 2.91; 0.15; ; ; 1.114; 0.036; 0.067; 0.004; ; ; 2.79; 0.15; 1.073; 0.045; 0.758; 0.030; 0.039; 0.003; 0.34; 0.05 143 | 2.84; 0.14; ; ; 2.086; 0.064; 0.044; 0.003; ; ; 2.87; 0.15; 0.652; 0.027; 0.605; 0.024; 0.044; 0.003; 0.10; 0.05 144 | 3.51; 0.18; ; ; 1.875; 0.060; ; ; ; ; 2.86; 0.15; 0.821; 0.035; 0.520; 0.021; 0.060; 0.004; 0.29; 0.05 145 | 3.93; 0.20; ; ; 2.115; 0.068; 0.068; 0.006; ; ; 2.86; 0.16; 0.822; 0.035; 0.734; 0.031; 0.055; 0.006; 0.11; 0.05 146 | 3.40; 0.19; ; ; 1.639; 0.065; ; ; ; ; 2.88; 0.17; 0.737; 0.037; 0.717; 0.035; 0.041; 0.008; 0.19; 0.06 147 | 1.89; 0.09; 0.199; 0.010; 5.247; 0.159; 0.022; 0.001; 0.009; 0.001; 2.77; 0.14; 0.314; 0.013; 0.250; 0.010; 0.069; 0.004; 0.02; 0.05 148 | 1.00; 0.05; ; ; 0.244; 0.014; 0.067; 0.004; ; ; 2.92; 0.15; 2.360; 0.097; 0.873; 0.034; ; ; 0.97; 0.05 149 | 2.88; 0.40; ; ; 0.198; 0.110; ; ; ; ; 2.86; 0.38; 1.648; 0.174; 0.814; 0.083; ; ; 1.28; 0.13 150 | 2.20; 0.35; ; ; 0.877; 0.156; ; ; ; ; 2.86; 0.42; 1.730; 0.208; 0.658; 0.078; ; ; 1.03; 0.14 151 | 0.40; 0.04; ; ; 0.081; 0.033; ; ; ; ; 2.86; 0.18; 1.248; 0.065; 0.572; 0.029; ; ; 0.71; 0.06 152 | 1.25; 0.07; ; ; 0.395; 0.018; ; ; ; ; 2.86; 0.16; 1.403; 0.061; 0.709; 0.029; ; ; 0.34; 0.06 153 | 1.44; 0.08; ; ; 0.197; 0.023; 0.036; 0.005; ; ; 2.86; 0.17; 1.359; 0.062; 0.731; 0.032; ; ; 0.74; 0.06 154 | 1.35; 0.07; ; ; 0.105; 0.017; ; ; ; ; 2.86; 0.16; 1.252; 0.055; 0.590; 0.025; ; ; 0.55; 0.05 155 | 1.43; 0.11; ; ; 0.207; 0.047; ; ; ; ; 2.86; 0.20; 1.307; 0.077; 0.716; 0.042; ; ; 0.45; 0.07 156 | 0.67; 0.05; 0.336; 0.031; 0.104; 0.024; ; ; ; ; 2.86; 0.17; 1.216; 0.059; 0.562; 0.026; ; ; 0.61; 0.06 157 | 0.55; 0.04; ; ; 0.133; 0.030; ; ; ; ; 2.71; 0.16; 1.307; 0.064; 0.729; 0.035; ; ; 0.09; 0.06 158 | 0.16; 0.03; ; ; 0.056; 0.033; ; ; ; ; 2.84; 0.18; 1.187; 0.060; 0.348; 0.018; ; ; 0.26; 0.06 159 | 2.17; 0.18; ; ; 0.504; 0.064; ; ; ; ; 2.86; 0.23; 1.488; 0.097; 0.740; 0.048; ; ; 0.40; 0.08 160 | 1.17; 0.06; ; ; 0.137; 0.006; ; ; ; ; 2.75; 0.14; 1.304; 0.054; 0.534; 0.021; 0.020; 0.002; 0.34; 0.05 161 | 1.48; 0.09; ; ; 0.144; 0.024; ; ; ; ; 2.86; 0.17; 1.561; 0.075; 0.626; 0.028; ; ; 0.76; 0.06 162 | 1.46; 0.12; ; ; 0.438; 0.058; ; ; ; ; 2.83; 0.22; 1.599; 0.103; 0.910; 0.059; ; ; 0.42; 0.08 163 | 3.88; 0.20; ; ; 0.821; 0.028; 0.046; 0.004; ; ; 2.86; 0.15; 1.091; 0.046; 0.788; 0.032; 0.073; 0.006; 0.20; 0.05 164 | 3.54; 0.15; 0.386; 0.020; 4.651; 0.111; ; ; ; ; 2.86; 0.14; 0.702; 0.027; 1.123; 0.040; 0.097; 0.006; 0.25; 0.05 165 | 2.07; 0.08; 0.126; 0.005; 2.919; 0.064; ; ; ; ; 2.79; 0.12; 0.321; 0.011; 0.246; 0.009; 0.078; 0.004; 0.24; 0.05 166 | 4.18; 0.23; ; ; 0.634; 0.044; ; ; ; ; 3.95; 0.24; 0.819; 0.042; 1.134; 0.053; 0.034; 0.009; 0.39; 0.06 167 | 3.94; 0.17; ; ; 2.067; 0.053; ; ; ; ; 2.87; 0.14; 0.513; 0.021; 0.793; 0.029; 0.051; 0.004; 0.39; 0.05 168 | 3.87; 0.15; 0.199; 0.010; 4.055; 0.092; ; ; ; ; 2.86; 0.13; 0.416; 0.015; 0.682; 0.024; 0.085; 0.005; 0.14; 0.05 169 | 3.80; 0.16; ; ; 1.276; 0.033; 0.146; 0.007; ; ; 2.86; 0.13; 0.458; 0.017; 0.897; 0.032; 0.041; 0.003; 0.18; 0.05 170 | 3.23; 0.13; 0.076; 0.006; 2.900; 0.066; ; ; ; ; 2.71; 0.12; 0.335; 0.012; 0.408; 0.014; 0.076; 0.004; 0.14; 0.05 171 | 2.81; 0.11; 0.263; 0.010; 4.156; 0.091; 0.014; 0.001; 0.011; 0.001; 2.27; 0.10; 0.183; 0.006; 0.206; 0.007; 0.065; 0.003; 0.35; 0.05 172 | 3.37; 0.13; 0.146; 0.008; 2.294; 0.052; ; ; ; ; 2.86; 0.13; 0.376; 0.014; 0.413; 0.014; 0.071; 0.004; 0.16; 0.05 173 | 2.43; 0.13; ; ; 1.380; 0.052; ; ; ; ; 2.47; 0.14; 0.246; 0.017; 0.286; 0.017; ; ; 0.10; 0.06 174 | 3.48; 0.16; ; ; 1.011; 0.032; ; ; ; ; 2.59; 0.13; 0.335; 0.015; 0.415; 0.018; ; ; 0.20; 0.05 175 | 3.69; 0.16; ; ; 2.836; 0.072; ; ; ; ; 2.76; 0.13; 0.336; 0.014; 0.426; 0.016; 0.076; 0.006; 0.17; 0.05 176 | 3.33; 0.14; ; ; 3.106; 0.074; ; ; ; ; 2.30; 0.11; 0.222; 0.009; 0.219; 0.009; 0.055; 0.004; 0.22; 0.05 177 | 4.10; 0.18; ; ; 1.447; 0.039; ; ; ; ; 2.86; 0.14; 0.291; 0.013; 0.350; 0.014; 0.037; 0.004; 0.31; 0.05 178 | 3.60; 0.15; ; ; 2.328; 0.055; ; ; ; ; 2.54; 0.12; 0.254; 0.011; 0.428; 0.016; 0.051; 0.004; 0.10; 0.05 179 | 3.14; 0.14; ; ; 2.570; 0.065; ; ; ; ; 2.44; 0.12; 0.209; 0.010; 0.311; 0.012; 0.040; 0.004; 0.10; 0.05 180 | 4.33; 0.18; ; ; 0.612; 0.017; ; ; ; ; 2.58; 0.12; 0.308; 0.013; 0.443; 0.017; 0.026; 0.003; 0.10; 0.05 181 | 2.09; 0.10; 0.081; 0.004; 1.693; 0.051; 0.027; 0.001; 0.007; 0.001; 2.86; 0.14; 0.614; 0.024; 0.527; 0.020; 0.046; 0.003; 0.18; 0.05 182 | 3.90; 0.20; 0.180; 0.017; 2.226; 0.073; 0.041; 0.004; ; ; 2.88; 0.16; 0.637; 0.028; 0.634; 0.027; 0.059; 0.005; 0.44; 0.05 183 | 3.63; 0.18; 0.116; 0.009; 1.547; 0.048; 0.060; 0.003; ; ; 2.81; 0.14; 0.713; 0.030; 0.752; 0.029; 0.058; 0.004; 0.34; 0.05 184 | 2.93; 0.15; ; ; 1.552; 0.051; ; ; ; ; 2.88; 0.16; 0.755; 0.034; 0.574; 0.024; 0.066; 0.005; 0.37; 0.05 185 | 4.23; 0.24; ; ; 1.995; 0.073; ; ; ; ; 2.79; 0.16; 0.617; 0.029; 0.682; 0.031; 0.039; 0.006; 0.46; 0.06 186 | 2.68; 0.13; 0.145; 0.008; 2.777; 0.083; 0.033; 0.002; 0.011; 0.001; 2.82; 0.14; 0.467; 0.019; 0.483; 0.019; 0.068; 0.004; 0.16; 0.05 187 | 4.01; 0.20; ; ; 2.156; 0.065; 0.051; 0.003; 0.009; 0.001; 2.82; 0.14; 0.617; 0.025; 0.752; 0.029; 0.051; 0.003; 0.22; 0.05 188 | 4.35; 0.21; 0.260; 0.013; 2.512; 0.076; 0.077; 0.004; ; ; 2.87; 0.15; 0.535; 0.021; 0.816; 0.031; 0.054; 0.003; 0.09; 0.05 189 | 2.52; 0.12; 0.300; 0.015; 4.662; 0.140; 0.044; 0.002; 0.013; 0.001; 2.87; 0.15; 0.275; 0.011; 0.463; 0.018; 0.065; 0.004; 0.28; 0.05 190 | 3.04; 0.17; 0.183; 0.020; 3.881; 0.132; 0.055; 0.009; ; ; 2.90; 0.16; 0.375; 0.021; 0.729; 0.033; 0.064; 0.009; 0.21; 0.06 191 | 3.64; 0.18; 0.391; 0.019; 4.552; 0.138; 0.060; 0.004; 0.014; 0.002; 2.82; 0.14; 0.350; 0.014; 0.526; 0.021; 0.070; 0.005; 0.10; 0.05 192 | 4.83; 0.26; ; ; 3.683; 0.123; 0.107; 0.008; ; ; 2.95; 0.17; 0.452; 0.022; 0.859; 0.037; 0.057; 0.007; 0.01; 0.06 193 | 2.68; 0.14; 0.134; 0.013; 3.762; 0.120; 0.042; 0.004; ; ; 2.97; 0.16; 0.314; 0.014; 0.451; 0.019; 0.074; 0.005; 0.26; 0.05 194 | 3.24; 0.16; ; ; 5.371; 0.165; 0.038; 0.003; 0.013; 0.002; 2.94; 0.15; 0.230; 0.010; 0.392; 0.016; 0.065; 0.004; 0.31; 0.05 195 | 3.11; 0.15; 0.390; 0.018; 4.681; 0.140; 0.047; 0.002; 0.014; 0.001; 2.83; 0.14; 0.270; 0.011; 0.447; 0.017; 0.066; 0.004; 0.21; 0.05 196 | 5.32; 0.31; ; ; 2.612; 0.098; 0.027; 0.002; 0.013; 0.002; 2.79; 0.17; 0.469; 0.026; 0.772; 0.039; ; ; 0.00; 0.06 197 | 1.95; 0.10; 0.465; 0.023; 7.003; 0.212; 0.027; 0.002; 0.013; 0.002; 2.84; 0.15; 0.178; 0.008; 0.248; 0.010; 0.062; 0.004; 0.19; 0.05 198 | 2.47; 0.12; 0.523; 0.026; 6.455; 0.197; 0.030; 0.002; 0.017; 0.001; 2.79; 0.14; 0.166; 0.007; 0.297; 0.011; 0.075; 0.005; 0.30; 0.05 199 | 2.24; 0.18; ; ; 3.469; 0.169; ; ; ; ; 2.91; 0.23; 0.090; 0.015; 0.408; 0.028; ; ; 0.00; 0.08 200 | 1.23; 0.07; 0.278; 0.021; 6.338; 0.208; 0.039; 0.003; 0.014; 0.002; 2.72; 0.15; 0.076; 0.004; 0.165; 0.008; 0.038; 0.003; 0.37; 0.06 201 | 5.32; 0.62; ; ; 1.165; 0.144; 0.126; 0.020; ; ; 2.86; 0.35; 1.105; 0.109; 1.077; 0.098; ; ; 1.16; 0.12 202 | 2.01; 0.14; ; ; 2.000; 0.087; ; ; ; ; 2.85; 0.19; 0.679; 0.037; 0.622; 0.032; 0.049; 0.006; 0.68; 0.07 203 | 3.32; 0.44; ; ; 2.490; 0.218; ; ; ; ; 2.86; 0.37; 0.764; 0.085; 0.874; 0.087; ; ; 1.11; 0.12 204 | 3.64; 0.32; ; ; 3.475; 0.193; 0.100; 0.014; ; ; 2.93; 0.26; 0.612; 0.048; 0.782; 0.055; ; ; 0.61; 0.09 205 | 3.18; 0.24; ; ; 1.581; 0.090; ; ; ; ; 2.86; 0.22; 1.361; 0.088; 0.948; 0.060; ; ; 0.67; 0.08 206 | 3.86; 0.39; ; ; 0.148; 0.085; ; ; ; ; 2.86; 0.17; 1.290; 0.118; 1.062; 0.091; ; ; 0.64; 0.10 207 | 3.36; 0.18; ; ; 0.808; 0.042; ; ; ; ; 2.86; 0.30; 1.218; 0.061; 0.832; 0.041; 0.032; 0.010; 0.55; 0.06 208 | 3.79; 0.20; ; ; 0.327; 0.035; ; ; ; ; 2.86; 0.17; 1.310; 0.063; 1.030; 0.047; ; ; 0.64; 0.06 209 | 3.50; 0.14; ; ; 1.885; 0.044; ; ; ; ; 2.80; 0.13; 0.778; 0.028; 0.514; 0.018; 0.081; 0.005; 0.36; 0.05 210 | 2.90; 0.13; ; ; 2.069; 0.056; ; ; ; ; 2.86; 0.14; 0.712; 0.030; 0.478; 0.019; 0.080; 0.006; 0.22; 0.05 211 | 4.24; 0.25; ; ; 0.683; 0.046; ; ; ; ; 2.86; 0.19; 0.919; 0.053; 0.883; 0.048; 0.067; 0.014; 0.21; 0.06 212 | 3.83; 0.20; ; ; 0.614; 0.030; ; ; ; ; 2.86; 0.16; 0.953; 0.051; 0.809; 0.041; ; ; 0.34; 0.06 213 | 3.51; 0.17; ; ; 0.644; 0.030; ; ; ; ; 2.86; 0.16; 0.892; 0.043; 0.635; 0.031; 0.058; 0.012; 0.14; 0.06 214 | 0.39; 0.02; ; ; 0.107; 0.016; ; ; ; ; 2.86; 0.14; 0.985; 0.041; 0.488; 0.019; ; ; 0.10; 0.05 215 | 0.63; 0.05; ; ; 0.191; 0.030; 0.074; 0.006; ; ; 2.86; 0.17; 1.371; 0.066; 0.601; 0.027; 0.019; 0.004; 0.69; 0.06 216 | 0.69; 0.03; ; ; 0.224; 0.013; ; ; ; ; 2.86; 0.14; 1.180; 0.047; 0.525; 0.019; ; ; 0.18; 0.05 217 | 0.98; 0.06; ; ; 0.221; 0.030; ; ; ; ; 2.86; 0.17; 1.368; 0.064; 0.662; 0.031; ; ; 0.43; 0.06 218 | 0.74; 0.04; ; ; 0.129; 0.013; 0.042; 0.004; ; ; 2.86; 0.14; 1.131; 0.044; 0.581; 0.022; ; ; 0.23; 0.05 219 | 1.21; 0.05; ; ; 0.191; 0.015; ; ; ; ; 2.87; 0.14; 1.243; 0.048; 0.681; 0.025; 0.019; 0.004; 0.28; 0.05 220 | 1.10; 0.07; ; ; 0.390; 0.035; ; ; ; ; 2.86; 0.17; 1.209; 0.056; 0.796; 0.037; ; ; 0.35; 0.06 221 | 1.61; 0.07; ; ; 0.196; 0.011; ; ; ; ; 2.86; 0.13; 1.277; 0.047; 0.835; 0.029; 0.020; 0.002; 0.24; 0.05 222 | 2.62; 0.11; ; ; 1.053; 0.024; ; ; ; ; 2.86; 0.13; 1.154; 0.043; 0.713; 0.025; 0.053; 0.003; 0.24; 0.05 223 | 1.63; 0.11; ; ; 0.172; 0.048; ; ; ; ; 2.86; 0.20; 1.083; 0.066; 0.709; 0.043; ; ; 0.05; 0.07 224 | 1.69; 0.07; ; ; 0.352; 0.013; ; ; ; ; 2.86; 0.14; 1.221; 0.048; 0.633; 0.024; ; ; 0.38; 0.05 225 | 3.94; 0.48; ; ; 1.090; 0.141; ; ; ; ; 2.86; 0.37; 1.267; 0.139; 0.886; 0.092; ; ; 0.65; 0.12 226 | 2.30; 0.12; ; ; 0.304; 0.031; ; ; ; ; 2.86; 0.16; 1.189; 0.057; 0.742; 0.035; 0.026; 0.010; 0.05; 0.06 227 | 1.84; 0.09; 0.219; 0.021; 3.747; 0.100; ; ; ; ; 2.78; 0.14; 0.638; 0.028; 0.272; 0.012; 0.118; 0.008; 0.53; 0.05 228 | 2.35; 0.13; ; ; 1.203; 0.049; ; ; ; ; 2.86; 0.17; 0.993; 0.049; 0.400; 0.021; 0.068; 0.007; 0.27; 0.06 229 | 2.69; 0.15; ; ; 0.890; 0.041; ; ; ; ; 2.82; 0.16; 1.063; 0.051; 0.501; 0.025; 0.049; 0.008; 0.27; 0.06 230 | 2.46; 0.11; ; ; 2.117; 0.057; ; ; ; ; 2.80; 0.14; 0.788; 0.033; 0.754; 0.029; 0.061; 0.007; 0.10; 0.05 231 | 2.03; 0.10; 0.927; 0.044; 7.809; 0.281; 0.452; 0.022; 0.020; 0.001; 2.71; 0.14; 0.648; 0.035; 0.746; 0.029; 0.075; 0.005; 0.62; 0.05 232 | 4.08; 0.19; ; ; 1.529; 0.044; 0.031; 0.002; ; ; 2.72; 0.14; 0.381; 0.002; 0.636; 0.024; 0.054; 0.004; 0.30; 0.05 233 | 3.20; 0.30; ; ; 4.076; 0.217; ; ; ; ; 2.86; 0.33; 0.460; 0.222; 0.891; 0.228; ; ; 0.20; 0.11 234 | 2.88; 0.13; 0.176; 0.008; 3.798; 0.105; 0.017; 0.001; 0.018; 0.001; 2.71; 0.14; 0.244; 0.009; 0.292; 0.011; 0.090; 0.005; 0.35; 0.05 235 | 4.46; 0.21; 0.146; 0.011; 2.381; 0.068; ; ; ; ; 2.82; 0.15; 0.297; 0.013; 0.678; 0.027; 0.050; 0.003; 0.27; 0.05 236 | 2.60; 0.12; 0.336; 0.019; 4.076; 0.118; ; ; ; ; 2.79; 0.15; 0.237; 0.011; 0.509; 0.020; 0.075; 0.005; 0.21; 0.05 237 | 3.67; 0.17; 0.462; 0.023; 5.217; 0.149; ; ; ; ; 2.72; 0.14; 0.232; 0.011; 0.620; 0.024; 0.091; 0.006; 0.30; 0.05 238 | 3.07; 0.14; 0.092; 0.005; 2.551; 0.071; 0.026; 0.001; 0.022; 0.001; 2.77; 0.14; 0.309; 0.013; 0.371; 0.014; 0.076; 0.004; 0.16; 0.05 239 | 4.34; 0.21; ; ; 3.217; 0.092; 0.029; 0.003; 0.008; 0.003; 2.35; 0.12; 0.211; 0.010; 0.382; 0.016; 0.069; 0.005; 0.50; 0.05 240 | 3.94; 0.18; 0.187; 0.010; 3.037; 0.086; ; ; ; ; 2.85; 0.15; 0.326; 0.014; 0.529; 0.021; 0.085; 0.005; 0.15; 0.05 241 | 2.72; 0.13; 0.246; 0.014; 4.519; 0.130; ; ; ; ; 2.68; 0.14; 0.195; 0.010; 0.285; 0.012; 0.086; 0.006; 0.22; 0.05 242 | 3.06; 0.14; 0.293; 0.015; 4.968; 0.139; 0.028; 0.002; 0.013; 0.002; 2.73; 0.14; 0.196; 0.008; 0.377; 0.014; 0.080; 0.005; 0.19; 0.05 243 | 0.43; 0.03; ; ; 0.168; 0.017; ; ; ; ; 2.86; 0.15; 1.173; 0.051; 0.564; 0.024; ; ; 0.62; 0.05 244 | 0.94; 0.09; ; ; 0.461; 0.055; ; ; ; ; 2.82; 0.21; 1.122; 0.070; 0.576; 0.035; ; ; 0.66; 0.08 245 | 0.98; 0.04; 0.523; 0.023; 7.906; 0.219; 0.023; 0.001; 0.016; 0.001; 2.83; 0.14; 0.149; 0.006; 0.176; 0.006; 0.089; 0.005; 0.18; 0.05 246 | 3.00; 0.14; 0.280; 0.013; 3.996; 0.112; 0.032; 0.002; 0.012; 0.001; 2.77; 0.14; 0.269; 0.010; 0.347; 0.014; 0.064; 0.004; 0.21; 0.05 247 | 3.88; 0.18; ; ; 1.494; 0.044; ; ; 0.010; 0.002; 2.78; 0.14; 0.387; 0.017; 0.387; 0.016; 0.051; 0.004; 0.19; 0.05 248 | 3.94; 0.19; 0.094; 0.010; 1.299; 0.040; ; ; ; ; 2.79; 0.15; 0.253; 0.016; 0.534; 0.021; 0.034; 0.003; 0.25; 0.05 249 | 4.01; 0.23; ; ; 2.495; 0.090; ; ; ; ; 2.78; 0.18; 0.321; 0.020; 0.390; 0.021; 0.037; 0.008; 0.25; 0.06 250 | 2.99; 0.14; 0.141; 0.012; 2.544; 0.076; ; ; ; ; 2.67; 0.14; 0.241; 0.011; 0.441; 0.019; 0.041; 0.005; 0.23; 0.05 251 | 2.05; 0.09; 0.338; 0.015; 5.311; 0.147; 0.023; 0.001; 0.015; 0.001; 2.77; 0.14; 0.136; 0.005; 0.206; 0.008; 0.059; 0.003; 0.15; 0.05 252 | 4.24; 0.20; 0.122; 0.008; 1.964; 0.056; ; ; ; ; 2.69; 0.14; 0.332; 0.014; 0.559; 0.022; 0.041; 0.003; 0.23; 0.05 253 | 3.57; 0.18; 0.274; 0.022; 3.248; 0.102; 0.015; 0.005; ; ; 2.70; 0.15; 0.314; 0.016; 0.423; 0.019; 0.046; 0.005; 0.21; 0.06 254 | 2.13; 0.10; 0.336; 0.016; 4.837; 0.135; 0.035; 0.002; 0.014; 0.001; 2.68; 0.14; 0.135; 0.005; 0.247; 0.009; 0.040; 0.003; 0.12; 0.05 255 | 3.10; 0.15; 0.270; 0.016; 2.377; 0.069; 0.023; 0.002; ; ; 2.72; 0.14; 0.179; 0.008; 0.316; 0.013; 0.035; 0.003; 0.32; 0.05 256 | 257 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/dopita.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | __all__ = ["plot_bpt"] 7 | 8 | import numpy as np 9 | import matplotlib.pyplot as plt 10 | import pkg_resources 11 | 12 | c = 2.9979e10 13 | 14 | def plot_bpt(logq_val='all', z_val=1.0, kappa_val=20, label='Dopita (2013)', 15 | line_ratio='NIIb', ax=None, color='k', tcolor='k', 16 | lw=2, make_faint=False, alpha=0.5, zlims=(-1.3, 0.7), 17 | **kwargs): 18 | ''' 19 | dopita.plot_bpt(logq_val='all', color='blue', use_doublet=True) 20 | ''' 21 | linefile = pkg_resources.resource_filename(__name__, "data/dopita_lines.dat") 22 | Z, kappa, logq, OIIa, OIIb, OIIIa, OIIIb, OI, NIIa, Ha, NIIb, SIIa, SIIb = np.genfromtxt(linefile, comments='#', delimiter=';', missing_values=' ', filling_values=np.inf, unpack=True) 23 | data = dict(Z=Z, kappa=kappa, logq=logq, OIIa=OIIa, OIIb=OIIb, OIIIa=OIIIa, 24 | OIIIb=OIIIb, OI=OI, NIIa=NIIa, Ha=Ha, NIIb=NIIb, SIIa=SIIa, 25 | SIIb=SIIb) 26 | if line_ratio in ['NII', 'SII']: 27 | rat_x = np.log10((data[line_ratio+'a']+data[line_ratio+'b'])/data['Ha']) 28 | rat_y = np.log10(data['OIIIa']+data['OIIIb']) 29 | if line_ratio in ['NIIb','OI']: 30 | rat_x = np.log10(data[line_ratio]/data['Ha']) 31 | rat_y = np.log10(data['OIIIb']) 32 | if line_ratio == 'OII': 33 | rat_x = np.log10((data['NIIa']+data['NIIb'])/(data['OIIa']+ data['OIIb'])) 34 | rat_y = np.log10((data['OIIIa']+data['OIIIb'])/(data['OIIa']+ data['OIIb'])) 35 | if line_ratio == 'R23': 36 | rat_x = np.log10((data['OIIIa'] + data['OIIIb'] + data['OIIa'] + data['OIIb'])) 37 | rat_y = np.log10((data['OIIIa']+data['OIIIb'])/(data['OIIa']+ data['OIIb'])) 38 | if ax is None: 39 | ax = plt.gca() 40 | if logq_val == 'all': 41 | inds, = np.where((data['kappa'] == kappa_val) & 42 | (np.log10(data['Z']) >= zlims[0]) & 43 | (np.log10(data['Z']) <= zlims[1])) 44 | if make_faint: 45 | zinds, = np.where((data['kappa'] == kappa_val) & 46 | (np.log10(data['Z']) > zlims[1])) 47 | else: 48 | inds, = np.where((data['logq'] == logq_val) & 49 | (data['Z'] == z_val) & 50 | (data['kappa'] == kappa_val)) 51 | do_grid = kwargs.get('do_grid', True) 52 | add_labels = kwargs.get('add_labels', False) 53 | if do_grid: 54 | i=0 55 | for q in np.unique(data['logq']): 56 | inds, = np.where((data['logq'] == q) & (data['kappa'] == kappa_val) & (np.log10(data['Z']) >= zlims[0]) & (np.log10(data['Z']) <= zlims[1])) 57 | zinds, = np.where((data['logq'] == q) & (data['kappa'] == kappa_val) & (np.log10(data['Z']) >= zlims[1])) 58 | if i == 0: 59 | ax.plot(rat_x[inds], rat_y[inds], color=color, label=label, lw=lw) 60 | else: 61 | ax.plot(rat_x[inds], rat_y[inds], color=color, 62 | label='__nolegend__', lw=lw) 63 | if make_faint: 64 | ax.plot(rat_x[zinds], rat_y[zinds], color=color, 65 | label='__nolegend__', lw=lw, alpha=alpha) 66 | if add_labels: 67 | ax.annotate('{0:.1f}'.format(np.log10((10.0**q)/c)), 68 | xy=(rat_x[inds][-1], rat_y[inds][-1]), 69 | xycoords='data', 70 | xytext=(-10,0), textcoords='offset points', 71 | horizontalalignment='right', 72 | verticalalignment='bottom', 73 | size=18, color=tcolor) 74 | i+=1 75 | for z in np.unique(data['Z']): 76 | if (np.log10(z) >= zlims[0]) & (np.log10(z) >= zlims[0]): 77 | inds, = np.where((data['Z'] == z) & (data['kappa'] == kappa_val)) 78 | ax.plot(rat_x[inds], rat_y[inds], color=color, lw=lw) 79 | if add_labels: 80 | ax.annotate('{0:.1f}'.format(np.log10(z)), 81 | xy=(rat_x[inds][-1], rat_y[inds][-1]), 82 | xycoords='data', 83 | xytext=(0,-10), textcoords='offset points', 84 | horizontalalignment='left', 85 | verticalalignment='top', 86 | size=18, color=tcolor) 87 | elif np.log10(z) >= zlims[1]: 88 | inds, = np.where((data['Z'] == z) & (data['kappa'] == kappa_val)) 89 | ax.plot(rat_x[inds], rat_y[inds], color=color, lw=lw, alpha=alpha) 90 | return 91 | 92 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/kewley.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | __all__ = ["NII_OIII_sf_lim", "NII_OIII_agn_lim", "SII_OIII_agn_lim", "OI_OIII_agn_lim"] 7 | 8 | import numpy as np 9 | import matplotlib.pyplot as plt 10 | 11 | def NII_OIII_sf_lim(ax=None, color='k', **kwargs): 12 | ''' 13 | Kewley (2006) division for SF/composite 14 | [NII]6584/Ha vs [OIII]5007/Hb 15 | ''' 16 | if ax is None: 17 | ax = plt.gca() 18 | NII = np.linspace(-4.5, 0.04) 19 | OIII = 0.61/(NII - 0.05) + 1.3 20 | ax.plot(NII, OIII, '--', color=color, lw=2) 21 | return 22 | def NII_OIII_agn_lim(ax=None, color='k', **kwargs): 23 | ''' 24 | Kewley (2006) division for composite/agn 25 | [NII]6584/Ha vs [OIII]5007/Hb 26 | ''' 27 | if ax is None: 28 | ax = plt.gca() 29 | NII = np.linspace(-4.5, 0.46, 100) 30 | OIII = 0.61/(NII - 0.47) + 1.19 31 | ax.plot(NII, OIII, color=color, lw=2) 32 | return 33 | def SII_OIII_agn_lim(ax=None, color='k', **kwargs): 34 | ''' 35 | Kewley (2006) 36 | [SII]6717,31/Ha vs [OIII]5007/Hb 37 | ''' 38 | if ax is None: 39 | ax = plt.gca() 40 | SII = np.linspace(-3.0, 0.31) 41 | OIII = 0.72/(SII - 0.32) + 1.3 42 | ax.plot(SII, OIII, color=color, lw=2) 43 | return 44 | def OI_OIII_agn_lim(ax=None, color='k', **kwargs): 45 | ''' 46 | Kewley (2006) 47 | [OI]6300/Ha vs [OIII]5007/Hb 48 | ''' 49 | if ax is None: 50 | ax = plt.gca() 51 | OI = np.linspace(-3.5, 0.5) 52 | OIII = 0.73/(OI + 0.59) + 1.33 53 | ax.plot(OI, OIII, color=color, lw=2) 54 | return 55 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/sdss.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | __all__ = ["plot_bpt"] 7 | import numpy as np 8 | import pkg_resources 9 | from .kewley import (NII_OIII_agn_lim, NII_OIII_sf_lim, 10 | OI_OIII_agn_lim, SII_OIII_agn_lim) 11 | import matplotlib.pyplot as plt 12 | import matplotlib.colors as mpl_colors 13 | from matplotlib import cm as cmx 14 | 15 | def load_spec(): 16 | linefile = pkg_resources.resource_filename(__name__, "data/sdss_data_ls.npz") 17 | data = np.load(linefile) 18 | i, = np.where((data['lineindex_cln'] == 4) | (data['lineindex_cln'] == 5)) 19 | outdata = dict() 20 | for key, val in data.iteritems(): 21 | outdata[key] = val 22 | def logify(a,b): 23 | if a is None or b is None: 24 | to_return = None 25 | else: 26 | np.seterr(all="ignore") 27 | to_return = np.log10(a/b) 28 | np.seterr(all=None) 29 | return to_return 30 | outdata['log_OIII_OII'] = logify(data['strength_OIII'][i], data['strength_OII'][i]) 31 | outdata['log_NII_OII'] = logify(data['strength_NII'][i], data['strength_OII'][i]) 32 | outdata['log_OIII_Hb'] = logify(data['strength_OIII'][i], data['strength_Hb'][i]) 33 | outdata['log_OIIIb_Hb'] = logify(data['strength_OIIIb'][i], data['strength_Hb'][i]) 34 | outdata['log_NII_Ha'] = logify(data['strength_NII'][i], data['strength_Ha'][i]) 35 | outdata['log_NIIb_Ha'] = logify(data['strength_NIIb'][i], data['strength_Ha'][i]) 36 | outdata['log_SII_Ha'] = logify(data['strength_SII'][i], data['strength_Ha'][i]) 37 | outdata['log_OI_Ha'] = logify(data['strength_OI'][i], data['strength_Ha'][i]) 38 | outdata['log_OIa_Ha'] = logify(data['strength_OIa'][i], data['strength_Ha'][i]) 39 | outdata['log_OII_Ha'] = logify(data['strength_OII'][i], data['strength_Ha'][i]) 40 | outdata['log_OIII_OII'] = logify(data['strength_OIII'][i], data['strength_OII'][i]) 41 | outdata['HaHb'] = data['strength_Ha'][i]/data['strength_Hb'][i] 42 | outdata['R23'] = np.log10((data['strength_OII'][i] + data['strength_OIII'][i])/data['strength_Hb'][i]) 43 | return outdata 44 | 45 | def get_line_ratio(data, line_ratio, **kwargs): 46 | both_OIII = kwargs.get('both_OIII', False) 47 | yratio = 'log_OIIIb_Hb' 48 | xratio = 'log_NIIb_Ha' 49 | if line_ratio == 'OII': # this produces NII/OII by OIII/OII plot 50 | yratio = 'log_OIII_OII' 51 | xratio = 'log_NII_OII' 52 | elif line_ratio == 'R23': 53 | xratio = 'R23' 54 | yratio = 'log_OIII_OII' 55 | else: 56 | if line_ratio == 'OI': 57 | xratio = 'log_OIa_Ha' 58 | yratio = 'log_OIIIb_Hb' 59 | else: 60 | xratio = 'log_{}_Ha'.format(line_ratio) 61 | if (line_ratio[-1] == 'b' or line_ratio[-1] == 'a'): 62 | yratio = 'log_OIIIb_Hb' 63 | else: 64 | yratio = 'log_OIII_Hb' 65 | if both_OIII: 66 | yratio = 'log_OIII_Hb' 67 | return xratio, yratio 68 | 69 | def plot_bpt(var_label, ax=None, color_code=False, line_ratio='NIIb', **kwargs): 70 | ''' 71 | sdss.plot_bpt(True) 72 | SDSS data generated with astroML.fetch_corrected_sdss_spectra() 73 | ''' 74 | assert line_ratio in ['NII','NIIb','SII','OI', 'OIa', 'OII', 'R23'] 75 | if var_label: 76 | lab = kwargs.get('lab', 'SDSS') 77 | else: 78 | lab = '__nolegend__' 79 | 80 | data = load_spec() 81 | lineindex_cln = 'lineindex_cln' 82 | il = np.where((data['lineindex_cln'] == 4) | (data['lineindex_cln'] == 5)) 83 | xratio, yratio = get_line_ratio(data, line_ratio, **kwargs) 84 | 85 | if ax is None: 86 | plt.figure() 87 | ax = plt.gca() 88 | if color_code: 89 | color_by = kwargs.get('color_by', 'bpt') 90 | if color_by == 'bpt': 91 | ax.scatter(data[xratio], data[yratio], 92 | c=data[lineindex_cln][il], s=9, lw=0, 93 | label=lab) 94 | elif color_by == 'HaHb': 95 | gi, = np.where(data[color_by] <= 15.) 96 | sM = retColors(data[color_by][gi], cname='gist_heat') 97 | for g in gi: 98 | if g == gi[0]: 99 | plab = lab 100 | else: 101 | plab = '__nolegend__' 102 | ax.plot(data[xratio][g], data[yratio][g], 103 | color=sM.to_rgba(data[color_by][g]), 104 | marker='.', markersize=6, label=plab) 105 | fig = plt.gcf() 106 | cb = fig.colorbar(sM) 107 | cb.set_label(r'$H \alpha / H\beta$') 108 | else: 109 | ax.plot(data[xratio], data[yratio], 'o', 110 | markersize=2.0, color='k', alpha=0.5, label=lab) 111 | if line_ratio[0] == 'N': 112 | NII_OIII_agn_lim(ax=ax) 113 | NII_OIII_sf_lim(ax=ax) 114 | ax.set_xlim(-2.0, 1.0) 115 | ax.set_ylim(-1.2, 1.5) 116 | if line_ratio[0] == 'S': 117 | SII_OIII_agn_lim(ax=ax) 118 | ax.set_xlim(-2.0, 0.3) 119 | ax.set_ylim(-1.2, 1.5) 120 | if (line_ratio == 'OI' or line_ratio == 'OIa'): 121 | OI_OIII_agn_lim(ax=ax) 122 | ax.set_xlim(-2.0, 0.0) 123 | ax.set_ylim(-1.2, 1.5) 124 | if (line_ratio == 'OII'): 125 | ax.set_ylim(-2.0, 1.0) 126 | ax.set_xlim(-1.3, 1.3) 127 | return 128 | 129 | def retColors(vals, cname='CMRmap', minv=0.05, maxv=0.8, cmap=None, 130 | set_bad_vals=False, return_cNorm=False, logNorm=False): 131 | ''' 132 | sM = get_colors(arr, cname='jet', minv=0.0, maxv=1.0) 133 | sM = get_colors(arr, cmap=cubehelix.cmap()) 134 | ''' 135 | if cmap is None: 136 | cmap = plt.get_cmap(cname) 137 | new_cmap = mpl_colors.LinearSegmentedColormap.from_list('trunc({0}, {1:.2f}, {2:.2f})'.format(cmap.name, minv, maxv), cmap(np.linspace(minv, maxv, 100))) 138 | if set_bad_vals: 139 | new_cmap.set_bad('white', alpha=1.0) 140 | if logNorm: 141 | cNorm = mpl_colors.LogNorm(vmin=vals.min(), vmax=vals.max()) 142 | else: 143 | cNorm = mpl_colors.Normalize(vmin=vals.min(), vmax=vals.max()) 144 | scalarMap = cmx.ScalarMappable(norm=cNorm, cmap=new_cmap) 145 | if return_cNorm: 146 | return scalarMap, cNorm 147 | else: 148 | scalarMap.set_array(vals) 149 | return scalarMap 150 | -------------------------------------------------------------------------------- /cloudyfsps/astrodata/vanzee.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import (division, print_function, absolute_import, 5 | unicode_literals) 6 | __all__ = ["plot_bpt", "plot_NO"] 7 | 8 | import numpy as np 9 | import matplotlib.pyplot as plt 10 | import pkg_resources 11 | 12 | def plot_bpt(var_label, ax=None, line_ratio='NII', **kwargs): 13 | ''' 14 | vanzee.plot_bpt(True, auto_corr=True) 15 | ''' 16 | auto_corr = kwargs.get('auto_corr', True) 17 | if var_label: 18 | lab = kwargs.get('lab', 'Van Zee (1998)') 19 | else: 20 | lab = '__nolegend__' 21 | linefile = pkg_resources.resource_filename(__name__, "data/vanzee_lines.dat") 22 | OII,e_OII,NeIII,e_NeIII,OIII,e_OIII,OI,e_OI,SIII,e_SIII,Ha,e_Ha,NII,e_NII,SII,e_SII,ArIII,e_ArIII,cHb,e_cHb = np.genfromtxt(linefile, delimiter=';', comments='#', unpack=True) 23 | # Van Zee uses [O III] 4959 + 5007 and [N II] 6548 + 6584 24 | # removing contribution from doublet lines I_b = 2.88*I_a 25 | if line_ratio[-1] == 'a' or line_ratio[-1] == 'b': 26 | corr=np.log10(3.0/4.0) 27 | else: 28 | corr=0.0 29 | # assume standard y axis 30 | y = np.log10(OIII) + corr 31 | yerr = e_OIII/(OIII*np.log(10)) 32 | def calc_err(x, xerr, y, yerr): 33 | err = ((xerr/(x*np.log(10)))**2.0 + (yerr/(y*np.log(10)))**2.0)**0.5 34 | return err 35 | if line_ratio[0] == 'N': 36 | x = np.log10(NII/Ha) + corr 37 | xerr = calc_err(NII, e_NII, Ha, e_Ha) 38 | if line_ratio[0] == 'S': 39 | x = np.log10(SII/Ha) + corr 40 | xerr = calc_err(SII, e_SII, Ha, e_Ha) 41 | if line_ratio == 'OI': 42 | x = np.log10(OI/Ha) + corr 43 | xerr = calc_err(OI, e_OI, Ha, e_Ha) 44 | if line_ratio == 'OII': 45 | y = np.log10(OIII/OII) 46 | yerr = calc_err(OIII, e_OIII, OII, e_OII) 47 | x = np.log10(NII/OII) 48 | xerr = calc_err(NII, e_NII, OII, e_OII) 49 | if line_ratio == 'R23': 50 | y = np.log10(OIII/OII) 51 | yerr = calc_err(OIII, e_OIII, OII, e_OII) 52 | x = np.log10(OII + OIII) 53 | xerr = e_OIII/(OIII*np.log(10)) 54 | if line_ratio == 'NeIII': 55 | y = np.log10(NeIII/OII) 56 | yerr = calc_err(NeIII, e_NeIII, OII, e_OII) 57 | x = np.log10(OII + OIII) 58 | xerr = e_OIII/(OIII*np.log(10)) 59 | if ax is None: 60 | ax = plt.gca() 61 | ax.errorbar(x,y,xerr=xerr, yerr=yerr, 62 | capsize=0, fmt='s', color='white', ecolor='k', 63 | label=lab) 64 | return 65 | 66 | def getLineRatio(name, lines): 67 | ''' 68 | getLineRatio('OIII', line_dictionary) 69 | ''' 70 | def logify(lnames='OIIIb', denom=None): 71 | if denom is None: 72 | dval = 1.0 73 | else: 74 | dval = lines[denom] 75 | if (type(lines) == str) or (type(lines) == np.str): 76 | val = np.log10(lines[lnames]/dval) 77 | else: 78 | val = np.log10(np.sum([lines[l] for l in lnames])/dval) 79 | return val 80 | ldict = {'OIII': logify(lnames='F5007'), 81 | 'OIIIb': logify(lnames='F5007'), 82 | 'NII': logify(lnames='F6584', denom='F6563')} 83 | return ldict[name] 84 | 85 | def get_vz_lines(): 86 | linefile = pkg_resources.resource_filename(__name__, "data/vanzee_lines.dat") 87 | OII,e_OII,NeIII,e_NeIII,OIII,e_OIII,OI,e_OI,SIII,e_SIII,Ha,e_Ha,NII,e_NII,SII,e_SII,ArIII,e_ArIII,cHb,e_cHb = np.genfromtxt(linefile, delimiter=';', comments='#', unpack=True) 88 | return 89 | def get_bond_lines(): 90 | ''' 91 | returns data, with column names 92 | temp, logO, logOerr, logNO, logNOerr 93 | T(O++), log(O/H), log(N/O) 94 | ''' 95 | linefile = pkg_resources.resource_filename(__name__, "data/bond_lines.dat") 96 | data = np.genfromtxt(linefile, dtype=None, names=True, skip_header=24) 97 | 98 | return 99 | 100 | def get_abunds(): 101 | ''' 102 | returns data, with column names 103 | temp, logO, logOerr, logNO, logNOerr 104 | T(O++), log(O/H), log(N/O) 105 | ''' 106 | linefile = pkg_resources.resource_filename(__name__, "data/vanzee_abund.dat") 107 | data = np.genfromtxt(linefile, delimiter='\t', 108 | names='temp, logO, logOerr, logNO, logNOerr') 109 | return data 110 | 111 | def plot_NO(ax=None, lab='__nolabel__', plot_dop=True, **kwargs): 112 | data = get_abunds() 113 | if ax is None: 114 | fig = plt.figure() 115 | ax = fig.add_subplot(111) 116 | ax.errorbar(data['logO'], data['logNO'], 117 | xerr=data['logOerr'], yerr=data['logNOerr'], 118 | marker='o', color='grey', alpha=0.8, linestyle='None', 119 | markersize=8, label=lab) 120 | if plot_dop: 121 | xx = np.array([7.39, 7.5, 7.69, 7.99, 8.17, 8.39, 8.69, 8.8, 8.99, 9.17, 9.39]) 122 | yy = np.array([-2. , -1.97, -1.92, -1.78, -1.68, -1.53, -1.29, -1.2 , -1.03, -0.84, -0.56]) 123 | 124 | ax.set_xlabel('12 + log (O/H)') 125 | ax.set_ylabel('log (N/O)') 126 | return 127 | -------------------------------------------------------------------------------- /cloudyfsps/cloudyInputTools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import print_function 4 | from __future__ import unicode_literals 5 | from __future__ import division 6 | from __future__ import absolute_import 7 | from builtins import zip 8 | from builtins import range 9 | import os 10 | import numpy as np 11 | import subprocess 12 | import pkg_resources 13 | from .generalTools import calcForLogQ 14 | from .nebAbundTools import getNebAbunds 15 | 16 | def cloudyInput(dir_, model_name, **kwargs): 17 | ''' 18 | cloudyInput('./test/', 'ZAU115', logZ=-1.5, age=5.0e6, logU=-4.0) 19 | writes standard cloudy input to ./test/ZAU115.in 20 | defaults: 1Myr, logZ=-0.5, logU=-2.0, nH=100, r_inner=3 pc 21 | ''' 22 | pars = {"age":1.0e6, #age in years 23 | "logZ": -0.5, #logZ/Zsol (-2.0 to 0.2) 24 | "gas_logZ":None, 25 | "logQ":47.0, 26 | "logU":-2.0, #log of ionization parameter 27 | "dens":100.0, # number density of hydrogen 28 | "r_inner":1.0, #inner radius of cloud 29 | "r_in_pc":False, 30 | "use_Q":True, 31 | "set_name":"dopita", 32 | "dust":True, 33 | "re_z":False, 34 | "cloudy_mod":"FSPS_SPS.mod", 35 | "efrac":-1.0, 36 | "extras":"", 37 | "extra_output":True, 38 | "to_file":True, 39 | "verbose":False, 40 | "par1":"age", 41 | "par1val":5.0e6, 42 | "par2":"logz", 43 | "par2val":0.0, 44 | "maxStellar":None, 45 | "use_extended_lines":False, 46 | "geometry":"sphere" 47 | } 48 | for key, value in list(kwargs.items()): 49 | pars[key] = value 50 | # ----- 51 | if pars["to_file"]: 52 | file_name = dir_+model_name+".in" 53 | f = file(file_name, "w") 54 | def this_print(s, eol=True): 55 | if s is None: 56 | print('"None" parameter not printed') 57 | else: 58 | to_print = s.strip() 59 | if pars["verbose"]: 60 | print(to_print) 61 | if pars["to_file"]: 62 | if eol: to_print += "\n" 63 | f.write(to_print) 64 | #----------------------------------------------------- 65 | if pars["gas_logZ"] is None: 66 | pars["gas_logZ"] = pars["logZ"] 67 | abunds = getNebAbunds(pars["set_name"], 68 | pars["gas_logZ"], 69 | dust=pars["dust"], 70 | re_z=pars["re_z"]) 71 | this_print('////////////////////////////////////') 72 | this_print('title {0}'.format(model_name.split('/')[-1])) 73 | this_print('////////////////////////////////////') 74 | this_print('set punch prefix "{0}"'.format(model_name)) 75 | this_print('set line precision 6') 76 | #### 77 | if pars['par1'] == "age": 78 | pars['par1val'] = pars['age'] 79 | if pars['par2'] == "logz": 80 | pars['par2val'] = pars['logZ'] 81 | if pars['maxStellar'] is not None: 82 | if pars['logZ'] > pars['maxStellar']: 83 | pars['par2val'] = pars['maxStellar'] 84 | else: 85 | pars['par2val'] = pars['logZ'] 86 | this_print('table star "{0}" {1}={2:.2e} {3}={4:.2e}'.format(pars['cloudy_mod'], pars['par1'], pars['par1val'],pars['par2'], pars['par2val'])) 87 | if pars['use_Q']: 88 | this_print('Q(H) = {0:.3f} log'.format(pars['logQ'])) 89 | else: 90 | this_print('ionization parameter = {0:.3f} log'.format(pars['logU'])) 91 | #### 92 | this_print(abunds.solarstr) 93 | if pars['dust']: 94 | #this_print('metals grains {0:.2f} log'.format(pars['gas_logZ'])) 95 | this_print('grains {0:.2f} log'.format(pars['gas_logZ'])) 96 | #else: 97 | # #this_print('metals {0:.2f} log'.format(pars['gas_logZ'])) 98 | for line in abunds.elem_strs: 99 | this_print(line) 100 | #### 101 | if pars['r_in_pc']: 102 | pc_to_cm = 3.08568e18 103 | r_out = np.log10(pars['r_inner']*pc_to_cm) 104 | else: 105 | r_out = pars['r_inner'] 106 | if pars['use_extended_lines']: 107 | linefile = pkg_resources.resource_filename(__name__,'data/cloudyLinesEXT.dat') 108 | else: 109 | linefile = pkg_resources.resource_filename(__name__, 'data/cloudyLines.dat') 110 | this_print('radius {0:.3f} log'.format(r_out)) 111 | this_print('hden {0:.3f} log'.format(np.log10(pars['dens']))) 112 | this_print('{}'.format(pars['geometry'])) 113 | this_print('cosmic ray background') 114 | this_print('iterate to convergence max=5') 115 | this_print('stop temperature 100.0') 116 | this_print('stop efrac {0:.2f}'.format(pars['efrac'])) 117 | this_print('save last linelist ".lin" "{}" absolute column'.format(linefile)) 118 | this_print('save last outward continuum ".outwcont" units Angstrom no title') 119 | this_print('save last incident continuum ".inicont" units Angstrom no title') 120 | if len(pars["extras"]) > 0: 121 | this_print(pars["extras"]) 122 | if pars["extra_output"]: 123 | this_print(extra_str) 124 | if pars["verbose"]: 125 | print("Input written in {0}".format(file_name)) 126 | f.close() 127 | 128 | extra_str = ''' 129 | save last radius ".rad" 130 | save last physical conditions ".phys" 131 | save last element hydrogen ".ele_H" 132 | save last element helium ".ele_He" 133 | save last element carbon ".ele_C" 134 | save last element nitrogen ".ele_N" 135 | save last element oxygen ".ele_O" 136 | save last element sulphur ".ele_S" 137 | save last element silicon ".ele_Si" 138 | save last element iron ".ele_Fe" 139 | save last hydrogen Lya ".H_lya" 140 | save last hydrogen ionization ".H_ion" 141 | save last lines emissivity ".emis" 142 | H 1 6562.85A 143 | H 1 4861.36A 144 | H 1 4340.49A 145 | He 1 3888.63A 146 | He 1 4471.47A 147 | He 1 5875.61A 148 | He 2 1640.00A 149 | O 1 6300.00A 150 | O 1 6363.00A 151 | O II 3729.00A 152 | O II 3726.00A 153 | O 3 5007.00A 154 | TOTL 4363.00A 155 | O 3 4959.00A 156 | O 3 51.8000m 157 | N 2 6584.00A 158 | N 2 6548.00A 159 | S II 6731.00A 160 | S II 6716.00A 161 | S 3 9069.00A 162 | S 3 9532.00A 163 | S 3 18.6700m 164 | S 4 10.5100m 165 | Ar 3 7135.00A 166 | Ar 3 9.00000m 167 | Ne 3 3869.00A 168 | Ne 2 12.8100m 169 | Ne 3 15.5500m 170 | C 3 1910.00A 171 | C 3 1907.00A 172 | end of lines 173 | ''' 174 | 175 | def writeMake(dir_=None): 176 | ''' 177 | writes makefile that runs Cloudy on all files in directory with 178 | the same prefix. 179 | ''' 180 | makefile = open("{0}/Makefile".format(dir_), "w") 181 | txt_exe = "CLOUDY = {0}\n".format(os.environ["CLOUDY_EXE"]) 182 | txt = """ 183 | SRC = $(wildcard ${name}*.in) 184 | OBJ = $(SRC:.in=.out) 185 | 186 | #Usage: make -j n_proc name='NAME' 187 | #optional: NAME is a generic name, all models named NAME*.in will be run 188 | 189 | all: $(OBJ) 190 | 191 | %.out: %.in 192 | \t-$(CLOUDY) < $< > $@ 193 | #notice the previous line has TAB in first column 194 | """ 195 | makefile.write(txt_exe) 196 | makefile.write(txt) 197 | makefile.close() 198 | 199 | def runMake(dir_=None, n_proc=1, model_name=None): 200 | if dir_ is None: 201 | dir_="./" 202 | to_run = "cd {0} ; make -j {1:d}".format(dir_, n_proc) 203 | if model_name is not None: 204 | to_run += " name='{0}'".format(model_name) 205 | stdin = None 206 | stdout = subprocess.PIPE 207 | print("running: {0}".format(to_run)) 208 | proc = subprocess.Popen(to_run, shell=True, stdout=stdout, stdin=stdin) 209 | proc.communicate() 210 | 211 | def printParFile(dir_, mod_prefix, pars): 212 | ''' 213 | prints parameter file for easy parsing later 214 | modnum, Z, a, U, R, logQ, n, efrac 215 | ''' 216 | outfile = "{}{}.pars".format(dir_, mod_prefix) 217 | f = open(outfile, "w") 218 | for i in range(len(pars)): 219 | par = pars[i] 220 | if len(par) > 7: 221 | pstr = "{0} {1:.2f} {2:.2e} {3:.2f} {4:.2f} {5:.2f} {6:.2f} {7:.2f} {8:.2e}\n".format(i+1, *par) 222 | else: 223 | pstr = "{0} {1:.2f} {2:.2e} {3:.2f} {4:.2f} {5:.2f} {6:.2f} {7:.2f}\n".format(i+1, *par) 224 | f.write(pstr) 225 | f.close() 226 | return 227 | 228 | def writeParamFiles(**kwargs): 229 | ''' 230 | for making grids of parameters. 231 | can pass arrays of ages, logZs, logUs, nHs. 232 | cloudy_input.param_files(extras='extra line to add to input') 233 | ''' 234 | nom_dict = {"dir_":"./output/", 235 | "model_prefix":"ZAU", 236 | "ages":np.arange(1.0e6, 6.0e6, 1.0e6), 237 | "logZs":np.linspace(-2.0, 0.2, 5), 238 | "logQs":np.linspace(45,49, 5), 239 | "logUs":np.linspace(-3.0, -1.0, 5), 240 | "r_inners":np.array([19.]), 241 | "nhs":np.array([100.0]), 242 | "pc_to_cm":False, 243 | "run_cloudy":False, 244 | "set_name":"dopita", 245 | "use_Q":True, 246 | "dust":True, 247 | "re_z":False, 248 | "cloudy_mod":"FSPS_SPS.mod", 249 | "verbose":False, 250 | "efracs":np.array([-1.0]), 251 | "geometry":"sphere", 252 | "write_makefile":False, 253 | "extras":"", 254 | "extra_output":False} 255 | for key, val in list(kwargs.items()): 256 | nom_dict[key] = val 257 | pars = kwargs.get("pars", None) 258 | if pars is None: 259 | print("{} ages, {} logZs, {} logUs".format(len(nom_dict["ages"]), 260 | len(nom_dict["logZs"]), 261 | len(nom_dict["logUs"]))) 262 | pars = [(Z, a, U, R, calcForLogQ(logU=U, Rinner=10.0**R, nh=n), n, efrac) for Z in nom_dict["logZs"] for a in nom_dict["ages"] for U in nom_dict["logUs"] for R in nom_dict["r_inners"] for n in nom_dict["nhs"] for efrac in nom_dict["efracs"]] 263 | # Z, a, U, R, Q, n, efrac 264 | print("{} models".format(len(pars))) 265 | full_model_names = ["{}{}".format(nom_dict["model_prefix"], n+1) 266 | for n in range(len(pars))] 267 | printParFile(nom_dict["dir_"], nom_dict["model_prefix"], pars) 268 | #-------------------------------------------- 269 | for par, name in zip(pars, full_model_names): 270 | cloudyInput(nom_dict["dir_"], 271 | name, 272 | logZ=par[0], 273 | age=par[1], 274 | logU=par[2], 275 | r_inner=par[3], 276 | logQ=par[4], 277 | dens=par[5], 278 | efrac=par[6], 279 | set_name=nom_dict["set_name"], 280 | use_Q=nom_dict["use_Q"], 281 | dust=nom_dict["dust"], 282 | re_z=nom_dict["re_z"], 283 | cloudy_mod=nom_dict["cloudy_mod"], 284 | verbose=nom_dict["verbose"], 285 | geometry=nom_dict["geometry"], 286 | extras=nom_dict["extras"], 287 | extra_output=nom_dict["extra_output"]) 288 | #-------------------------------------------- 289 | if nom_dict["write_makefile"]: 290 | writeMake(dir_=nom_dict["dir_"]) 291 | #-------------------------------------------- 292 | if nom_dict["run_cloudy"]: 293 | runMake(dir_=nom_dict["dir_"], n_proc=4, model_name=nom_dict["model_prefix"]) 294 | -------------------------------------------------------------------------------- /cloudyfsps/cloudyOutputTools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import division 4 | from __future__ import print_function 5 | from __future__ import unicode_literals 6 | from __future__ import absolute_import 7 | from builtins import str as newstr 8 | from builtins import range 9 | #__all__ = ["format_output"] 10 | 11 | import numpy as np 12 | import subprocess 13 | import pkg_resources 14 | from .generalTools import air_to_vac 15 | from scipy.interpolate import interp1d 16 | ### 17 | # ***.lin: [cloudy_ID, flux] 18 | # ***.lineflux: [sorted_vac_wl, flux] 19 | # ***.out_lines: [sorted_vac_wl, flux] 20 | ### 21 | # ***.outwcont: [wl, attenuated_incident, diffuse_continuum] 22 | # ***.inicont: [wl, incident_flux] 23 | # ***.contflux: [wl, incid_out, atten_out, diffuse_out] 24 | # ***.out_cont: [ang, diffuse_out] 25 | ### 26 | def formatCloudyOutput(dir_, model_prefix, modnum, modpars, use_extended_lines=False, write_line_lum=False, **kwargs): 27 | ''' 28 | for formatting the output of a single cloudy job 29 | ''' 30 | # model information 31 | logZ, age, logU, logR, logQ, nH = modpars[0:6] 32 | if logZ > 0.2: 33 | print("WARNING WARNING WARNING") 34 | 35 | dist_fact = 4.0*np.pi*(10.0**logR)**2.0 # cm**2 36 | lsun = 3.839e33 # erg/s 37 | c = 2.9979e18 #ang/s 38 | 39 | oldfile = "{}{}{}.lin".format(dir_, model_prefix, str(modnum)) 40 | newfile = "{}{}{}.lineflux".format(dir_, model_prefix, str(modnum)) 41 | print_file = "{}{}{}.out_lines".format(dir_, model_prefix, str(modnum)) 42 | # read cloudy output 43 | dat = np.genfromtxt(oldfile, skip_header=2, delimiter="\t", 44 | dtype="S20,f8") 45 | #line_names = [d[0] for d in dat] 46 | datflu = np.array([d[1] for d in dat]) 47 | # non-ordered wavelengths 48 | if use_extended_lines: 49 | wavfile = pkg_resources.resource_filename(__name__, 50 | "data/refLinesEXT.dat") 51 | else: 52 | wavfile = pkg_resources.resource_filename(__name__, 53 | "data/refLines.dat") 54 | wdat = np.genfromtxt(wavfile, delimiter=',', dtype=None) 55 | wl = np.array([dat[0] for dat in wdat]) 56 | # sort them by wavelength 57 | sinds = np.argsort(wl) 58 | ### print vac_wl, flux to ***.lineflux 59 | output = np.column_stack((wl[sinds], datflu[sinds])) 60 | np.savetxt(newfile, output, fmt=str("%4.6e")) 61 | # print lines to ***.out_lines 62 | # line luminosity in solar lums per Q 63 | line_wav = wl[sinds] 64 | if write_line_lum: 65 | conv = 1.0 66 | else: 67 | conv = 1./lsun/(10.**logQ) 68 | line_flu = datflu[sinds]*conv 69 | print_output = np.column_stack((line_wav, line_flu)) 70 | np.savetxt(print_file, print_output, fmt=(str("%.6e"),str("%.6e"))) 71 | # print to file 72 | print("Lines were printed to file {}".format(print_file)) 73 | ######## 74 | ### continuum 75 | ######## 76 | outcontfl = "{}{}{}.outwcont".format(dir_, model_prefix, modnum) 77 | incontfl = "{}{}{}.inicont".format(dir_, model_prefix, modnum) 78 | print_file2 = "{}{}{}.contflux".format(dir_, model_prefix, modnum) 79 | print_file = "{}{}{}.out_cont".format(dir_, model_prefix, modnum) 80 | # lam, atten_inc, diff_cont, diff_line, sum 81 | cont_data = np.genfromtxt(outcontfl, skip_header=1) 82 | # cont is nu L_nu / (4 pi R**2): Hz * (erg/s/Hz) * (1/cm**2) 83 | # [erg / s / cm^2 ] -> [ erg / s / Hz ] 84 | atten_0, diffuse_0 = cont_data[:,1], cont_data[:,2] 85 | ang_0 = cont_data[:,0] 86 | # reverse arrays 87 | atten_in, diffuse_in = atten_0[::-1], diffuse_0[::-1] 88 | ang = ang_0[::-1] 89 | ang_v = air_to_vac(ang) 90 | # interpolate 91 | lamfile = pkg_resources.resource_filename(__name__, "data/FSPSlam.dat") 92 | fsps_lam = np.genfromtxt(lamfile) 93 | nu = c/fsps_lam 94 | atten_y = interp1d(ang_v, atten_in, fill_value=0.0, bounds_error=False)(fsps_lam) 95 | diffuse_y = interp1d(ang_v, diffuse_in, fill_value=0.0, bounds_error=False)(fsps_lam) 96 | ## 97 | # diffuse continuum 98 | diffuse_out = (diffuse_y) / nu * dist_fact / (10.**logQ) / lsun 99 | ## 100 | inidata = np.genfromtxt(incontfl, skip_header=1) 101 | incid_0 = inidata[:,1] 102 | incid_in = incid_0[::-1] 103 | incid_y = interp1d(ang_v, incid_in, fill_value=0.0, bounds_error=False)(fsps_lam) 104 | # F_nu / (nu=c/lambda) per solar lum 105 | f = open(print_file2, "w") 106 | f.write("# lam (ang) incid (erg/s/cm2) attenuated_incid (erg/s/cm2) diffuse_cont (erg/s/cm2)\n") 107 | for i in range(len(fsps_lam)): 108 | printstring = "{0:.6e} {1:.6e} {2:.6e} {3:.6e}\n".format(fsps_lam[i], incid_y[i], atten_y[i], diffuse_y[i]) 109 | f.write(printstring) 110 | f.close() 111 | print("The full continuum was printed to file {}".format(print_file2)) 112 | ##### 113 | f = open(print_file, "w") 114 | f.write("# lam (ang) diffuse_cont (lsun/hz/Q)\n") 115 | for i in range(len(fsps_lam)): 116 | printstring = "{0:.6e} {1:.6e}\n".format(fsps_lam[i], diffuse_out[i]) 117 | f.write(printstring) 118 | f.close() 119 | print("The diffuse continuum was printed to file {}".format(print_file)) 120 | return 121 | 122 | def formatAllOutput(dir_, mod_prefix, use_extended_lines=False, write_line_lum=False): 123 | ''' 124 | for formatting output after running a batch of cloudy jobs 125 | ''' 126 | data = np.genfromtxt(dir_+mod_prefix+".pars") 127 | def get_pars(modnum): 128 | return data[np.int(modnum)-1, 1:] 129 | for modnum in data[:,0]: 130 | mnum = np.int(modnum) 131 | formatCloudyOutput(dir_, mod_prefix, mnum, get_pars(mnum), use_extended_lines=use_extended_lines, write_line_lum=write_line_lum) 132 | return 133 | -------------------------------------------------------------------------------- /cloudyfsps/data/cloudyLines.dat: -------------------------------------------------------------------------------- 1 | H 1 1215.68A 2 | H 1 1025.73A 3 | H 1 972.543A 4 | H 1 949.749A 5 | H 1 937.809A 6 | H 1 930.754A 7 | H 1 926.231A 8 | H 1 923.156A 9 | H 1 6562.85A 10 | H 1 4861.36A 11 | H 1 4340.49A 12 | H 1 4101.76A 13 | H 1 3970.09A 14 | H 1 3889.07A 15 | H 1 3835.40A 16 | H 1 3797.92A 17 | H 1 1.87511m 18 | H 1 1.28181m 19 | H 1 1.09381m 20 | H 1 1.00494m 21 | H 1 9545.99A 22 | H 1 9229.03A 23 | H 1 9014.92A 24 | H 1 4.05116m 25 | H 1 2.62515m 26 | H 1 2.16553m 27 | H 1 1.94456m 28 | H 1 1.81741m 29 | H 1 1.73621m 30 | H 1 7.45781m 31 | H 1 4.65250m 32 | H 1 3.73953m 33 | H 1 3.29609m 34 | H 1 3.03837m 35 | H 1 12.3685m 36 | H 1 7.50043m 37 | H 1 5.90659m 38 | H 1 5.12725m 39 | He 1 4471.47A 40 | He 1 5875.61A 41 | He 1 6678.15A 42 | He 1 1.08299m 43 | He 1 1.08303m 44 | He 1 3888.63A 45 | He 1 7065.18A 46 | He 2 1640.00A 47 | TOTL 9850.00A 48 | C 1 8727.00A 49 | C 1 4621.00A 50 | C 1 609.200m 51 | C 1 369.700m 52 | C 2 157.600m 53 | C 2 2325.00A 54 | C 2 2324.00A 55 | C 2 2329.00A 56 | C 2 2328.00A 57 | C 2 2327.00A 58 | C 3 1910.00A 59 | C 3 1907.00A 60 | N 1 5200.00A 61 | N 2 6584.00A 62 | N 2 6548.00A 63 | N 2 5755.00A 64 | N 2 121.700m 65 | N 2 205.400m 66 | N 2 2141.00A 67 | N 3 57.2100m 68 | O 1 6300.00A 69 | O 1 6363.00A 70 | O 1 5577.00A 71 | O 1 63.1700m 72 | O 1 145.530m 73 | O II 3726.00A 74 | O II 3729.00A 75 | O II 7332.00A 76 | O II 7323.00A 77 | O II 2471.00A 78 | O 3 1661.00A 79 | O 3 1666.00A 80 | O 3 5007.00A 81 | O 3 4959.00A 82 | TOTL 4363.00A 83 | O 3 2321.00A 84 | O 3 88.3300m 85 | O 3 51.8000m 86 | Ne 2 12.8100m 87 | Ne 3 15.5500m 88 | Ne 3 36.0140m 89 | Ne 3 3869.00A 90 | Ne 3 3968.00A 91 | Ne 3 3343.00A 92 | Ne 3 1815.00A 93 | Ne 4 4720.00A 94 | Mg 2 2795.53A 95 | Mg 2 2802.71A 96 | Si 2 34.8140m 97 | S 2 1.03300m 98 | S II 6731.00A 99 | S II 6716.00A 100 | S II 4070.00A 101 | S II 4078.00A 102 | S 3 18.6700m 103 | S 3 33.4700m 104 | S 3 9532.00A 105 | S 3 9069.00A 106 | S 3 6312.00A 107 | S 3 3722.00A 108 | S 4 10.5100m 109 | Ar 2 6.98000m 110 | Ar 3 7135.00A 111 | Ar 3 7751.00A 112 | Ar 3 5192.00A 113 | Ar 3 3109.00A 114 | Ar 3 21.8300m 115 | Ar 3 9.00000m 116 | Ar 4 7331.00A 117 | Al 2 2670.00A 118 | Al 2 2660.00A 119 | Al 3 1855.00A 120 | Al 3 1863.00A 121 | Cl 2 14.4000m 122 | Cl 2 8579.00A 123 | Cl 2 9124.00A 124 | Cl 3 5538.00A 125 | Cl 3 5518.00A 126 | P 2 60.6400m 127 | P 2 32.8700m 128 | Fe 2 1.25668m 129 | -------------------------------------------------------------------------------- /cloudyfsps/data/cloudyLinesEXT.dat: -------------------------------------------------------------------------------- 1 | O 1 917.473A 2 | O 1 917.726A 3 | O 1 917.970A 4 | P 3 918.147A 5 | Ar 1 918.493A 6 | O 1 918.704A 7 | O 1 919.912A 8 | O 1 920.243A 9 | H 1 920.969A 10 | Ar 1 922.509A 11 | O 1 922.969A 12 | H 1 923.156A 13 | O 1 923.438A 14 | Cr 3 924.009A 15 | H 1 926.231A 16 | O 1 927.472A 17 | O 1 928.186A 18 | Al 2 929.014A 19 | H 1 930.754A 20 | O 1 934.501A 21 | O 1 935.672A 22 | H 1 937.809A 23 | N 1 942.258A 24 | C 1 943.939A 25 | C 2 946.100A 26 | O 1 946.387A 27 | O 1 948.506A 28 | H 1 949.749A 29 | P 4 950.661A 30 | N 1 952.118A 31 | N 1 953.900A 32 | N 1 954.100A 33 | Mg 2 959.306A 34 | P 2 963.828A 35 | P 2 967.202A 36 | O 1 969.049A 37 | H 1 972.543A 38 | O 1 973.577A 39 | O 1 976.791A 40 | C 3 977.000A 41 | N 1 980.700A 42 | Cl 4 981.258A 43 | N 3 991.000A 44 | Si 2 993.354A 45 | P 3 1001.73A 46 | S 3 1007.34A 47 | Cl 3 1011.29A 48 | C 2 1020.18A 49 | Si 2 1024.03A 50 | H 1 1025.73A 51 | Cr 3 1033.06A 52 | Cr 3 1035.74A 53 | C 2 1036.80A 54 | Mg 2 1040.08A 55 | Cl 2 1071.32A 56 | N 2 1085.00A 57 | S 4 1086.27A 58 | C 2 1092.50A 59 | Ar 1 1095.69A 60 | P 5 1121.30A 61 | Fe 3 1125.79A 62 | N 1 1131.12A 63 | C 1 1140.10A 64 | P 2 1154.42A 65 | C 3 1176.00A 66 | Si 2 1179.59A 67 | S 3 1197.56A 68 | Mn 2 1198.85A 69 | N 1 1200.00A 70 | Si 3 1207.00A 71 | He 2 1215.23A 72 | H 1 1215.68A 73 | C 1 1247.50A 74 | S 2 1256.00A 75 | Mg 2 1257.64A 76 | Si 2 1263.32A 77 | Si 2 1307.66A 78 | P 2 1307.68A 79 | C 1 1314.77A 80 | Ni 2 1324.11A 81 | C 2 1335.00A 82 | P 3 1341.17A 83 | O 1 1357.00A 84 | Ni 2 1375.73A 85 | Si 4 1394.00A 86 | Ni 2 1400.37A 87 | Si 4 1403.00A 88 | S 4 1406.00A 89 | S 4 1417.00A 90 | Ni 2 1472.74A 91 | Ni 2 1484.97A 92 | N 4 1485.00A 93 | N 4 1486.00A 94 | Si 2 1531.00A 95 | C 4 1548.00A 96 | C 4 1551.00A 97 | C 1 1561.33A 98 | C 3 1577.10A 99 | He 2 1640.00A 100 | C 1 1656.00A 101 | O 3 1661.00A 102 | O 3 1666.00A 103 | Al 2 1670.79A 104 | S 3 1720.00A 105 | N 2 1742.00A 106 | Ni 2 1744.24A 107 | N 3 1749.00A 108 | N 3 1751.00A 109 | Ni 2 1751.83A 110 | N 3 1752.00A 111 | N 3 1754.00A 112 | Fe 2 1786.00A 113 | Si 2 1813.99A 114 | Ne 3 1815.00A 115 | C 3 1828.00A 116 | Al 3 1855.00A 117 | Al 3 1863.00A 118 | Si 3 1883.00A 119 | Si 3 1892.00A 120 | C 3 1907.00A 121 | C 3 1910.00A 122 | Cr 2 2060.44A 123 | N 2 2141.00A 124 | C 3 2296.90A 125 | O 3 2321.00A 126 | C 2 2324.00A 127 | C 2 2325.00A 128 | C 2 2327.00A 129 | C 2 2328.00A 130 | C 2 2329.00A 131 | Si 2 2336.00A 132 | Si 2 2344.00A 133 | Fe 2 2400.00A 134 | O II 2471.00A 135 | Mn 2 2589.74A 136 | Al 2 2660.00A 137 | Al 2 2670.00A 138 | Mg 2 2795.53A 139 | Mg 2 2802.71A 140 | He 1 2829.08A 141 | Mg 1 2853.00A 142 | Ar 4 2854.00A 143 | He 1 2945.10A 144 | Ar 3 3109.00A 145 | He 1 3187.74A 146 | Ne 3 3343.00A 147 | He 1 3447.59A 148 | He 1 3613.64A 149 | S 3 3722.00A 150 | O II 3726.00A 151 | O II 3729.00A 152 | H 1 3797.92A 153 | He 1 3819.60A 154 | H 1 3835.40A 155 | O 2 3867.00A 156 | He 1 3867.47A 157 | Ne 3 3869.00A 158 | He 1 3888.63A 159 | H 1 3889.07A 160 | He 1 3964.73A 161 | Ne 3 3968.00A 162 | H 1 3970.09A 163 | He 1 4026.19A 164 | N 2 4041.00A 165 | O 2 4051.00A 166 | C 3 4069.00A 167 | S II 4070.00A 168 | S 2 4074.00A 169 | O 2 4075.00A 170 | S II 4078.00A 171 | O 2 4094.00A 172 | H 1 4101.76A 173 | O 2 4111.00A 174 | He 1 4120.81A 175 | He 1 4143.76A 176 | O 2 4152.00A 177 | He 1 4168.97A 178 | O 2 4188.00A 179 | N 2 4239.00A 180 | C 2 4267.00A 181 | O 2 4278.00A 182 | O 2 4294.00A 183 | Fe 2 4300.00A 184 | H 1 4340.49A 185 | O 2 4342.00A 186 | TOTL 4363.00A 187 | N 3 4379.00A 188 | He 1 4387.93A 189 | He 1 4437.55A 190 | He 1 4471.47A 191 | O 2 4607.00A 192 | C 3 4649.00A 193 | Fe 3 4658.55A 194 | P 2 4669.00A 195 | He 2 4686.01A 196 | Fe 3 4702.03A 197 | Ar 4 4711.00A 198 | He 1 4713.02A 199 | Ar 4 4740.00A 200 | Fe 3 4755.19A 201 | H 1 4861.36A 202 | O 2 4913.00A 203 | He 1 4921.93A 204 | O 3 4931.00A 205 | O 3 4959.00A 206 | N 2 5005.00A 207 | O 3 5007.00A 208 | He 1 5015.68A 209 | He 1 5047.64A 210 | Ar 3 5192.00A 211 | N 1 5198.00A 212 | N 1 5200.00A 213 | Fe 3 5270.90A 214 | Cl 4 5324.00A 215 | Cl 3 5518.00A 216 | Cl 3 5538.00A 217 | O 1 5577.00A 218 | TOTL 5679.00A 219 | N 2 5755.00A 220 | Cr 3 5828.00A 221 | He 1 5875.61A 222 | Na 1 5891.94A 223 | O 1 6300.00A 224 | S 3 6312.00A 225 | O 1 6363.00A 226 | N 2 6548.00A 227 | H 1 6562.85A 228 | Cr 5 6577.00A 229 | N 2 6584.00A 230 | He 1 6678.15A 231 | S II 6716.00A 232 | S 2 6720.00A 233 | S II 6731.00A 234 | Cr 4 6801.00A 235 | He 1 7065.18A 236 | Ar 3 7135.00A 237 | Ar 4 7171.00A 238 | Ar 4 7237.00A 239 | Ar 4 7263.00A 240 | Cr 4 7267.00A 241 | He 1 7281.35A 242 | Ca 2 7306.00A 243 | O II 7323.00A 244 | O II 7332.00A 245 | Cl 4 7532.00A 246 | Ar 3 7751.00A 247 | O 1 7773.00A 248 | O 1 7949.50A 249 | Cr 5 7979.00A 250 | Cl 4 8047.00A 251 | He 1 8361.73A 252 | Cl 2 8579.00A 253 | Fe 2 8616.95A 254 | H 1 9014.92A 255 | S 3 9069.00A 256 | Cl 2 9124.00A 257 | H 1 9229.03A 258 | O 1 9264.00A 259 | He 1 9463.57A 260 | S 3 9532.00A 261 | H 1 9545.99A 262 | He 1 9603.44A 263 | TOTL 9850.00A 264 | C 2 9903.00A 265 | H 1 1.00494m 266 | He 2 1.01242m 267 | S II 1.02890m 268 | He 1 1.03113m 269 | S II 1.03230m 270 | S 2 1.03300m 271 | S II 1.03390m 272 | S II 1.03730m 273 | He 1 1.06678m 274 | He 1 1.08291m 275 | He 1 1.08299m 276 | He 1 1.08303m 277 | He 1 1.09130m 278 | He 1 1.09171m 279 | H 1 1.09381m 280 | He 1 1.09966m 281 | He 1 1.10131m 282 | He 1 1.10450m 283 | P 2 1.14700m 284 | P 2 1.18900m 285 | He 1 1.19692m 286 | He 1 1.25274m 287 | Fe 2 1.25668m 288 | He 1 1.27849m 289 | He 1 1.27905m 290 | H 1 1.28181m 291 | He 1 1.28461m 292 | He 1 1.29684m 293 | He 1 1.29849m 294 | Fe 2 1.32055m 295 | He 1 1.34117m 296 | Fe 2 1.37181m 297 | He 1 1.50837m 298 | P 2 1.64000m 299 | Fe 2 1.64355m 300 | He 1 1.70027m 301 | H 1 1.73621m 302 | Fe 2 1.80940m 303 | H 1 1.81741m 304 | He 1 1.86854m 305 | He 1 1.86972m 306 | H 1 1.87511m 307 | He 1 1.90894m 308 | H 1 1.94456m 309 | He 1 1.95430m 310 | He 1 2.05813m 311 | He 1 2.11180m 312 | He 1 2.11303m 313 | H 1 2.16553m 314 | He 1 2.47274m 315 | He 1 2.61850m 316 | He 1 2.61985m 317 | He 1 2.62338m 318 | H 1 2.62515m 319 | H 1 3.03837m 320 | H 1 3.29609m 321 | He 1 3.70260m 322 | H 1 3.73953m 323 | Cr 5 3.75000m 324 | He 1 4.03664m 325 | He 1 4.03983m 326 | He 1 4.04791m 327 | He 1 4.04793m 328 | H 1 4.05116m 329 | He 1 4.29459m 330 | K 3 4.62000m 331 | H 1 4.65250m 332 | H 1 5.12725m 333 | Fe 2 5.33871m 334 | H 1 5.90659m 335 | K 4 5.98000m 336 | Ar 2 6.98000m 337 | Na 3 7.32000m 338 | He 1 7.45174m 339 | He 1 7.45411m 340 | He 1 7.45412m 341 | H 1 7.45781m 342 | H 1 7.50043m 343 | H 1 8.75765m 344 | Ar 3 9.00000m 345 | S 4 10.5100m 346 | H 1 11.3056m 347 | Cl 4 11.7000m 348 | H 1 12.3685m 349 | Ne 2 12.8100m 350 | Cl 2 14.4000m 351 | Ne 3 15.5500m 352 | H 1 16.2046m 353 | P 3 17.8850m 354 | Fe 2 17.9310m 355 | S 3 18.6700m 356 | H 1 19.0566m 357 | Cl 4 20.4000m 358 | Ar 3 21.8300m 359 | Fe 3 22.9191m 360 | Fe 2 24.5126m 361 | O 4 25.8800m 362 | Fe 2 25.9812m 363 | H 1 27.7957m 364 | P 2 32.8700m 365 | Fe 3 33.0271m 366 | Cl 2 33.3000m 367 | S 3 33.4700m 368 | Si 2 34.8140m 369 | Fe 2 35.3390m 370 | Ne 3 36.0140m 371 | H 1 38.8591m 372 | Fe 2 51.2865m 373 | Fe 3 51.6656m 374 | O 3 51.8000m 375 | N 3 57.2100m 376 | P 2 60.6400m 377 | O 1 63.1700m 378 | O 3 88.3300m 379 | N 2 121.700m 380 | O 1 145.530m 381 | C 2 157.600m 382 | N 2 205.400m 383 | -------------------------------------------------------------------------------- /cloudyfsps/data/emlines.dat: -------------------------------------------------------------------------------- 1 | He II 3204.038 3203.112 2 | Ne V 3346.783 3345.821 3 | Ne V 3426.863 3425.881 4 | O II 3727.092 3726.032 5 | O II 3729.875 3728.815 6 | Ne III 3869.86 3868.76 7 | Ne III 3968.59 3967.47 8 | Hd 4102.8991 4101.7415 9 | Hg 4341.691 4340.471 10 | O III 4364.435 4363.209 11 | He II 4687.015 4685.704 12 | Ar IV 4712.58 4711.26 13 | Ar IV 4741.45 4740.12 14 | Hb 4862.691 4861.333 15 | O III 4960.295 4958.911 16 | O III 5008.240 5006.843 17 | N I 5199.349 5197.902 18 | N I 5201.705 5200.257 19 | He I 5877.243 5875.615 20 | Na I 5891.583 5889.951 21 | Na I 5897.558 5895.924 22 | O I 6302.046 6300.304 23 | O I 6365.535 6363.776 24 | N II 6549.86 6548.05 25 | Ha 6564.632 6562.819 26 | N II 6585.27 6583.45 27 | S II 6718.294 6716.440 28 | S II 6732.674 6730.816 29 | Ar III 7137.76 7135.79 30 | Ar IV 7172.68 7170.70 31 | Ar IV 7239.76 7237.77 32 | Ar IV 7265.33 7263.33 33 | O II 7320.94 7318.92 34 | O II 7322.01 7319.99 35 | O II 7331.69 7329.67 36 | O II 7332.75 7330.73 37 | Ar IV 7334.17 7332.15 38 | Ar III 7753.24 7751.11 39 | Ar III 8038.73 8036.52 40 | S III 8831.8 8829.4 41 | S III 9071.1 9068.6 42 | S III 9533.2 9530.6 -------------------------------------------------------------------------------- /cloudyfsps/data/orderedLines.dat: -------------------------------------------------------------------------------- 1 | 923.15 2 | 926.25 3 | 930.75 4 | 937.81 5 | 949.74 6 | 972.52 7 | 1025.73 8 | 1215.67 9 | 1640.42 10 | 1661.24 11 | 1666.15 12 | 1812.20 13 | 1854.72 14 | 1862.79 15 | 1906.68 16 | 1908.73 17 | 2142.30 18 | 2321.66 19 | 2324.21 20 | 2325.40 21 | 2326.11 22 | 2327.64 23 | 2328.83 24 | 2471.09 25 | 2661.15 26 | 2669.95 27 | 2796.35 28 | 2803.53 29 | 3109.98 30 | 3343.50 31 | 3722.75 32 | 3727.10 33 | 3729.86 34 | 3798.99 35 | 3836.49 36 | 3869.86 37 | 3889.75 38 | 3890.17 39 | 3968.59 40 | 3971.20 41 | 4069.75 42 | 4077.50 43 | 4102.89 44 | 4341.69 45 | 4364.44 46 | 4472.73 47 | 4622.86 48 | 4725.47 49 | 4862.71 50 | 4960.30 51 | 5008.24 52 | 5193.27 53 | 5201.70 54 | 5519.24 55 | 5539.41 56 | 5578.89 57 | 5756.19 58 | 5877.25 59 | 6302.05 60 | 6313.81 61 | 6365.53 62 | 6549.86 63 | 6564.60 64 | 6585.27 65 | 6679.99 66 | 6718.29 67 | 6732.67 68 | 7067.14 69 | 7137.77 70 | 7321.94 71 | 7332.21 72 | 7334.17 73 | 7753.19 74 | 8581.06 75 | 8729.53 76 | 9017.80 77 | 9071.10 78 | 9126.10 79 | 9232.20 80 | 9533.20 81 | 9548.80 82 | 9852.96 83 | 10052.60 84 | 10323.32 85 | 10832.06 86 | 10833.31 87 | 10941.17 88 | 12570.21 89 | 12821.58 90 | 17366.88 91 | 18179.20 92 | 18756.40 93 | 19450.89 94 | 21661.18 95 | 26258.71 96 | 30392.02 97 | 32969.80 98 | 37405.76 99 | 40522.79 100 | 46537.80 101 | 51286.50 102 | 59082.20 103 | 69852.74 104 | 74599.00 105 | 75024.40 106 | 89913.80 107 | 105105.00 108 | 123719.12 109 | 128135.48 110 | 143678.00 111 | 155551.00 112 | 187130.00 113 | 218302.00 114 | 328709.00 115 | 334800.00 116 | 348140.00 117 | 360135.00 118 | 518145.00 119 | 573300.00 120 | 606420.00 121 | 631852.00 122 | 883564.00 123 | 1218000.00 124 | 1455350.00 125 | 1576429.62 126 | 2053000.00 127 | 3703700.00 128 | 6097000.00 129 | -------------------------------------------------------------------------------- /cloudyfsps/data/orderedLinesEXT.dat: -------------------------------------------------------------------------------- 1 | 917.4730 2 | 917.7260 3 | 917.9700 4 | 918.1470 5 | 918.4930 6 | 918.7040 7 | 919.9120 8 | 920.2430 9 | 920.9690 10 | 922.5090 11 | 922.9690 12 | 923.1560 13 | 923.4380 14 | 924.0090 15 | 926.2310 16 | 927.4720 17 | 928.1860 18 | 929.0140 19 | 930.7540 20 | 934.5010 21 | 935.6720 22 | 937.8090 23 | 942.2580 24 | 943.9390 25 | 946.1000 26 | 946.3870 27 | 948.5060 28 | 949.7490 29 | 950.6610 30 | 952.1180 31 | 953.9000 32 | 954.1000 33 | 959.3060 34 | 963.8280 35 | 967.2020 36 | 969.0490 37 | 972.5430 38 | 973.5770 39 | 976.7910 40 | 977.0000 41 | 980.7000 42 | 981.2580 43 | 991.0000 44 | 993.3540 45 | 1001.7300 46 | 1007.3400 47 | 1011.2900 48 | 1020.1800 49 | 1024.0300 50 | 1025.7300 51 | 1033.0600 52 | 1035.7400 53 | 1036.8000 54 | 1040.0800 55 | 1071.3200 56 | 1085.0000 57 | 1086.2700 58 | 1092.5000 59 | 1095.6900 60 | 1121.3000 61 | 1125.7900 62 | 1131.1200 63 | 1140.1000 64 | 1154.4200 65 | 1176.0000 66 | 1179.5900 67 | 1197.5600 68 | 1198.8500 69 | 1200.0000 70 | 1207.0000 71 | 1215.2300 72 | 1215.6800 73 | 1247.5000 74 | 1256.0000 75 | 1257.6400 76 | 1263.3200 77 | 1307.6600 78 | 1307.6800 79 | 1314.7700 80 | 1324.1100 81 | 1335.0000 82 | 1341.1700 83 | 1357.0000 84 | 1375.7300 85 | 1394.0000 86 | 1400.3700 87 | 1403.0000 88 | 1406.0000 89 | 1417.0000 90 | 1472.7400 91 | 1484.9700 92 | 1485.0000 93 | 1486.0000 94 | 1531.0000 95 | 1548.0000 96 | 1551.0000 97 | 1561.3300 98 | 1577.1000 99 | 1640.0000 100 | 1656.0000 101 | 1661.0000 102 | 1666.0000 103 | 1670.7900 104 | 1720.0000 105 | 1742.0000 106 | 1744.2400 107 | 1749.0000 108 | 1751.0000 109 | 1751.8300 110 | 1752.0000 111 | 1754.0000 112 | 1786.0000 113 | 1813.9900 114 | 1815.0000 115 | 1828.0000 116 | 1855.0000 117 | 1863.0000 118 | 1883.0000 119 | 1892.0000 120 | 1907.0000 121 | 1910.0000 122 | 2061.0990 123 | 2141.0000 124 | 2297.6080 125 | 2321.0000 126 | 2324.0000 127 | 2325.0000 128 | 2327.0000 129 | 2328.0000 130 | 2329.0000 131 | 2336.7160 132 | 2344.7180 133 | 2400.7310 134 | 2471.0000 135 | 2590.5150 136 | 2660.0000 137 | 2670.0000 138 | 2795.5300 139 | 2802.7100 140 | 2829.9120 141 | 2853.8380 142 | 2854.8390 143 | 2945.9610 144 | 3109.0000 145 | 3188.6620 146 | 3343.0000 147 | 3448.5780 148 | 3614.6710 149 | 3722.0000 150 | 3726.0000 151 | 3729.0000 152 | 3797.9200 153 | 3820.6840 154 | 3835.4000 155 | 3868.0960 156 | 3868.5660 157 | 3869.0000 158 | 3888.6300 159 | 3889.0700 160 | 3965.8520 161 | 3968.0000 162 | 3970.0900 163 | 4027.3280 164 | 4042.1420 165 | 4052.1440 166 | 4070.1490 167 | 4070.0000 168 | 4075.1500 169 | 4076.1510 170 | 4078.0000 171 | 4095.1560 172 | 4101.7600 173 | 4112.1600 174 | 4121.9730 175 | 4144.9290 176 | 4153.1710 177 | 4170.1450 178 | 4189.1800 179 | 4240.1940 180 | 4268.2010 181 | 4279.2040 182 | 4295.2080 183 | 4301.2100 184 | 4340.4900 185 | 4343.2210 186 | 4363.0000 187 | 4380.2300 188 | 4389.1630 189 | 4438.7960 190 | 4471.4700 191 | 4608.2910 192 | 4650.3020 193 | 4659.8540 194 | 4670.3070 195 | 4687.3220 196 | 4703.3460 197 | 4712.3180 198 | 4714.3390 199 | 4741.3260 200 | 4756.5200 201 | 4861.3600 202 | 4914.3720 203 | 4923.3040 204 | 4932.3760 205 | 4959.0000 206 | 5006.3960 207 | 5007.0000 208 | 5017.0790 209 | 5049.0470 210 | 5192.0000 211 | 5199.4470 212 | 5200.0000 213 | 5272.3670 214 | 5325.4810 215 | 5518.0000 216 | 5538.0000 217 | 5577.0000 218 | 5680.5760 219 | 5755.0000 220 | 5829.6160 221 | 5875.6100 222 | 5893.5730 223 | 6300.0000 224 | 6312.0000 225 | 6363.0000 226 | 6548.0000 227 | 6562.8500 228 | 6578.8170 229 | 6584.0000 230 | 6678.1500 231 | 6716.0000 232 | 6721.8550 233 | 6731.0000 234 | 6802.8770 235 | 7065.1800 236 | 7135.0000 237 | 7172.9770 238 | 7238.9940 239 | 7265.0010 240 | 7269.0020 241 | 7283.3560 242 | 7308.0130 243 | 7323.0000 244 | 7332.0000 245 | 7534.0740 246 | 7751.0000 247 | 7775.1390 248 | 7951.6870 249 | 7981.1950 250 | 8049.2130 251 | 8364.0280 252 | 8579.0000 253 | 8619.3170 254 | 9014.9200 255 | 9069.0000 256 | 9124.0000 257 | 9229.0300 258 | 9266.5420 259 | 9466.1660 260 | 9532.0000 261 | 9545.9900 262 | 9606.0740 263 | 9850.0000 264 | 9905.7150 265 | 10049.4000 266 | 10126.9750 267 | 10291.8200 268 | 10314.1260 269 | 10325.8290 270 | 10330.0000 271 | 10341.8330 272 | 10375.8430 273 | 10670.7230 274 | 10832.0660 275 | 10829.9000 276 | 10830.3000 277 | 10915.9890 278 | 10920.0900 279 | 10938.1000 280 | 10999.6120 281 | 11016.1160 282 | 11048.0250 283 | 11473.1400 284 | 11893.2540 285 | 11972.4760 286 | 12530.8270 287 | 12566.8000 288 | 12788.3970 289 | 12793.9990 290 | 12818.1000 291 | 12849.6140 292 | 12971.9470 293 | 12988.4520 294 | 13209.1110 295 | 13415.3680 296 | 13721.8510 297 | 15087.8220 298 | 16404.4800 299 | 16439.9900 300 | 17007.3440 301 | 17362.1000 302 | 18098.9410 303 | 18174.1000 304 | 18690.5020 305 | 18702.3050 306 | 18751.1000 307 | 19094.6120 308 | 19445.6000 309 | 19548.3350 310 | 20586.9180 311 | 21123.7640 312 | 21136.0670 313 | 21655.3000 314 | 24734.1470 315 | 26192.1440 316 | 26205.6480 317 | 26240.9570 318 | 26251.5000 319 | 30383.7000 320 | 32960.9000 321 | 37036.0970 322 | 37395.3000 323 | 37510.2270 324 | 40377.4080 325 | 40409.3160 326 | 40490.1380 327 | 40490.3380 328 | 40511.6000 329 | 42957.6110 330 | 46212.5970 331 | 46525.0000 332 | 51272.5000 333 | 53401.6560 334 | 59065.9000 335 | 59816.3040 336 | 69800.0000 337 | 73219.9560 338 | 74537.7150 339 | 74561.4220 340 | 74561.5220 341 | 74578.1000 342 | 75004.3000 343 | 87600.3750 344 | 90000.0000 345 | 105100.0000 346 | 113086.8200 347 | 117031.8950 348 | 123685.0000 349 | 128100.0000 350 | 144000.0000 351 | 155500.0000 352 | 162090.1750 353 | 178898.7550 354 | 179358.8810 355 | 186700.0000 356 | 190617.9490 357 | 204055.6110 358 | 218300.0000 359 | 229253.4780 360 | 245192.8220 361 | 258870.5490 362 | 259882.8250 363 | 278032.7710 364 | 328700.0000 365 | 330361.0320 366 | 333090.7760 367 | 334700.0000 368 | 348140.0000 369 | 353486.3340 370 | 360140.0000 371 | 388696.9300 372 | 513004.8070 373 | 516796.8400 374 | 518000.0000 375 | 572100.0000 376 | 606400.0000 377 | 631700.0000 378 | 883300.0000 379 | 1217000.0000 380 | 1455300.0000 381 | 1576000.0000 382 | 2054000.0000 383 | -------------------------------------------------------------------------------- /cloudyfsps/data/readme.dat: -------------------------------------------------------------------------------- 1 | # cloudyLines.dat // cloudyLinesEXT.dat 2 | # Referenced in: cloudyInput.py 3 | # Written in each Cloudy input file to tell the 4 | # program which emission line fluxes to record. 5 | # Format is Cloudy specific -- H 1 1215.68A 6 | # element symbol, transition, wavelength 7 | # NOT wavelength ordered. 8 | 9 | # refLines.dat // refLinesEXT.dat 10 | # Referenced in: cloudyOutputTools.py 11 | # 2 columns: 12 | # wavelength (angstroms, in vacuum) 13 | # line ID 14 | # same order as cloudy_lines_new.dat 15 | 16 | # orderedLines.dat // orderedLinesEXT.dat 17 | # Referenced in: outputFormatting.py 18 | # ordered version of ref_lines_vac.dat 19 | # single column of wavelengths in angstroms 20 | 21 | # FSPSlam.dat 22 | # Referenced in: cloudyOutputTools.py, outputFormatting.py 23 | # Wavelength array (ang) for nebular continuum. 24 | 25 | # emlines.dat 26 | # Referenced in: generalTools.py 27 | -------------------------------------------------------------------------------- /cloudyfsps/data/refLines.dat: -------------------------------------------------------------------------------- 1 | 1215.6701,Ly-alpha 1216 2 | 1025.728,Ly-beta 1025 3 | 972.517,Ly-gamma 972 4 | 949.742,Ly-delta 949 5 | 937.814,Ly-5 937 6 | 930.751,Ly-6 930 7 | 926.249,Ly-7 926 8 | 923.148,Ly-8 923 9 | 6564.60,H-alpha 6563 10 | 4862.71,H-beta 4861 11 | 4341.692,H-gamma 4340 12 | 4102.892,H-delta 4102 13 | 3971.198,H-5 3970 14 | 3890.166,H-6 3889 15 | 3836.485,H-7 3835 16 | 3798.987,H-8 3798 17 | 18756.4,Pa-alpha 18752 18 | 12821.578,Pa-beta 12819 19 | 10941.17,Pa-gamma 10939 20 | 10052.60,Pa-delta 10050 21 | 9548.80,Pa-5 9546 22 | 9232.20,Pa-6 9229 23 | 9017.8,Pa-7 9015 24 | 40522.79,Br-alpha 40515 25 | 26258.71,Br-beta 26254 26 | 21661.178,Br-gamma 21657 27 | 19450.89,Br-delta 19447 28 | 18179.20,Br-5 18175 29 | 17366.885,Br-6 17363 30 | 74599.00,Pf-alpha 74585 31 | 46537.80,Pf-beta 46529 32 | 37405.76,Pf-gamma 37398 33 | 32969.80,Pf-delta 32964 34 | 30392.02,Pf-5 30386 35 | 123719.12,Hu-alpha 12.4m 36 | 75024.40,Hu-beta 75011 37 | 59082.20,Hu-gamma 59071 38 | 51286.50,Hu-delta 51277 39 | 4472.735,HeI 4472 40 | 5877.249,HeI 5877 41 | 6679.995,HeI 6680 42 | 10832.057,HeI 10829 43 | 10833.306,HeI 10833 44 | 3889.75,HeI 3889 45 | 7067.138,HeI 7065 46 | 1640.42,HeII 1640 47 | 9852.96,[CI]9850 48 | 8729.53,[CI]8727 49 | 4622.864,[CI]4621 50 | 6097000.00,[CI]610m 51 | 3703700.00,[CI]369m 52 | 1576429.62,[CII]157.7m 53 | 2325.40,CII]2326 54 | 2324.21,CII]2326 55 | 2328.83,CII]2326 56 | 2327.64,CII]2326 57 | 2326.11,CII]2326 58 | 1908.73,CIII] 59 | 1906.68,[CIII] 60 | 5201.705,[NI]5200 61 | 6585.27,[NII]6585 62 | 6549.86,[NII]6549 63 | 5756.19,[NII]5756 64 | 1218000.00,[NII]122m 65 | 2053000.00,[NII]205m 66 | 2142.30,NII]2141 67 | 573300.00,[NIII]57m 68 | 6302.046,[OI]6302 69 | 6365.535,[OI]6365 70 | 5578.89,[OI]5578 71 | 631852.00,[OI]63m 72 | 1455350.00,[OI]145m 73 | 3727.10,[OII]3726 74 | 3729.86,[OII]3729 75 | 7332.21,[OII]7332 76 | 7321.94,[OII]7323 77 | 2471.088,[OII]2471 78 | 1661.241,OIII]1661 79 | 1666.15,OIII]1666 80 | 5008.240,[OIII]5007 81 | 4960.295,[OIII]4960 82 | 4364.435,[OIII]4364 83 | 2321.664,[OIII]2321 84 | 883564.00,[OIII]88m 85 | 518145.00,[OIII]52m 86 | 128135.48,[NeII]12.8m 87 | 155551.00,[NeIII]15.5m 88 | 360135.00,[NeIII]36m 89 | 3869.86,[NeIII]3870 90 | 3968.59,[NeIII]3968 91 | 3343.5,[NeIII]3343 92 | 1812.205,[NeIII]1815 93 | 4725.47,[NeIV]4720 94 | 2796.352,MgII 2800 95 | 2803.53,MgII 2800 96 | 348140.00,[SiII]35m 97 | 10323.32,[SII]10331 98 | 6732.673,[SII]6732 99 | 6718.294,[SII]6717 100 | 4069.75,[SII]4070 101 | 4077.50,[SII]4078 102 | 187130.00,[SIII]18.7m 103 | 334800.00,[SIII]33.5m 104 | 9533.20,[SIII]9533 105 | 9071.1,[SIII]9071 106 | 6313.81,[SIII]6314 107 | 3722.75,[SIII]3723 108 | 105105.00,[SIV]10.5m 109 | 69852.74,[ArII]7m 110 | 7137.77,[ArIII]7138 111 | 7753.19,[ArIII]7753 112 | 5193.27,[ArIII]5193 113 | 3109.98,[ArIII]3110 114 | 218302.00,[ArIII]22m 115 | 89913.80,[ArIII]9m 116 | 7334.17,[ArIV]7330 117 | 2669.951,[AlII] 2670 118 | 2661.146,[AlII] 2660 119 | 1854.716,[AlIII] 1855 120 | 1862.7895,[AlIII] 1863 121 | 143678.00,[ClII] 14.4m 122 | 8581.06,[ClII] 8579 123 | 9126.10,[ClII] 9124 124 | 5539.411,[ClIII] 5538 125 | 5519.242,[ClIII]5518 126 | 606420.00,[PII] 60m 127 | 328709.00,[PII] 32m 128 | 12570.21,[FeII] 1.26m 129 | -------------------------------------------------------------------------------- /cloudyfsps/data/refLinesEXT.dat: -------------------------------------------------------------------------------- 1 | 917.473,O I 917.473A 2 | 917.726,O I 917.726A 3 | 917.97,O I 917.970A 4 | 918.147,P III 918.147A 5 | 918.493,Ar I 918.493A 6 | 918.704,O I 918.704A 7 | 919.912,O I 919.912A 8 | 920.243,O I 920.243A 9 | 920.969,H I 920.969A 10 | 922.509,Ar I 922.509A 11 | 922.969,O I 922.969A 12 | 923.148,Ly-8 923 13 | 923.438,O I 923.438A 14 | 924.009,Cr III 924.009A 15 | 926.249,Ly-7 926 16 | 927.472,O I 927.472A 17 | 928.186,O I 928.186A 18 | 929.014,Al II 929.014A 19 | 930.751,Ly-6 930 20 | 934.501,O I 934.501A 21 | 935.672,O I 935.672A 22 | 937.814,Ly-5 937 23 | 942.258,N I 942.258A 24 | 943.939,C I 943.939A 25 | 946.1,C II 946.100A 26 | 946.387,O I 946.387A 27 | 948.506,O I 948.506A 28 | 949.742,Ly-delta 949.749A 29 | 950.661,P IV 950.661A 30 | 952.118,N I 952.118A 31 | 953.9,N I 953.900A 32 | 954.1,N I 954.100A 33 | 959.306,Mg II 959.306A 34 | 963.828,P II 963.828A 35 | 967.202,P II 967.202A 36 | 969.049,O I 969.049A 37 | 972.517,Ly-gamma 972 38 | 973.577,O I 973.577A 39 | 976.791,O I 976.791A 40 | 977.0,C III 977.000A 41 | 980.7,N I 980.700A 42 | 981.258,Cl IV 981.258A 43 | 991.0,N III 991.000A 44 | 993.354,Si II 993.354A 45 | 1001.73,P III 1001.73A 46 | 1007.34,S III 1007.34A 47 | 1011.29,Cl III 1011.29A 48 | 1020.18,C II 1020.18A 49 | 1024.03,Si II 1024.03A 50 | 1025.728,Ly-beta 1025 51 | 1033.06,Cr III 1033.06A 52 | 1035.74,Cr III 1035.74A 53 | 1036.8,C II 1036.80A 54 | 1040.08,Mg II 1040.08A 55 | 1071.32,Cl II 1071.32A 56 | 1085.0,N II 1085 57 | 1086.27,S IV 1086.27A 58 | 1092.5,C II 1092.50A 59 | 1095.69,Ar I 1095.69A 60 | 1121.3,P 5 1121.30A 61 | 1125.79,Fe III 1125.79A 62 | 1131.12,N I 1131.12A 63 | 1140.1,C I 1140.10A 64 | 1154.42,P II 1154.42A 65 | 1176.0,C III 1176 66 | 1179.59,Si II 1179.59A 67 | 1197.56,S III 1197.56A 68 | 1198.85,Mn II 1198.85A 69 | 1200.0,N I 1200 70 | 1207.0,Si III 1207 71 | 1215.23,He II 1215.23A 72 | 1215.6701,Ly-alpha 1215 73 | 1247.5,C I 1247.50A 74 | 1256.0,S II 1256 75 | 1257.64,Mg II 1257.64A 76 | 1263.32,Si II 1263.32A 77 | 1307.66,Si II 1307.66A 78 | 1307.68,P II 1307.68A 79 | 1314.77,C I 1314.77A 80 | 1324.11,Ni II 1324.11A 81 | 1334.53,C II 1335 82 | 1341.17,P III 1341.17A 83 | 1357.0,O I 1357 84 | 1375.73,Ni II 1375.73A 85 | 1394.0,Si IV 1394 86 | 1400.37,Ni II 1400.37A 87 | 1403.0,Si IV 1403 88 | 1406.0,S IV 1406 89 | 1417.0,S IV 1417 90 | 1472.74,Ni II 1472.74A 91 | 1484.97,Ni II 1484.97A 92 | 1483.321,[N IV] 1485 93 | 1486.496,N IV] 1486 94 | 1533.43,Si II 1531 95 | 1548.202,C IV 1548 96 | 1550.774,C IV 1551 97 | 1561.33,C I 1561.33A 98 | 1577.1,C III 1577.10A 99 | 1640.42,He II 1640 100 | 1656.0,C I 1656 101 | 1660.81,O III] 1661 102 | 1666.15,O III] 1666 103 | 1670.79,Al II 1671 104 | 1720.0,S III 1720 105 | 1742.0,N II 1742 106 | 1744.24,Ni II 1744 107 | 1748.646,N III] 1749 108 | 1751.0,N III] 1751 109 | 1751.83,Ni II 1752 110 | 1752.16,N III] 1752 111 | 1753.995,N III] 1754 112 | 1786.0,Fe II 1786 113 | 1813.99,Si II 1814 114 | 1812.205,[Ne III] 1815 115 | 1828.0,C III 1828 116 | 1854.716,[Al III] 1855 117 | 1862.7895,[Al III] 1863 118 | 1883.0,Si III] 1883 119 | 1892.03,Si III] 1892 120 | 1906.68,[C III] 1907 121 | 1908.73,C III] 1910 122 | 2061.099,Cr II 2060 123 | 2142.3,N II] 2141 124 | 2297.608,C III 2297 125 | 2321.664,[O III] 2321 126 | 2324.21,C II] 2324 127 | 2325.4,C II] 2325 128 | 2326.11,C II] 2327 129 | 2327.64,C II] 2328 130 | 2328.83,C II] 2329 131 | 2336.716,Si II] 2336 132 | 2344.718,Si II] 2344 133 | 2400.731,Fe II 2400 134 | 2471.088,[O II] 2471 135 | 2590.515,Mn II 2589.74A 136 | 2661.146,[Al II] 2660 137 | 2669.951,[Al II] 2670 138 | 2796.352,Mg II] 2795.53A 139 | 2803.53,Mg II] 2802.71A 140 | 2829.912,He I 2829.08A 141 | 2853.838,Mg I 2853 142 | 2854.839,Ar IV 2854 143 | 2945.961,He I 2945.10A 144 | 3109.98,[Ar III] 3109 145 | 3188.662,He I 3187.74A 146 | 3343.5,[Ne III] 3343 147 | 3448.578,He I 3447.59A 148 | 3614.671,He I 3613.64A 149 | 3722.75,[S III] 3722 150 | 3727.1,[O II] 3726 151 | 3729.86,[O II] 3729 152 | 3798.987,H-8 3798 153 | 3820.684,He I 3819.60A 154 | 3836.485,H-7 3835 155 | 3868.096,[O II] 3867 156 | 3868.566,He I 3867.47A 157 | 3869.86,[Ne III] 3869 158 | 3889.75,He I 3888.63A 159 | 3890.166,H-6 3889 160 | 3965.852,He I 3964.73A 161 | 3968.59,[Ne III] 3968 162 | 3971.198,H-5 3970 163 | 4027.328,He I 4026 164 | 4042.142,[N II] 4041 165 | 4052.144,[O II] 4051 166 | 4070.149,[C III] 4069 167 | 4069.75,[S II] 4070 168 | 4075.15,[S II] 4074 169 | 4076.151,[O II 4075 170 | 4077.5,[S II] 4078 171 | 4095.156,[O II] 4094 172 | 4102.892,H-delta 4101.76A 173 | 4112.16,[O II] 4111 174 | 4121.973,He I 4120.81A 175 | 4144.929,He I 4143.76A 176 | 4153.171,[O II] 4152 177 | 4170.145,He I 4168.97A 178 | 4189.18,[O II] 4188 179 | 4240.194,[N II] 4239 180 | 4268.201,C II 4267 181 | 4279.204,[O II] 4278 182 | 4295.208,[O II] 4294 183 | 4301.21,[Fe II] 4300 184 | 4341.692,H-gamma 4341 185 | 4343.221,[O II] 4342 186 | 4364.435,[O III] 4363 187 | 4380.23,[N III] 4379 188 | 4389.163,He I 4387.93A 189 | 4438.796,He I 4437.55A 190 | 4472.735,He I 4471.47A 191 | 4608.291,[O II] 4607 192 | 4650.302,[C III] 4649 193 | 4659.854,[Fe III] 4658 194 | 4670.307,[P II] 4669 195 | 4687.322,He II 4686.01A 196 | 4703.346,[Fe III] 4702.03A 197 | 4712.318,[Ar IV] 4711 198 | 4714.339,He I 4713.02A 199 | 4741.326,[Ar IV] 4740 200 | 4756.52,[Fe III] 4755.19A 201 | 4862.71,H-beta 4861 202 | 4914.372,[O II] 4913 203 | 4923.304,He I 4921.93A 204 | 4932.376,[O III] 4931 205 | 4960.295,[O III] 4959 206 | 5006.396,[N II] 5005 207 | 5008.24,[O III] 5007 208 | 5017.079,He I 5015.68A 209 | 5049.047,He I 5047.64A 210 | 5193.27,[Ar III] 5192 211 | 5199.447,[N I] 5198 212 | 5201.705,[N I] 5200 213 | 5272.367,[Fe III] 5270.90A 214 | 5325.481,[Cl IV] 5324 215 | 5519.242,[Cl III] 5518 216 | 5539.411,[Cl III] 5538 217 | 5578.89,[O I] 5577 218 | 5680.576,[Fe IV] 5679 219 | 5756.19,[N II] 5755 220 | 5829.616,[Cr III] 5828 221 | 5877.249,He I 5875.61A 222 | 5893.573,Na I 5891.94A 223 | 6302.046,[O I] 6300 224 | 6313.81,[S III] 6312 225 | 6365.535,[O I] 6363 226 | 6549.86,[N II] 6548 227 | 6564.6,H-alpha 6563 228 | 6578.817,[Cr 5] 6577 229 | 6585.27,[N II] 6584 230 | 6679.995,He I 6678.15A 231 | 6718.294,[S II] 6716 232 | 6721.855,x[S II] 6720 233 | 6732.673,[S II] 6731 234 | 6802.877,[Cr IV] 6801 235 | 7067.138,He I 7065.18A 236 | 7137.77,[Ar III] 7135 237 | 7172.977,[Ar IV] 7171 238 | 7238.994,[Ar IV] 7237 239 | 7265.001,[Ar IV] 7263 240 | 7269.002,[Cr IV] 7267 241 | 7283.356,He I 7281.35A 242 | 7308.013,[Ca II] 7306 243 | 7321.94,[O II] 7323 244 | 7332.21,[O II] 7332 245 | 7534.074,[Cl IV] 7532 246 | 7753.19,[Ar III] 7751 247 | 7775.139,O I 7773 248 | 7951.687,O I 7949 249 | 7981.195,[Cr 5] 7979 250 | 8049.213,[Cl IV] 8047 251 | 8364.028,He I 8361.73A 252 | 8581.06,[Cl II] 8579 253 | 8619.317,[Fe II] 8616.95A 254 | 9017.8,Pa-7 9015 255 | 9071.1,[S III] 9069 256 | 9126.1,[Cl II] 9124 257 | 9232.2,Pa-6 9229 258 | 9266.542,O I 9264 259 | 9466.166,He I 9463.57A 260 | 9533.2,[S III] 9532 261 | 9548.8,Pa-5 9546 262 | 9606.074,He I 9603.44A 263 | 9852.96,[C I] 9850 264 | 9905.715,[C II] 9903 265 | 10052.6,Pa-delta 1.00494m 266 | 10126.975,He II 1.01242m 267 | 10291.82,[S II] 1.02890m 268 | 10314.126,He I 1.03113m 269 | 10325.829,[S II] 1.03230m 270 | 10323.32,[S II] 1.03300m 271 | 10341.833,[S II] 1.03390m 272 | 10375.843,[S II] 1.03730m 273 | 10670.723,He I 1.06678m 274 | 10832.066,He I 1.08291m 275 | 10832.057,He I 1.08299m 276 | 10833.306,He I 1.08303m 277 | 10915.989,He I 1.09130m 278 | 10920.09,He I 1.09171m 279 | 10941.17,Pa-gamma 1.09381m 280 | 10999.612,He I 1.09966m 281 | 11016.116,He I 1.10131m 282 | 11048.025,He I 1.10450m 283 | 11473.14,P II 1.14700m 284 | 11893.254,P II 1.18900m 285 | 11972.476,He I 1.19692m 286 | 12530.827,He I 1.25274m 287 | 12570.21,Fe II 1.25668m 288 | 12788.397,He I 1.27849m 289 | 12793.999,He I 1.27905m 290 | 12821.578,Pa-beta 1.28181m 291 | 12849.614,He I 1.28461m 292 | 12971.947,He I 1.29684m 293 | 12988.452,He I 1.29849m 294 | 13209.111,Fe II 1.32055m 295 | 13415.368,He I 1.34117m 296 | 13721.851,Fe II 1.37181m 297 | 15087.822,He I 1.50837m 298 | 16404.48,P II 1.64000m 299 | 16439.99,Fe II 1.64355m 300 | 17007.344,He I 1.70027m 301 | 17366.885,Br-6 1.73621m 302 | 18098.941,Fe II 1.80940m 303 | 18179.2,Br-5 1.81741m 304 | 18690.502,He I 1.86854m 305 | 18702.305,He I 1.86972m 306 | 18756.4,Pa-alpha 1.87511m 307 | 19094.612,He I 1.90894m 308 | 19450.89,Br-delta 1.94456m 309 | 19548.335,He I 1.95430m 310 | 20586.918,He I 2.05813m 311 | 21123.764,He I 2.11180m 312 | 21136.067,He I 2.11303m 313 | 21661.178,Br-gamma 2.16553m 314 | 24734.147,He I 2.47274m 315 | 26192.144,He I 2.61850m 316 | 26205.648,He I 2.61985m 317 | 26240.957,He I 2.62338m 318 | 26258.71,Br-beta 2.62515m 319 | 30392.02,Pf-5 3.03837m 320 | 32969.8,Pf-delta 3.29609m 321 | 37036.097,He I 3.70260m 322 | 37405.76,Pf-gamma 3.73953m 323 | 37510.227,Cr 5 3.75000m 324 | 40377.408,He I 4.03664m 325 | 40409.316,He I 4.03983m 326 | 40490.138,He I 4.04791m 327 | 40490.338,He I 4.04793m 328 | 40522.79,Br-alpha 4.05116m 329 | 42957.611,He I 4.29459m 330 | 46212.597,K III 4.62000m 331 | 46537.8,Pf-beta 4.65250m 332 | 51286.5,Hu-delta 5.12725m 333 | 53401.656,Fe II 5.33871m 334 | 59082.2,Hu-gamma 5.90659m 335 | 59816.304,K IV 5.98000m 336 | 69852.74,Ar II 6.98000m 337 | 73219.956,Na III 7.32000m 338 | 74537.715,He I 7.45174m 339 | 74561.422,He I 7.45411m 340 | 74561.522,He I 7.45412m 341 | 74599.0,Pf-alpha 7.45781m 342 | 75024.4,Hu-beta 7.50043m 343 | 87600.375,H I 8.75765m 344 | 89913.8,Ar III 9.00000m 345 | 105105.0,[S IV] 10.5100m 346 | 113086.82,H I 11.3056m 347 | 117031.895,Cl IV 11.7000m 348 | 123719.12,Hu-alpha 12.3685m 349 | 128135.48,Ne II 12.8100m 350 | 143678.0,Cl II 14.4000m 351 | 155551.0,Ne III 15.5500m 352 | 162090.175,H I 16.2046m 353 | 178898.755,P III 17.8850m 354 | 179358.881,Fe II 17.9310m 355 | 187130.0,S III 18.6700m 356 | 190617.949,H I 19.0566m 357 | 204055.611,Cl IV 20.4000m 358 | 218302.0,Ar III 21.8300m 359 | 229253.478,[Fe III] 22.9191m 360 | 245192.822,Fe II 24.5126m 361 | 258870.549,O IV 25.8800m 362 | 259882.825,Fe II 25.9812m 363 | 278032.771,H I 27.7957m 364 | 328709.0,P II 32.8700m 365 | 330361.032,[Fe III] 33.0271m 366 | 333090.776,Cl II 33.3000m 367 | 334800.0,S III 33.4700m 368 | 348140.0,Si II 34.8140m 369 | 353486.334,Fe II 35.3390m 370 | 360135.0,Ne III 36.0140m 371 | 388696.93,H I 38.8591m 372 | 513004.807,Fe II 51.2865m 373 | 516796.84,[Fe III] 51.6656m 374 | 518145.0,O III 51.8000m 375 | 573300.0,N III 57.2100m 376 | 606420.0,P II 60.6400m 377 | 631852.0,O I 63.1700m 378 | 883564.0,O III 88.3300m 379 | 1218000.0,N II 121.700m 380 | 1455350.0,O I 145.530m 381 | 1576429.62,C II 157.600m 382 | 2053000.0,N II 205.400m 383 | -------------------------------------------------------------------------------- /cloudyfsps/generalTools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import (division, print_function, absolute_import, 4 | unicode_literals) 5 | 6 | import numpy as np 7 | import itertools 8 | from scipy.integrate import simps 9 | import pkg_resources 10 | 11 | def calcQ(lamin0, specin0, mstar=1.0, helium=False, f_nu=False): 12 | ''' 13 | Claculate the number of lyman ionizing photons for given spectrum 14 | Input spectrum must be in ergs/s/A!! 15 | Q = int(Lnu/hnu dnu, nu_0, inf) 16 | ''' 17 | lamin = np.asarray(lamin0) 18 | specin = np.asarray(specin0) 19 | c = 2.9979e18 #ang/s 20 | h = 6.626e-27 #erg/s 21 | if helium: 22 | lam_0 = 304.0 23 | else: 24 | lam_0 = 911.6 25 | if f_nu: 26 | nu_0 = c/lam_0 27 | inds, = np.where(c/lamin >= nu_0) 28 | hlam, hflu = c/lamin[inds], specin[inds] 29 | nu = hlam[::-1] 30 | f_nu = hflu[::-1] 31 | integrand = f_nu/(h*nu) 32 | Q = simps(integrand, x=nu) 33 | else: 34 | inds, = np.nonzero(lamin <= lam_0) 35 | lam = lamin[inds] 36 | spec = specin[inds] 37 | integrand = lam*spec/(h*c) 38 | Q = simps(integrand, x=lam)*mstar 39 | return Q 40 | 41 | def calcU_avg(lamin, specin, Rinner=0.01, nh=100.0, eff=1.0, mass=1.0): 42 | ''' 43 | Calculate , the average ionization parameter 44 | ''' 45 | Q = calcQ(lamin, specin)*mass 46 | Rin = Rinner*3.09e18 47 | alphab = 2.59e-13 48 | c = 2.9979e10 49 | U = ((3.0*Q*nh*eff**2)/(4.0*np.pi))**(1./3)*alphab**(2./3)/c 50 | return U 51 | 52 | def calcU(lamin=None, specin=None, Rinner=0.01, nh=30.0, Q=None): 53 | ''' 54 | Calculate U, the ionization parameter 55 | if Rinner < 16, assume inner radius is given in parsecs. 56 | if 16 < Rinner < 30: assume logR in cm is given 57 | otherwise, assume R in cm is given. 58 | if Q is less than 100, assumes you have given a logQ 59 | ''' 60 | if Q is None: 61 | Q = calcQ(lamin, specin) 62 | else: 63 | if Q < 100.: 64 | Q = 10.**Q 65 | if Rinner < 16.: # assume pc given, convert to cm 66 | Rin = Rinner*3.09e18 67 | elif (Rinner >= 16. and Rinner <= 30.): # assume logR in cm given 68 | Rin = 10.**Rinner 69 | else: # assume R in cm is given 70 | Rin = Rinner 71 | c = 2.9979e10 72 | return Q/(4.0*np.pi*Rin**2.0*nh*c) 73 | 74 | def calcForLogQ(logU=None, Rinner=None, nh=None, logQ=None): 75 | c = 2.9979e10 76 | if Rinner > 500.0: 77 | #means it is in cm 78 | Rin = Rinner 79 | else: 80 | Rin = Rinner*3.09e18 81 | Q = 10.0**logU*(4.0*np.pi*Rin**2.0*nh*c) 82 | return np.log10(Q) 83 | 84 | def calcRs(lamin, specin, eff=1.0, nh=100.0): 85 | ''' 86 | Calculate the schwarzchild radius 87 | ''' 88 | alphab = 2.59e-13 89 | Q = calcQ(lamin, specin) 90 | Rs = (3.0*Q/(4.0*np.pi*nh*nh*eff*alphab))**(1./3) 91 | return Rs 92 | 93 | def find_nearest(array, val): 94 | ''' 95 | shortcut to find element in array nearest to val 96 | returns index 97 | ''' 98 | return (np.abs(array-val)).argmin() 99 | 100 | def grouper(n, iterable): 101 | ''' 102 | Iterate through array in groups of n 103 | ''' 104 | it = iter(iterable) 105 | while True: 106 | chunk = tuple(itertools.islice(it, n)) 107 | if not chunk: 108 | return 109 | yield chunk 110 | 111 | def name_to_sym(val=None): 112 | elem_keys = dict(helium="He", 113 | carbon="C", 114 | nitrogen="N", 115 | oxygen="O", 116 | neon="Ne", 117 | magnesium="Mg", 118 | silicon="Si", 119 | sulphur="S", 120 | argon="Ar", 121 | calcium="Ca", 122 | iron="Fe", 123 | fluorine="F", 124 | sodium="Na", 125 | aluminum="Al", 126 | chlorine="Cl", 127 | nickel="Ni", 128 | phosphorus="P", 129 | scandium="Sc", 130 | potassium="K", 131 | titanium="Ti", 132 | vanadium="V", 133 | chromium="Cr", 134 | cobalt="Co", 135 | copper="Cu", 136 | manganese="Mn", 137 | zinc="Zn") 138 | if val is None: 139 | return elem_keys 140 | else: 141 | try: 142 | return elem_keys[val.lower()] 143 | except KeyError: 144 | print("key must be in ", list(elem_keys.keys())) 145 | 146 | def sym_to_name(val=None): 147 | elem_keys = dict(He="helium", 148 | C="carbon", 149 | N="nitrogen", 150 | O="oxygen", 151 | Ne="neon", 152 | Mg="magnesium", 153 | Si="silicon", 154 | S="sulphur", 155 | Ar="argon", 156 | Ca="calcium", 157 | Fe="iron", 158 | F="fluorine", 159 | Na="sodium", 160 | Al="aluminum", 161 | Cl="chlorine", 162 | Ni="nickel", 163 | P="phosphorus", 164 | Sc="scandium", 165 | K="potassium", 166 | Ti="titanium", 167 | V="vanadium", 168 | Cr="chromium", 169 | Co="cobalt", 170 | Cu="copper", 171 | Mn="manganese", 172 | Zn="zinc") 173 | if val is None: 174 | return elem_keys 175 | else: 176 | try: 177 | return elem_keys[val.title()] 178 | except KeyError: 179 | print("element not in ", list(elem_keys.keys())) 180 | 181 | def getEmis(use_vac=True): 182 | lfile = pkg_resources.resource_filename(__name__, "data/emlines.dat") 183 | dat = np.genfromtxt(lfile, delimiter='\t', dtype=('U12',float,float)) 184 | names = np.array([d[0].replace(' ','') for d in dat]) 185 | vacwavs = np.array([d[1] for d in dat]) 186 | airwavs = np.array([d[2] for d in dat]) 187 | if use_vac: 188 | return (names, vacwavs) 189 | else: 190 | return (names, airwavs) 191 | 192 | def air_to_vac(inpt, no_uv_conv=True): 193 | ''' 194 | from morton 1991 195 | preserves order of input array 196 | ''' 197 | if type(inpt) is float: 198 | wl = np.array([inpt]) 199 | else: 200 | wl = np.asarray(inpt) 201 | to_vac = lambda lam: (6.4328e-5 + (2.94981e-2/(146.0-(1.0e4/lam)**2.0)) + (2.554e-4/(41.0-(1.0e4/lam)**2.0)))*lam + lam 202 | if no_uv_conv: 203 | outpt = np.array([to_vac(lam) if lam > 2000.0 else lam for lam in wl]) 204 | else: 205 | outpt = to_vac(wl) 206 | return outpt 207 | -------------------------------------------------------------------------------- /cloudyfsps/nebAbundTools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import division 4 | from __future__ import unicode_literals 5 | from __future__ import print_function 6 | from __future__ import absolute_import 7 | from builtins import zip 8 | from builtins import object 9 | 10 | import numpy as np 11 | from .generalTools import sym_to_name 12 | from scipy.interpolate import InterpolatedUnivariateSpline as InterpUS 13 | 14 | def getNebAbunds(set_name, logZ, dust=True, re_z=False, **kwargs): 15 | ''' 16 | neb_abund.get_abunds(set_name, logZ, dust=True, re_z=False) 17 | set_name must be 'dopita', 'newdopita', 'cl01' or 'yeh' 18 | ''' 19 | allowed_names = ['dopita', 'newdopita', 'cl01', 'yeh', 20 | 'varyNO', 'gutkin', 'UVbyler', 'varyCO', 'LIMS'] 21 | if set_name in allowed_names: 22 | return eval('{}({}, dust={}, re_z={})'.format(set_name, logZ, dust, re_z)) 23 | else: 24 | raise IOError(allowed_names) 25 | 26 | class abundSet(object): 27 | def __init__(self, set_name, logZ): 28 | ''' 29 | overarching class for abundance sets. 30 | abundSet('dopita', 0.0) 31 | ''' 32 | self.logZ = logZ 33 | self.abund_0 = load_abund(set_name) 34 | self.depl = load_depl(set_name) 35 | self.calcSpecial() 36 | self.calcFinal() 37 | self.inputStrings() 38 | 39 | def calcSpecial(self): 40 | return 41 | def calcFinal(self): 42 | return 43 | def inputStrings(self): 44 | self.solarstr = 'abundances {} {}'.format(self.solar, self.grains) 45 | elem_strs = [] 46 | names = sym_to_name() 47 | for key in list(self.abund_0.keys()): 48 | elm = names[key] 49 | abund = self.__getattribute__(key) 50 | #if hasattr(self, 're_z'): 51 | # if key != 'He': 52 | # abund -= self.re_z 53 | outstr = 'element abundance {0} {1:.2f} log'.format(elm, abund) 54 | elem_strs.append(outstr) 55 | self.__setattr__('elem_strs', elem_strs) 56 | return 57 | 58 | class dopita(abundSet): 59 | solar = 'old solar 84' 60 | def __init__(self, logZ, dust=True, re_z=False): 61 | ''' 62 | Dopita+2001: old solar abundances = 0.019 63 | ISM grains 64 | ''' 65 | if dust: 66 | self.grains = 'no grains\ngrains ISM' 67 | else: 68 | self.grains = 'no grains' 69 | if re_z: 70 | self.re_z = logZ 71 | else: 72 | self.re_z = 0.0 73 | abundSet.__init__(self, 'dopita', logZ) 74 | 75 | def calcSpecial(self): 76 | ''' 77 | piece-wise function for nitrogen abund (step-function) 78 | functional form for helium 79 | ''' 80 | def calc_N(logZ): 81 | if logZ <= -0.63: 82 | return -4.57 + logZ 83 | else: 84 | return -3.94 + (2.0*logZ) 85 | def calc_He(logZ): 86 | return np.log10(0.08096 + (0.02618*(10.0**logZ))) 87 | 88 | self.__setattr__('He', calc_He(self.logZ)) 89 | self.__setattr__('N', calc_N(self.logZ)+self.depl['N']) 90 | return 91 | def calcFinal(self): 92 | ''' 93 | apply depletions and scale with logZ 94 | ''' 95 | [self.__setattr__(key, val+self.logZ+self.depl[key]) 96 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 97 | return 98 | class newdopita(abundSet): 99 | solar = 'GASS10' 100 | def __init__(self, logZ, dust=True, re_z=False): 101 | ''' 102 | Abundances from Dopita (2013) 103 | Solar Abundances from Grevasse 2010 - z= 0.013 104 | includes smooth polynomial for N/O, C/O relationship 105 | functional form for He(z) 106 | new depletion factors 107 | ISM grains 108 | ''' 109 | if dust: 110 | self.grains = 'no grains\ngrains ISM' 111 | else: 112 | self.grains = 'no grains' 113 | self.re_z=re_z 114 | abundSet.__init__(self, 'newdopita', logZ) 115 | 116 | def calcSpecial(self): 117 | def calc_He(logZ): 118 | return np.log10(0.0737 + (0.024*(10.0**logZ))) 119 | def calc_CNO(logZ): 120 | oxy = np.array([7.39, 7.50, 7.69, 7.99, 8.17, 121 | 8.39, 8.69, 8.80, 8.99, 9.17, 9.39]) 122 | nit = np.array([-6.61, -6.47, -6.23, -5.79, -5.51, 123 | -5.14, -4.60, -4.40, -4.04, -3.67, -3.17]) 124 | car = np.array([-5.58, -5.44, -5.20, -4.76, -4.48, 125 | -4.11, -3.57, -3.37, -3.01, -2.64, -2.14]) 126 | O = self.abund_0['O'] + logZ 127 | C = float(InterpUS(oxy, car, k=1)(O + 12.0)) 128 | N = float(InterpUS(oxy, nit, k=1)(O + 12.0)) 129 | return C, N, O 130 | self.__setattr__('He', calc_He(self.logZ)) 131 | C, N, O = calc_CNO(self.logZ) 132 | [self.__setattr__(key, val + self.depl[key]) 133 | for key, val in zip(['C', 'N', 'O'], [C, N, O])] 134 | return 135 | def calcFinal(self): 136 | [self.__setattr__(key, val+self.logZ+self.depl[key]) 137 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 138 | return 139 | class UVbyler(abundSet): 140 | solar = 'GASS10' 141 | def __init__(self, logZ, dust=True, re_z=False): 142 | ''' 143 | Abundances from Dopita (2013) 144 | Solar Abundances from Grevasse 2010 - z= 0.013 145 | New fit for N/O, C/O relationship 146 | functional form for He(z) 147 | new depletion factors 148 | ISM grains 149 | ''' 150 | if dust: 151 | self.grains = 'no grains\ngrains ISM' 152 | else: 153 | self.grains = 'no grains' 154 | self.re_z=re_z 155 | abundSet.__init__(self, 'UVbyler', logZ) 156 | 157 | def calcSpecial(self): 158 | def calc_He(logZ): 159 | return np.log10(0.0737 + (0.024*(10.0**logZ))) 160 | def calc_CNO(logZ): 161 | O = self.abund_0['O'] + logZ 162 | logOH = O + 12.0 163 | logCO = -0.8 + 0.14*(logOH - 8.0) + (0.192*np.log(1. + np.exp((logOH - 8.0)/0.2))) 164 | logNO = -1.5 + (0.1*np.log(1. + np.exp((logOH - 8.3)/0.1))) 165 | #C = np.log10((10.**O)*(10.**-0.789 + 10.**(4.105 + 1.263*O))) 166 | #N = np.log10((10.**O)*(10.**-1.579 + 10.**(3.579 + 1.526*O))) 167 | C = logCO + O 168 | N = logNO + O 169 | return C, N, O 170 | self.__setattr__('He', calc_He(self.logZ)) 171 | C, N, O = calc_CNO(self.logZ) 172 | [self.__setattr__(key, val + self.depl[key]) 173 | for key, val in zip(['C', 'N', 'O'], [C, N, O])] 174 | return 175 | def calcFinal(self): 176 | [self.__setattr__(key, val+self.logZ+self.depl[key]) 177 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 178 | return 179 | 180 | class LIMS(abundSet): 181 | solar = 'GASS10' 182 | def __init__(self, logZ, dust=True, re_z=False): 183 | ''' 184 | Solar UVByler abundances modified: 185 | Enhance alpha abundances +0.2 dex (O, Ne, Mg, Si, S, Ar, Ca) 186 | Zhu+2010, Conroy+2014, Choi+2014 187 | Enhance C, N following PNe abundances (logNO ~ -0.5, logCO ~ 0) 188 | Henry+2018, but also Karakas 2010, Maciel 2017 189 | ''' 190 | if dust: 191 | self.grains = 'no grains\ngrains ISM' 192 | else: 193 | self.grains = 'no grains' 194 | self.re_z=re_z 195 | abundSet.__init__(self, 'LIMS', logZ) 196 | 197 | def calcSpecial(self): 198 | def calc_He(logZ): 199 | return np.log10(0.0737 + (0.024*(10.0**logZ))) 200 | self.__setattr__('He', calc_He(self.logZ)) 201 | return 202 | def calcFinal(self): 203 | [self.__setattr__(key, val+self.logZ+self.depl[key]) 204 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 205 | return 206 | 207 | class IIZw(abundSet): 208 | solar = 'GASS10' 209 | def __init__(self, logZ, dust=True, re_z=False): 210 | ''' 211 | Abundances from Dopita (2013) 212 | Solar Abundances from Grevasse 2010 - z= 0.013 213 | New fit for N/O, C/O relationship 214 | functional form for He(z) 215 | new depletion factors 216 | ISM grains 217 | log O/H + 12. = 8.09 218 | ''' 219 | if dust: 220 | self.grains = 'no grains\ngrains ISM' 221 | else: 222 | self.grains = 'no grains' 223 | self.re_z=re_z 224 | abundSet.__init__(self, 'UVbyler', logZ) 225 | 226 | def calcSpecial(self): 227 | def calc_He(logZ): 228 | return np.log10(0.0737 + (0.024*(10.0**-0.6))) 229 | def calc_CNO(logZ): 230 | #O = self.abund_0['O'] + logZ 231 | #logOH = O + 12.0 232 | O = self.abund_0['O'] + -0.6 233 | logOH = 8.09 234 | # 235 | logCO = -0.8 + 0.14*(logOH - 8.0) +\ 236 | (0.192*np.log(1.+np.exp((logOH - 8.0)/0.2))) 237 | logNO = -1.5 + (0.1*np.log(1. + np.exp((logOH - 8.3)/0.1))) 238 | C = logCO + O + logZ 239 | N = logNO + O 240 | return C, N, O 241 | self.__setattr__('He', calc_He(self.logZ)) 242 | C, N, O = calc_CNO(self.logZ) 243 | [self.__setattr__(key, val) 244 | for key, val in zip(['C', 'O'], [C, O])] 245 | self.N = N + self.depl['N'] 246 | return 247 | def calcFinal(self): 248 | [self.__setattr__(key, val+self.depl[key]) 249 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 250 | return 251 | 252 | 253 | class varyCO(abundSet): 254 | solar = 'GASS10' 255 | def __init__(self, logZ, dust=True, re_z=0.0): 256 | ''' 257 | arbitrarily vary C/O at fixed O. 258 | ''' 259 | if dust: 260 | self.grains = 'no grains\ngrains ISM' 261 | else: 262 | self.grains = 'no grains' 263 | self.re_z=re_z 264 | abundSet.__init__(self, 'UVbyler', logZ) 265 | 266 | def calcSpecial(self): 267 | def calc_He(logZ): 268 | return np.log10(0.0737 + (0.024*(10.0**logZ))) 269 | def calc_CNO(logZ): 270 | O = self.abund_0['O'] + logZ 271 | logOH = O + 12.0 272 | logCO = -0.8 + 0.14*(logOH - 8.0) + (0.192*np.log(1. + np.exp((logOH - 8.0)/0.2))) 273 | logNO = -1.5 + (0.1*np.log(1. + np.exp((logOH - 8.3)/0.1))) 274 | #C = np.log10((10.**O)*(10.**-0.789 + 10.**(4.105 + 1.263*O))) 275 | #N = np.log10((10.**O)*(10.**-1.579 + 10.**(3.579 + 1.526*O))) 276 | C = logCO + O 277 | N = logNO + O 278 | return C, N, O 279 | self.__setattr__('He', calc_He(self.logZ)) 280 | C, N, O = calc_CNO(self.logZ) 281 | self.__setattr__('C', C + self.depl['C'] + self.re_z) 282 | self.__setattr__('N', N + self.depl['N']) 283 | self.__setattr__('O', O + self.depl['O']) 284 | return 285 | def calcFinal(self): 286 | [self.__setattr__(key, val + self.re_z + self.depl[key]) 287 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 288 | return 289 | 290 | class gutkin(abundSet): 291 | solar = 'GASS10' 292 | def __init__(self, logZ, dust=True, re_z=False): 293 | ''' 294 | Gutkin+2016 295 | PARSEC metallicity (Bressan+2012) 296 | based on Grevesse+Sauvel (1998) and Caffau+2011 297 | ''' 298 | if dust: 299 | self.grains = 'no grains\ngrains ISM' 300 | else: 301 | self.grains = 'no grains' 302 | self.re_z=re_z 303 | abundSet.__init__(self, 'gutkin', logZ) 304 | 305 | def calcSpecial(self): 306 | def calc_He(logZ): 307 | Z = (10.**logZ)*0.01524 308 | Y = 0.2485 + 1.7756*Z 309 | X = 1. - Y - Z 310 | return np.log10(Y/X/4.) 311 | def calc_CNO(logZ): 312 | O = self.abund_0['O'] + logZ 313 | N = np.log10((0.41 * 10.**O)*(10.**-1.6 + 10.**(2.33 + O))) 314 | C = self.abund_0['C'] + logZ 315 | return C, N, O 316 | self.__setattr__('He', calc_He(self.logZ)) 317 | C, N, O = calc_CNO(self.logZ) 318 | [self.__setattr__(key, val) 319 | for key, val in zip(['C', 'N', 'O'], [C, N, O])] 320 | return 321 | def calcFinal(self): 322 | [self.__setattr__(key, val) 323 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 324 | return 325 | 326 | class varyNO(abundSet): 327 | solar = 'GASS10' 328 | def __init__(self, logZ, dust=True, re_z=False): 329 | ''' 330 | varying N at fixed O. 331 | ''' 332 | if dust: 333 | self.grains = 'no grains\ngrains ISM' 334 | else: 335 | self.grains = 'no grains' 336 | self.re_z=re_z 337 | abundSet.__init__(self, 'dopita', logZ) 338 | 339 | def calcSpecial(self): 340 | def calc_He(logZ): 341 | return -1.01 342 | def calc_CNO(logZ): 343 | oxy = np.array([7.39, 7.50, 7.69, 7.99, 8.17, 344 | 8.39, 8.69, 8.80, 8.99, 9.17, 9.39]) 345 | nit = np.array([-6.61, -6.47, -6.23, -5.79, -5.51, 346 | -5.14, -4.60, -4.40, -4.04, -3.67, -3.17]) 347 | car = np.array([-5.58, -5.44, -5.20, -4.76, -4.48, 348 | -4.11, -3.57, -3.37, -3.01, -2.64, -2.14]) 349 | O = self.abund_0['O'] 350 | C = float(InterpUS(oxy, car, k=1)(O + 12.0)) 351 | N = float(InterpUS(oxy, nit, k=1)(O + logZ + 12.0)) 352 | return C, N, O 353 | self.__setattr__('He', calc_He(self.logZ)) 354 | C, N, O = calc_CNO(self.logZ) 355 | [self.__setattr__(key, val) 356 | for key, val in zip(['C', 'N', 'O'], [C, N, O])] 357 | return 358 | def calcFinal(self): 359 | [self.__setattr__(key, val) 360 | for key, val in list(self.abund_0.items()) if not hasattr(self, key)] 361 | return 362 | 363 | 364 | 365 | def load_abund(set_name): 366 | if set_name == 'dopita': 367 | adict = dict(He=-1.01, 368 | C=-3.44, 369 | N=-3.95, 370 | O=-3.07, 371 | Ne=-3.91, 372 | Mg=-4.42, 373 | Si=-4.45, 374 | S=-4.79, 375 | Ar=-5.44, 376 | Ca=-5.64, 377 | Fe=-4.33, 378 | F=-7.52, 379 | Na=-5.69, 380 | Al=-5.53, 381 | P=-6.43, 382 | Cl=-6.73, 383 | K=-6.87, 384 | Ti=-6.96, 385 | Cr=-6.32, 386 | Mn=-6.47, 387 | Co=-7.08, 388 | Ni=-5.75, 389 | Cu=-7.73, 390 | Zn=-7.34) 391 | elif set_name == 'newdopita': 392 | adict = dict(He=-1.01, 393 | C=-3.57, 394 | N=-4.60, 395 | O=-3.31, 396 | Ne=-4.07, 397 | Na=-5.75, 398 | Mg=-4.40, 399 | Al=-5.55, 400 | Si=-4.49, 401 | S=-4.86, 402 | Cl=-6.63, 403 | Ar=-5.60, 404 | Ca=-5.66, 405 | Fe=-4.50, 406 | Ni=-5.78, 407 | F=-7.44, 408 | P=-6.59, 409 | K=-6.97, 410 | Cr=-6.36, 411 | Ti=-7.05, 412 | Mn=-6.57, 413 | Co=-7.01, 414 | Cu=-7.81, 415 | Zn=-7.44) 416 | elif set_name == 'UVbyler': 417 | adict = dict(He=-1.01, 418 | C=-3.57, 419 | N=-4.17, 420 | O=-3.31, 421 | Ne=-4.07, 422 | Na=-5.75, 423 | Mg=-4.40, 424 | Al=-5.55, 425 | Si=-4.49, 426 | S=-4.86, 427 | Cl=-6.63, 428 | Ar=-5.60, 429 | Ca=-5.66, 430 | Fe=-4.50, 431 | Ni=-5.78, 432 | F=-7.44, 433 | P=-6.59, 434 | K=-6.97, 435 | Cr=-6.36, 436 | Ti=-7.05, 437 | Mn=-6.57, 438 | Co=-7.01, 439 | Cu=-7.81, 440 | Zn=-7.44) 441 | elif set_name == 'LIMS': 442 | adict = dict(He=-1.01, 443 | C=-3.11, 444 | N=-3.61, 445 | O=-3.11, 446 | Ne=-3.87, 447 | Na=-5.75, 448 | Mg=-4.20, 449 | Al=-5.55, 450 | Si=-4.29, 451 | S=-4.66, 452 | Cl=-6.63, 453 | Ar=-5.40, 454 | Ca=-5.46, 455 | Fe=-4.50, 456 | Ni=-5.78, 457 | F=-7.44, 458 | P=-6.59, 459 | K=-6.97, 460 | Cr=-6.36, 461 | Ti=-7.05, 462 | Mn=-6.57, 463 | Co=-7.01, 464 | Cu=-7.81, 465 | Zn=-7.44) 466 | elif set_name == 'gutkin': 467 | adict = dict(He=-1.01, 468 | C=-3.53, 469 | N=-4.32, 470 | O=-3.17, 471 | F=-7.47, 472 | Ne=-4.01, 473 | Na=-5.70, 474 | Mg=-4.45, 475 | Al=-5.56, 476 | Si=-4.48, 477 | P=-6.57, 478 | S=-4.87, 479 | Cl=-6.53, 480 | Ar=-5.63, 481 | K=-6.92, 482 | Ca=-5.67, 483 | Sc=-8.86, 484 | Ti=-7.01, 485 | V=-8.03, 486 | Cr=-6.36, 487 | Mn=-6.64, 488 | Fe=-4.51, 489 | Co=-7.11, 490 | Ni=-5.78, 491 | Cu=-7.82, 492 | Zn=-7.43) 493 | return adict 494 | 495 | def load_depl(set_name): 496 | if set_name == 'dopita': 497 | ddict = dict(C=-0.30, 498 | N=-0.22, 499 | O=-0.22, 500 | Ne=0.0, 501 | Mg=-0.70, 502 | Si=-1.0, 503 | S=0.0, 504 | Ar=0.0, 505 | Ca=-2.52, 506 | Fe=-2.0, 507 | F=0.0, 508 | Na=0.0, 509 | Al=0.0, 510 | P=0.0, 511 | Cl=0.0, 512 | K=0.0, 513 | Ti=0.0, 514 | Cr=0.0, 515 | Mn=0.0, 516 | Co=0.0, 517 | Ni=0.0, 518 | Cu=0.0, 519 | Zn=0.0) 520 | elif set_name == 'newdopita': 521 | ddict = dict(He=0.00, 522 | C=-0.30, 523 | N=-0.05, 524 | O=-0.07, 525 | Ne=0.00, 526 | Na=-1.00, 527 | Mg=-1.08, 528 | Al=-1.39, 529 | Si=-0.81, 530 | S=0.00, 531 | Cl=-1.00, 532 | Ar=0.00, 533 | Ca=-2.52, 534 | Fe=-1.31, 535 | Ni=-2.00, 536 | F=0.0, 537 | P=0.0, 538 | K=0.0, 539 | Cr=0.0, 540 | Ti=0.0, 541 | Mn=0.0, 542 | Co=0.0, 543 | Cu=0.0, 544 | Zn=0.0) 545 | elif set_name == 'UVbyler': 546 | ddict = dict(He=0.00, 547 | C=-0.30, 548 | N=-0.05, 549 | O=-0.07, 550 | Ne=0.00, 551 | Na=-1.00, 552 | Mg=-1.08, 553 | Al=-1.39, 554 | Si=-0.81, 555 | S=0.00, 556 | Cl=-1.00, 557 | Ar=0.00, 558 | Ca=-2.52, 559 | Fe=-1.31, 560 | Ni=-2.00, 561 | F=0.0, 562 | P=0.0, 563 | K=0.0, 564 | Cr=0.0, 565 | Ti=0.0, 566 | Mn=0.0, 567 | Co=0.0, 568 | Cu=0.0, 569 | Zn=0.0) 570 | elif set_name == 'LIMS': 571 | ddict = dict(He=0.00, 572 | C=-0.30, 573 | N=-0.05, 574 | O=-0.07, 575 | Ne=0.00, 576 | Na=-1.00, 577 | Mg=-1.08, 578 | Al=-1.39, 579 | Si=-0.81, 580 | S=0.00, 581 | Cl=-1.00, 582 | Ar=0.00, 583 | Ca=-2.52, 584 | Fe=-1.31, 585 | Ni=-2.00, 586 | F=0.0, 587 | P=0.0, 588 | K=0.0, 589 | Cr=0.0, 590 | Ti=0.0, 591 | Mn=0.0, 592 | Co=0.0, 593 | Cu=0.0, 594 | Zn=0.0) 595 | elif set_name == 'gutkin': 596 | ddict = dict(He=0.00, 597 | Li=-0.8, 598 | C=-0.30, 599 | O=-0.15, 600 | Na=-0.60, 601 | Mg=-0.70, 602 | Al=-1.70, 603 | Si=-1.00, 604 | Cl=-0.30, 605 | Ca=-2.52, 606 | Fe=-2.00, 607 | Ni=-1.40) 608 | return ddict 609 | -------------------------------------------------------------------------------- /cloudyfsps/outputFormatting.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import print_function 5 | from __future__ import unicode_literals 6 | from __future__ import division 7 | from __future__ import absolute_import 8 | from builtins import object 9 | 10 | import numpy as np 11 | import pkg_resources 12 | import fsps 13 | import os 14 | import linecache 15 | #grid: 2 files: line, cont 16 | #columns: wavelengths 17 | #rows: models 18 | #header 19 | #wavelength grid 20 | #age, Z, logU 21 | #flux1 22 | #flux2 23 | #flux3 24 | 25 | ### 26 | # reads from ZAU***.out_lines, ZAU***.out_cont 27 | # produces ZAU_**.lines, ZAU_**.cont 28 | ### 29 | class writeFormattedOutput(object): 30 | #sp = fsps.StellarPopulation() 31 | #fsps_lam = sp.wavelengths 32 | def __init__(self, dir_, mod_prefix, mod_suffix, 33 | use_extended_lines=False, more_info=False,**kwargs): 34 | ''' 35 | writeFormattedOutput(mod_dir, 'ZAU', 'BPASS') 36 | ''' 37 | self.dir_, self.mod_prefix = dir_, mod_prefix 38 | self.file_pr = dir_ + mod_prefix 39 | if mod_suffix is None: 40 | self.out_pr = dir_ + mod_prefix 41 | else: 42 | self.out_pr = dir_ + mod_prefix + mod_suffix 43 | # each model's final info will be in prefix00.lines, prefix00.cont 44 | self.line_out = self.out_pr + ".lines" 45 | self.cont_out = self.out_pr + ".cont" 46 | # load each model's parameters from prefix.pars 47 | self.loadModInfo() 48 | # print ordered emission line wavelengths + fluxes 49 | self.doLineOut(use_extended_lines=use_extended_lines, 50 | more_info=more_info) 51 | # interp and print neb cont onto FSPS wavelenth arr 52 | self.doContOut() 53 | return 54 | def loadModInfo(self, **kwargs): 55 | ''' 56 | reads model parameters from "ZAU.pars" 57 | ''' 58 | name_keys = ["mod_num", "logZ", "Age", "logU", "logR", "logQ", "nH", "efrac"] 59 | data = np.genfromtxt(self.file_pr+".pars", unpack=True) 60 | ddata = {} 61 | for i,key in enumerate(name_keys): 62 | ddata[key] = data[i] 63 | self.__setattr__(key, data[i]) 64 | self.__setattr__("modpars", ddata) 65 | self.NZ = len(np.unique(self.logZ)) 66 | self.NA = len(np.unique(self.Age)) 67 | self.NU = len(np.unique(self.logU)) 68 | return 69 | def doLineOut(self, more_info=False, **kwargs): 70 | ''' 71 | prints line fluxes to prefix00.lines file 72 | ''' 73 | f = open(self.line_out, "w") 74 | self.printLineLam(f, **kwargs) 75 | for n in self.mod_num: 76 | self.printLineFlu(f, n.astype(int), more_info=more_info) 77 | f.close() 78 | print("lines: {0:.0f} models to file {1}".format(self.mod_num[-1], self.line_out)) 79 | return 80 | def printLineLam(self, f, use_extended_lines=False): 81 | ''' 82 | prints the wavelength array for the emission lines as the second 83 | line in the output file. converts all wavelengths to vacuum. 84 | ''' 85 | #read in file containing wavelength info 86 | if use_extended_lines: 87 | linefile = pkg_resources.resource_filename(__name__, "data/orderedLinesEXT.dat") 88 | else: 89 | linefile = pkg_resources.resource_filename(__name__, "data/orderedLines.dat") 90 | data_vac = np.genfromtxt(linefile) 91 | #data_vac = air_to_vac(data) # new file is already in vac 92 | nlines = len(data_vac) 93 | nmods = np.max(self.mod_num) 94 | #print header to file 95 | head_str = "#{0} cols {1:.0f} rows {2} logZ {3} Age {4} logU".format(nlines, nmods, self.NZ, self.NA, self.NU) 96 | f.write(head_str+"\n") 97 | #print lambda array 98 | p_str = " ".join(["{0:1.6e}".format(dat) for dat in data_vac]) 99 | f.write(p_str+"\n") 100 | return 101 | def printLineFlu(self, f, n, more_info=False): 102 | #write model parameters 103 | if more_info: 104 | tstr = linecache.getline(self.file_pr+'.pars', n) 105 | else: 106 | tstr = "{0:2.4e} {1:2.4e} {2:2.4e}\n".format(self.logZ[n-1], self.Age[n-1], self.logU[n-1]) 107 | f.write(tstr) 108 | #read in and print emission line intensities (Lsun/Q) 109 | nst = "{0}".format(n) 110 | filename = self.file_pr+nst+".out_lines" 111 | lam, flu = np.genfromtxt(filename, unpack=True) 112 | I_str = ["{0:1.4e}".format(s) for s in flu] 113 | tstr = " ".join(I_str) 114 | f.write(tstr+"\n") 115 | return 116 | def doContOut(self, **kwargs): 117 | f = open(self.cont_out, "w") 118 | self.printContLam(f) 119 | for num in self.modpars['mod_num']: 120 | iind = num.astype(int) 121 | pars = dict(logZ=self.logZ[iind-1], 122 | Age=self.Age[iind-1], 123 | nH=self.nH[iind-1], 124 | logQ=self.logQ[iind-1], 125 | logU=self.logU[iind-1], 126 | logR=self.logR[iind-1], 127 | mod_num=iind, 128 | efrac=self.efrac[iind-1]) 129 | self.printContFlu(f, pars) 130 | f.close() 131 | print("cont: {0:.0f} models to file {1}".format(self.modpars['mod_num'][-1], self.cont_out)) 132 | return 133 | def printContFlu(self, f, pars): 134 | #write model parameters 135 | tstr = "{0:2.4e} {1:2.4e} {2:2.4e}".format(pars["logZ"], 136 | pars["Age"], 137 | pars["logU"]) 138 | f.write(tstr+"\n") 139 | #read in and print emission line intensities 140 | nst = "{0}".format(pars["mod_num"]) 141 | filename = self.file_pr+nst+".out_cont" 142 | # read lambda, diffuse cont 143 | mdata = np.genfromtxt(filename) 144 | lam = mdata[:,0] 145 | flu = mdata[:,1] 146 | y_str = " ".join(["{0:1.4}".format(y) for y in flu]) 147 | f.write(y_str+"\n") 148 | return 149 | def printContLam(self, f): 150 | ''' 151 | prints header in first line of file, and the FSPS wavelength array 152 | (for the nebular continuum) as the second line in the output file. 153 | # nlam cols nmod rows logZ Age logU 154 | # fsps_lam_1 fsps_lam_2 .... fsps_lam_n 155 | ''' 156 | #grab fsps wavelength info 157 | lamfile = pkg_resources.resource_filename(__name__, "data/FSPSlam.dat") 158 | fsps_lam = np.genfromtxt(lamfile) 159 | self.__setattr__("fsps_lam", fsps_lam) 160 | nlam = len(fsps_lam) 161 | nmods = np.max(self.mod_num).astype(int) 162 | #print header to file 163 | head_str = "#{0} cols {1} rows {2} logZ {3} Age {4} logU".format(nlam, nmods, self.NZ, self.NA, self.NU) 164 | f.write(head_str+"\n") 165 | #print lambda array 166 | p_str = " ".join(["{0:1.6e}".format(lam) for lam in fsps_lam]) 167 | f.write(p_str+"\n") 168 | return 169 | 170 | 171 | 172 | #------------------------------------------------ 173 | def zmet_to_nuZ(zmet): 174 | ''' 175 | zmet = 1,2,3,4,5,6,7,8 176 | ...corresponding to... 177 | m1.00, m1.02, m1.04, m1.06, p0.00, p0.02, p0.04, p0.06 178 | ''' 179 | zmets = np.array([1,2,3,4,5,6,7,8]) 180 | zs = np.array([-1.00, -1.02, -1.04, -1.06, 0.00, 0.02, 0.04, 0.06]) 181 | if type(zmet) is float: 182 | ii, = np.where(zmets == zmet)[0] 183 | out_val = zs[ii] 184 | else: 185 | out_val = np.zeros_like(zmet, dtype='float') 186 | for i in range(len(zmet)): 187 | ii, = np.where(zmets == zmet[i])[0] 188 | out_val[i] = zs[ii] 189 | return out_val 190 | 191 | class writeAltFormattedOutput(object): 192 | #sp = fsps.StellarPopulation() 193 | #fsps_lam = sp.wavelengths 194 | def __init__(self, dir_, mod_prefix, mod_suffix, 195 | use_extended_lines=False, more_info=False,**kwargs): 196 | ''' 197 | writeFormattedOutput(mod_dir, 'ZAU', 'BPASS') 198 | ''' 199 | self.dir_, self.mod_prefix = dir_, mod_prefix 200 | self.file_pr = dir_ + mod_prefix 201 | if mod_suffix is None: 202 | self.out_pr = dir_ + mod_prefix 203 | else: 204 | self.out_pr = dir_ + mod_prefix + mod_suffix 205 | # each model's final info will be in prefix00.lines, prefix00.cont 206 | self.line_out = self.out_pr + ".lines" 207 | self.cont_out = self.out_pr + ".cont" 208 | self.loadModInfo() # load each model's parameters from prefix.pars 209 | # print ordered emission line wavelengths + fluxes 210 | self.doLineOut(use_extended_lines=use_extended_lines, 211 | more_info=more_info) 212 | self.doContOut() # interp and print neb cont onto FSPS wavelenth arr 213 | return 214 | def loadModInfo(self, **kwargs): 215 | ''' 216 | reads model parameters from "ZAU.pars" 217 | ''' 218 | name_keys = ["mod_num", "logZ", "Age", "logU", "logR", "logQ", "nH", "efrac", "zmet"] 219 | data = np.genfromtxt(self.file_pr+".pars", unpack=True) 220 | ddata = {} 221 | for i,key in enumerate(name_keys): 222 | if key == 'zmet': 223 | temp_arr = zmet_to_nuZ(data[i]) 224 | ddata[key] = temp_arr 225 | self.__setattr__(key, temp_arr) 226 | else: 227 | ddata[key] = data[i] 228 | self.__setattr__(key, data[i]) 229 | self.__setattr__("modpars", ddata) 230 | self.NZ = len(np.unique(self.zmet)) 231 | self.NA = len(np.unique(self.Age)) 232 | self.NU = len(np.unique(self.logU)) 233 | return 234 | def doLineOut(self, more_info=False, **kwargs): 235 | ''' 236 | prints line fluxes to prefix00.lines file 237 | ''' 238 | f = open(self.line_out, "w") 239 | self.printLineLam(f, **kwargs) 240 | for n in self.mod_num: 241 | self.printLineFlu(f, n.astype(int), more_info=more_info) 242 | f.close() 243 | print("lines: {0:.0f} models to file {1}".format(self.mod_num[-1], self.line_out)) 244 | return 245 | def printLineLam(self, f, use_extended_lines=False): 246 | ''' 247 | prints the wavelength array for the emission lines as the second 248 | line in the output file. converts all wavelengths to vacuum. 249 | ''' 250 | #read in file containing wavelength info 251 | if use_extended_lines: 252 | linefile = pkg_resources.resource_filename(__name__, "data/orderedLinesEXT.dat") 253 | else: 254 | linefile = pkg_resources.resource_filename(__name__, "data/orderedLines.dat") 255 | data_vac = np.genfromtxt(linefile) 256 | #data_vac = air_to_vac(data) # new file is already in vac 257 | nlines = len(data_vac) 258 | nmods = np.max(self.mod_num) 259 | #print header to file 260 | head_str = "#{0} cols {1:.0f} rows {2} logZ {3} Age {4} logU".format(nlines, nmods, self.NZ, self.NA, self.NU) 261 | f.write(head_str+"\n") 262 | #print lambda array 263 | p_str = " ".join(["{0:1.6e}".format(dat) for dat in data_vac]) 264 | f.write(p_str+"\n") 265 | return 266 | def printLineFlu(self, f, n, more_info=False): 267 | #write model parameters 268 | if more_info: 269 | tstr = linecache.getline(self.file_pr+'.pars', n) 270 | f.write(tstr) 271 | else: 272 | tstr = "{0:2.4e} {1:2.4e} {2:2.4e}".format(self.zmet[n-1], self.Age[n-1], self.logU[n-1]) 273 | f.write(tstr+"\n") 274 | #read in and print emission line intensities (Lsun/Q) 275 | nst = "{0}".format(n) 276 | filename = self.file_pr+nst+".out_lines" 277 | lam, flu = np.genfromtxt(filename, unpack=True) 278 | I_str = ["{0:1.4e}".format(s) for s in flu] 279 | tstr = " ".join(I_str) 280 | f.write(tstr+"\n") 281 | return 282 | def doContOut(self, **kwargs): 283 | f = open(self.cont_out, "w") 284 | self.printContLam(f) 285 | for num in self.modpars['mod_num']: 286 | iind = num.astype(int) 287 | pars = dict(logZ=self.logZ[iind-1], 288 | Age=self.Age[iind-1], 289 | nH=self.nH[iind-1], 290 | logQ=self.logQ[iind-1], 291 | logU=self.logU[iind-1], 292 | logR=self.logR[iind-1], 293 | mod_num=iind, 294 | zmet=self.zmet[iind-1]) 295 | self.printContFlu(f, pars) 296 | f.close() 297 | print("cont: {0:.0f} models to file {1}".format(self.modpars['mod_num'][-1], self.cont_out)) 298 | return 299 | def printContFlu(self, f, pars): 300 | #write model parameters 301 | tstr = "{0:2.4e} {1:2.4e} {2:2.4e}".format(pars["zmet"], 302 | pars["Age"], 303 | pars["logU"]) 304 | f.write(tstr+"\n") 305 | #read in and print emission line intensities 306 | nst = "{0}".format(pars["mod_num"]) 307 | filename = self.file_pr+nst+".out_cont" 308 | # read lambda, diffuse cont 309 | mdata = np.genfromtxt(filename) 310 | lam = mdata[:,0] 311 | flu = mdata[:,1] 312 | y_str = " ".join(["{0:1.4}".format(y) for y in flu]) 313 | f.write(y_str+"\n") 314 | return 315 | def printContLam(self, f): 316 | ''' 317 | prints header in first line of file, and the FSPS wavelength array 318 | (for the nebular continuum) as the second line in the output file. 319 | # nlam cols nmod rows logZ Age logU 320 | # fsps_lam_1 fsps_lam_2 .... fsps_lam_n 321 | ''' 322 | #grab fsps wavelength info 323 | lamfile = pkg_resources.resource_filename(__name__, "data/FSPSlam.dat") 324 | fsps_lam = np.genfromtxt(lamfile) 325 | self.__setattr__("fsps_lam", fsps_lam) 326 | nlam = len(fsps_lam) 327 | nmods = np.max(self.mod_num).astype(int) 328 | #print header to file 329 | head_str = "#{0} cols {1} rows {2} logZ {3} Age {4} logU".format(nlam, nmods, self.NZ, self.NA, self.NU) 330 | f.write(head_str+"\n") 331 | #print lambda array 332 | p_str = " ".join(["{0:1.6e}".format(lam) for lam in fsps_lam]) 333 | f.write(p_str+"\n") 334 | return 335 | -------------------------------------------------------------------------------- /cloudyfsps/plotting/__init__.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | import matplotlib as mpl 4 | from matplotlib import cm as cmx 5 | 6 | mpl.rc('xtick', labelsize=12) 7 | mpl.rc('ytick', labelsize=12) 8 | mpl.rc('font', size=16, family='serif', serif=[r'cmr10'], style='normal', variant='normal', stretch='normal', weight='heavy') 9 | mpl.rc('legend', labelspacing=0.1, handlelength=2, fontsize=16) 10 | mpl.rcParams['axes.unicode_minus'] = False 11 | 12 | mpl.colors.colorConverter.colors['black'] = (0.145, 0.145, 0.145) 13 | mpl.colors.colorConverter.colors['k'] = (0.145, 0.145, 0.145) 14 | mpl.colors.colorConverter.colors['blue'] = (0.031, 0.271, 0.580) 15 | mpl.colors.colorConverter.colors['b'] = (0.031, 0.271, 0.580) 16 | mpl.colors.colorConverter.colors['red'] = (0.647, 0.059, 0.082) 17 | mpl.colors.colorConverter.colors['r'] = (0.647, 0.059, 0.082) 18 | mpl.colors.colorConverter.colors['green'] = (0.0, 0.427, 0.173) 19 | mpl.colors.colorConverter.colors['g'] = (0.0, 0.427, 0.173) 20 | mpl.colors.colorConverter.cache = {} 21 | -------------------------------------------------------------------------------- /cloudyfsps/readme.dat: -------------------------------------------------------------------------------- 1 | # cloudy_input.py writes 2 | # MOD_PREFIX_00.in 3 | # Cloudy writes 4 | # MOD_PREFIX_00.out 5 | # MOD_PREFIX_00.lin 6 | # MOD_PREFIX_00.inicont 7 | # MOD_PREFIX_00.outwcont 8 | # mk_linefile.sh writes 9 | # MOD_PREFIX_00.lineflux 10 | # write_output.py writes 11 | # MOD_PREFIX_00.out_cont 12 | # MOD_PREFIX_00.out_lines 13 | # MOD_PREFIX.cont 14 | # MOD_PREFIX.lines -------------------------------------------------------------------------------- /demos/demo_plots.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import unicode_literals 5 | from builtins import zip 6 | from __future__ import (division, print_function, absolute_import, 7 | unicode_literals) 8 | 9 | from cloudyfsps import outObj as ob 10 | from cloudyfsps.astrodata import dopita 11 | 12 | # this code assumes you have run "csfh.py" 13 | # to produce a grid of cloudy models and now 14 | # want to look at the data 15 | 16 | dir_ = './output_csfh/' 17 | mod_prefix='ZAU' 18 | # Read in output 19 | csf = ob.allmods(dir_, mod_prefix) #read_out=True for dust 20 | # this is a python object with lots of model info. 21 | # Line strengths, gas properties and ionizing properties, etc. 22 | 23 | #Plot general BPT diagram 24 | ages = [0.5e6, 1.0e6, 2.0e6, 4.0e6, 6.0e6] 25 | cols = ['#7fcdbb','#41b6c4','#1d91c0','#225ea8','#0c2c84'] 26 | 27 | fig = plt.figure() 28 | ax = fig.add_subplot(111) 29 | for age, col in zip(ages, cols): 30 | pd=False 31 | var_label=False 32 | if age == 1.0e6: #only plot the observed data once 33 | pd=True 34 | if age == 2.0e6: #only plot the labels once 35 | var_label=True 36 | csf.makeBPT(ax=ax, val1=age, color=col, line_ratio='NIIb', 37 | par_label='{0:.1f} Myr'.format(age*1.0e-6), 38 | plot_data=pd, var_label=var_label) 39 | plt.title('CSFH Models') 40 | fig.savefig('CSFH_BPT.png') 41 | 42 | #Plot comparison with Dopita data 43 | age = 4.0e6 44 | col = '#08519c' 45 | dcol = '#a50f15' 46 | pd=True 47 | var_label=True 48 | fig = plt.figure() 49 | ax = fig.add_subplot(111) 50 | dopita.plot_bpt(line_ratio='NIIb', color=dcol, tcolor=dcol, kappa_val=np.inf) 51 | csf.makeBPT(ax=ax, val1=age, color=col, line_ratio='NIIb', 52 | par_label='{0:.1f} Myr CSFH'.format(age*1.0e-6), 53 | plot_data=pd, var_label=var_label) 54 | 55 | -------------------------------------------------------------------------------- /demos/exampleCloudyGrid.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import print_function 5 | from __future__ import unicode_literals 6 | from builtins import range 7 | from __future__ import (division, print_function, absolute_import, unicode_literals) 8 | 9 | import sys 10 | import numpy as np 11 | import fsps 12 | import itertools 13 | from cloudyfsps.ASCIItools import compiledExists 14 | from cloudyfsps.cloudyInputTools import writeParamFiles 15 | from cloudyfsps.generalTools import calcForLogQ 16 | from cloudyfsps.cloudyOutputTools import formatAllOutput 17 | from cloudyfsps.outputFormatting import writeFormattedOutput 18 | 19 | # This code snippet goes through how to create a grid 20 | # of Cloudy models. 21 | 22 | # It assumes that you have generated 'FSPS_MIST_SSP.ascii' 23 | # using generateCloudyBinaryFile.py, which assumes SSPs 24 | # as the input ionizing source. 25 | 26 | # In this example you will: 27 | 28 | # 1. Write Cloudy input files that vary in 29 | # SSP age, SSP metallicity, and gas metallicity 30 | # 2. Run Cloudy on the *.in files 31 | # 3. Format the various output files into nice units. 32 | 33 | exec_write_input = True # write all of the input files 34 | exec_run_cloudy = False # don't actually run Cloudy yet 35 | exec_write_condor_jobs = False # don't write clustered computing script 36 | exec_format_cloudy_output = False # for making the output in nice units 37 | #--------------------------------------------------------------------- 38 | # ASCII FILE: CHECK THIS EXISTS 39 | #--------------------------------------------------------------------- 40 | # Assumes you have run generateCloudyBinary.py 41 | ascii_file = 'FSPS_MIST_SSP.ascii' 42 | compiled_ascii = '{}.mod'.format(ascii_file.split('.')[0]) 43 | 44 | # alternatively, you could set compiled_ascii as 45 | # a different Cloudy model atmosphere file, e.g. popstar. 46 | 47 | if not compiledExists(ascii_file): 48 | print("No compiled model exists for {}...Error!".format(ascii_file)) 49 | sys.exit() 50 | 51 | #--------------------------------------------------------------------- 52 | # WRITE CLOUDY INPUT 53 | #--------------------------------------------------------------------- 54 | # local folder to read and write *.in, *.out files 55 | mod_dir = './output_mist_ssp/' 56 | mod_prefix = 'ZAU' 57 | 58 | # GRID PARAMETERS FOR CLOUDY RUN 59 | #-------------- 60 | # ages between 1 and 7 Myr 61 | ages = np.linspace(1., 7., 7)*1.e6 62 | # ionization parameters between -4 and -1 63 | logUs = np.linspace(-4., -1., 7) 64 | # stellar metallicities 65 | logZs = np.array([-1.0, -0.5, 0.0]) 66 | # gas phase metallicities 67 | gas_logZs = np.linspace(-2.0, 0.0, 5) 68 | 69 | # Other default parameters based off of Byler+2017 70 | Rinners = np.array([19.]) # inner radius of HII region, 3pc 71 | nhs = np.array([100.0]) # density of gas, cm-3 72 | efrac = -1.0 # calculation is stopped when H is 10^efrac % neutral 73 | set_name='dopita' # abundances from Dopita+2001 74 | dust=False # don't include dust in nebula 75 | extra_output=True # include lots of outputs 76 | #----------------------------------------------------------------- 77 | 78 | # iterate through all of the above parameters 79 | # calcForLogQ just calculates Q = U*4*pi*Ri^2*nH 80 | 81 | pars = np.array([(Z, a, U, R, calcForLogQ(logU=U, Rinner=10.0**R, nh=n), n, efrac, gasZ) 82 | for Z in logZs 83 | for a in ages 84 | for U in logUs 85 | for R in Rinners 86 | for n in nhs 87 | for gasZ in gas_logZs]) 88 | 89 | if exec_write_input: 90 | print('Writing input files...') 91 | writeParamFiles(dir_=mod_dir, 92 | model_prefix=mod_prefix, 93 | cloudy_mod=compiled_ascii, 94 | run_cloudy=False, # don't run yet 95 | ages=ages, 96 | logZs=logZs, 97 | logUs=logUs, 98 | r_inners=Rinners, 99 | nhs=nhs, 100 | use_Q=True, 101 | # if False, will use logU; 102 | # does not matter in this case, 103 | # since Q is calculated at 104 | # each specified logU. 105 | verbose=False, # don't print output to screen 106 | set_name=set_name, 107 | dust=dust, 108 | extra_output=extra_output) 109 | print('Wrote {} param files'.format(len(pars))) 110 | else: 111 | print('Skipping input writing.') 112 | 113 | # otherwise just run the models by hand 114 | # e.g. for /your/mod/dir/ZAU42.in: 115 | # cd $dir && $CLOUDY_EXE -r ZAU42 116 | # Or with cloudyfsps/scripts/runCloudy.sh 117 | # and cloudyfsps/scripts/runCloudy.py for output formatting. 118 | 119 | #======================================================================= 120 | #----------------------------------------------------------------------- 121 | #======================================================================= 122 | # if you don't want to run each model on your laptop, 123 | # Clustered computing option 124 | #----------------------------------------------------------------------- 125 | # print all the jobs you would like to run into cloudy_MIST_jobs.cfg 126 | #----------------------------------------------------------------------- 127 | #set up outfile and essential info 128 | mod_dir='/'.join(mod_dir.split('/')[0:-1]) 129 | outstr = 'MIST' 130 | jobfile = './condor/cloudy_{0}_jobs.cfg'.format(outstr) 131 | jobfolder = './condor/output_{0}'.format(outstr) 132 | 133 | prefix_str = '''Notification = never 134 | getenv = true 135 | 136 | Executable = ~/cloudyfsps/scripts/runCloudy.sh 137 | Initialdir = ./condor 138 | 139 | Universe = vanilla 140 | ''' 141 | #----------------------------------------------------------------------- 142 | if exec_write_condor_jobs: 143 | f = open(jobfile, 'w') 144 | f.write(prefix_str+'\n') 145 | for i in range(len(pars)): 146 | modstr = '''Log = {0}/log{1}.txt 147 | Output = {0}/run{1}.out 148 | Error = {0}/run{1}.err 149 | Arguments = {2} {3} {1} 150 | Queue\n'''.format(jobfolder, i+1, mod_dir, mod_prefix) 151 | f.write(modstr+'\n') 152 | f.close() 153 | print('Added {0} jobs to {1}'.format(len(pars), jobfile.split('/')[-1])) 154 | 155 | 156 | #======================================================================= 157 | #----------------------------------------------------------------------- 158 | #======================================================================= 159 | # if you have run the Cloudy models, format the output 160 | #----------------------------------------------------------------------- 161 | if exec_format_cloudy_output: 162 | formatAllOutput(mod_dir, mod_prefix, write_line_lum=True) 163 | # if write_line_lum = False, the output will be in lum/Q 164 | #----------------------------------------------------------------------- 165 | -------------------------------------------------------------------------------- /demos/fbhb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import print_function 5 | from __future__ import unicode_literals 6 | from builtins import zip 7 | from builtins import range 8 | from __future__ import (division, print_function, absolute_import, 9 | unicode_literals) 10 | 11 | import os 12 | import sys 13 | import numpy as np 14 | import fsps 15 | from cloudyfsps.ASCIItools import (writeASCII, compileASCII, checkCompiled, compiledExists) 16 | from cloudyfsps.cloudyInputTools import (cloudyInput, printParFile) 17 | from cloudyfsps.generalTools import calcForLogQ 18 | #runMake, formatAllOutput, writeFormattedOutput) 19 | 20 | # this code snippet goes through every step needed 21 | # to integrate FSPS into Cloudy. 22 | # This example uses stellar pops with a constant SFH 23 | # as the input ionizing source. 24 | # 1. Write an ascii file in Cloudy format with grid 25 | # of FSPS spectra in all available ages and 26 | # metallicities 27 | # 2. Compile asii file into binary format required 28 | # for Cloudy use. Assumes $CLOUDY_EXE is set to 29 | # your /path/to/cloudy.exe 30 | # 3. Writes Cloudy input files for a subset of grid 31 | # parameters. 32 | # 4. Runs Cloudy on the *.in files 33 | # 5. Formats the various output files 34 | 35 | zsun = 0.019 36 | 37 | exec_write_ascii = True 38 | exec_write_input = True 39 | exec_run_cloudy = False 40 | exec_write_output = False 41 | exec_gen_FSPS_grid = False 42 | make_condor = True 43 | 44 | # Function to write the ascii file. 45 | # This is where you set the properties of the 46 | # ionizing spectrum (SSP/CSFH, IMF, FBHB, etc) 47 | 48 | def fbhb_ascii(fileout, **kwargs): 49 | # change these parameters to modify the ionizing source grid 50 | # default mode is to produce an ascii grid in age and Z, 51 | # though different variables and more dimensions are possible. 52 | fbhb_fracs = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] 53 | sp_dict = dict(zcontinuous=1, 54 | imf_type=2, 55 | sfh=0) 56 | sp = fsps.StellarPopulation(**sp_dict) 57 | # all ages, default solar metallicity 58 | ages = 10.**sp.log_age 59 | modpars = [(age, fb) for age in ages for fb in fbhb_fracs] 60 | lam = sp.wavelengths 61 | all_fluxs = [] 62 | for fb in fbhb_fracs: 63 | sp.params["fbhb"] = fb 64 | all_fluxs.append(sp.get_spectrum()[1]) #lsun per hz 65 | nmod = len(modpars) 66 | # flatten flux for writing 67 | flat_flux = np.array([all_fluxs[j][i] 68 | for i in range(len(ages)) 69 | for j in range(len(fbhb_fracs))]) 70 | # this function is flexible, ndim can be 3/4/n. 71 | writeASCII(fileout, lam, flat_flux, modpars, 72 | nmod=nmod, ndim=2, npar=2, 73 | par1='age', par2='fbhb') 74 | return 75 | #--------------------------------------------------------------------- 76 | # ASCII FILE: WRITE AND COMPILE 77 | #--------------------------------------------------------------------- 78 | # assumes you have $CLOUDY_EXE and $CLOUDY_DATA_PATH set as sys vars. 79 | 80 | # name of ascii file 81 | ascii_file = "FSPS_FBHB.ascii" 82 | 83 | # or if there is an already-compiled one you want to use, specify here 84 | compiled_ascii = "{}.mod".format(ascii_file.split(".")[0]) 85 | 86 | if exec_write_ascii: 87 | print("Executing write ascii sequence...") 88 | if not compiledExists(ascii_file): 89 | print("No compiled model exists...Writing.") 90 | fbhb_ascii(ascii_file) 91 | print("Compiling {} with Cloudy".format(ascii_file)) 92 | compileASCII(ascii_file) 93 | print("Checking to see if compilation was successful...") 94 | if checkCompiled(ascii_file): 95 | print("Your model {} is ready to run.".format(compiled_ascii)) 96 | else: 97 | sys.exit() 98 | else: 99 | print("{} already exists.".format(compiled_ascii)) 100 | 101 | #--------------------------------------------------------------------- 102 | # WRITE CLOUDY INPUT 103 | #--------------------------------------------------------------------- 104 | # local folder to read and write *.in, *.out files 105 | mod_dir = "/astro/users/ebyler/research/newem/output_fbhb/" 106 | mod_prefix = "FAU" 107 | 108 | # GRID PARAMETERS FOR CLOUDY RUN 109 | #-------------- 110 | ages = np.array([3.0e9, 5.0e9, 10.0e9]) 111 | logUs = np.array([-4.0, -3.5, -3.0, -2.5, -2.0, -1.5, -1.0]) 112 | logZs = np.array([0.0]) 113 | # 114 | Rinners = np.array([19.]) 115 | nhs = np.array([100.0]) 116 | fbhb_fracs = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] 117 | #-------------- 118 | pars = np.array([(Z, a, U, R, calcForLogQ(logU=U, Rinner=10.0**R, nh=n), n, -1.0, fb) 119 | for Z in logZs 120 | for a in ages 121 | for U in logUs 122 | for R in Rinners 123 | for n in nhs 124 | for fb in fbhb_fracs]) 125 | 126 | input_dict = {"r_in_pc":False, # the inner radius is in cm 127 | "set_name":"dopita", # abundances from Dopita+2001 128 | "dust":True, # include dust grains in the nebula 129 | "cloudy_mod":compiled_ascii, # ionizing spectrum file 130 | "extras":'save last physical conditions ".phys"', # output 131 | "extra_output":True, # each run will produce lots of files 132 | "to_file":True, # write these parameters to file 133 | "verbose":False, # don't print it to the screen 134 | "par1":"age", # the ascii file parameter #1 135 | "par2":"fbhb" # the ascii file parameter #2 136 | } 137 | 138 | print("{} models".format(len(pars))) 139 | full_model_names = ["{}{}".format(mod_prefix, n+1) 140 | for n in range(len(pars))] 141 | 142 | printParFile(mod_dir, mod_prefix, pars) 143 | 144 | if exec_write_input: 145 | print("Writing input files...") 146 | for par, name in zip(pars, full_model_names): 147 | cloudyInput(mod_dir, name, 148 | logZ=par[0], age=par[1], logU=par[2], r_inner=par[3], 149 | logQ=par[4], dens=par[5], efrac=par[6], par2val=par[7], 150 | **input_dict) 151 | print("Wrote {} param files".format(len(pars))) 152 | else: 153 | print("Skipping input writing.") 154 | #--------------------------------------------------------------------- 155 | # RUN CLOUDY ON ALL INPUT FILES 156 | #--------------------------------------------------------------------- 157 | if exec_run_cloudy: 158 | print("Running Cloudy....") 159 | runMake(dir_=mod_dir, n_proc=4, model_name=mod_prefix) 160 | print("Cloudy finished.") 161 | else: 162 | print("Not running Cloudy. Skipping to formatting output.") 163 | #--------------------------------------------------------------------- 164 | # FORMAT OUTPUT 165 | #--------------------------------------------------------------------- 166 | if exec_write_output: 167 | print("Formatting output files...\n") 168 | formatAllOutput(mod_dir, mod_prefix) 169 | else: 170 | print("\n\nNot formatting output. DONE.") 171 | if exec_gen_FSPS_grid: 172 | print("Creating FSPS input grids...") 173 | writeFormattedOutput(mod_dir, mod_prefix, "_FBHB") 174 | 175 | 176 | 177 | #----------------------------------------------------------------------- 178 | # Condor 179 | #----------------------------------------------------------------------- 180 | #set up outfile and essential info 181 | outstr = 'fbhb' 182 | jobfile = '/astro/users/ebyler/research/newem/condor/cloudy_{}_jobs.cfg'.format(outstr) 183 | jobfolder = '/astro/users/ebyler/research/newem/condor/output_{}/'.format(outstr) 184 | 185 | prefix_str = '''Notification = never 186 | getenv = true 187 | Requirements = (Machine != "ullr.astro.washington.edu") 188 | 189 | Executable = /astro/users/ebyler/research/newem/condor/run_cloudy.sh 190 | Initialdir = /astro/users/ebyler/research/newem/condor/ 191 | 192 | Universe = vanilla 193 | ''' 194 | #----------------------------------------------------------------------- 195 | if make_condor: 196 | f = open(jobfile, 'w') 197 | f.write(prefix_str+'\n') 198 | 199 | for i in range(len(pars)): 200 | modstr = '''Log = {0}log{1}.txt 201 | Output = {0}run{1}.out 202 | Error = {0}run{1}.err 203 | Arguments = {2} {3} {1} 204 | Queue\n'''.format(jobfolder, i+1, mod_dir, mod_prefix) 205 | f.write(modstr+'\n') 206 | f.close() 207 | 208 | print('Added {0} jobs to {1}'.format(len(pars), jobfile.split('/')[-1])) 209 | -------------------------------------------------------------------------------- /demos/generateCloudyBinaryFile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | from past.utils import old_div 8 | from builtins import range 9 | from __future__ import (division, print_function, absolute_import, unicode_literals) 10 | 11 | import sys 12 | import numpy as np 13 | import fsps 14 | from cloudyfsps.ASCIItools import (writeASCII, compileASCII, checkCompiled, compiledExists) 15 | 16 | # this code snippet goes through every step needed 17 | # to integrate FSPS into Cloudy. 18 | # This example uses stellar pops with a constant SFH 19 | # as the input ionizing source. 20 | # 1. Write an ascii file in Cloudy format with grid 21 | # of FSPS spectra in all available ages and 22 | # metallicities 23 | # 2. Compile asii file into binary format required 24 | # for Cloudy use. Assumes $CLOUDY_EXE is set to 25 | # your /path/to/cloudy.exe 26 | # 3. Writes Cloudy input files for a subset of grid 27 | # parameters. 28 | # 4. Runs Cloudy on the *.in files 29 | # 5. Formats the various output files 30 | 31 | zsun = 0.0142 # this is solar metallicity for the MIST isochrones 32 | 33 | exec_write_ascii = True 34 | 35 | # Function to write the ascii file. 36 | # This is where you set the properties of the 37 | # ionizing spectrum (SSP/CSFH, IMF, FBHB, etc) 38 | 39 | def mist_ascii(fileout, **kwargs): 40 | # change these parameters to modify the ionizing source grid 41 | # default mode is to produce an ascii grid in age and Z, 42 | # though different variables and more dimensions are possible. 43 | sp_dict = dict(zcontinuous=1, 44 | imf_type=2, 45 | sfh=0, 46 | const=0.0, 47 | sf_start=0.0) 48 | sp = fsps.StellarPopulation(**sp_dict) 49 | # all ages and Zs 50 | ages = 10.**sp.log_age 51 | logZs = np.log10(old_div(sp.zlegend,zsun)) 52 | modpars = [(age, logZ) for age in ages for logZ in logZs] 53 | lam = sp.wavelengths 54 | all_fluxs = [] 55 | for logZ in logZs: 56 | sp.params['logzsol'] = logZ 57 | all_fluxs.append(sp.get_spectrum()[1]) #lsun per hz 58 | nmod = len(modpars) 59 | # flatten flux for writing 60 | flat_flux = np.array([all_fluxs[j][i] 61 | for i in range(len(ages)) 62 | for j in range(len(logZs))]) 63 | # this function is flexible, ndim can be 3/4/n. 64 | # in this example, however, ndim is 2 (age, logz). 65 | writeASCII(fileout, lam, flat_flux, modpars, 66 | nx=len(lam), ndim=2, npar=2, nmod=nmod) 67 | return 68 | #--------------------------------------------------------------------- 69 | # ASCII FILE: WRITE AND COMPILE 70 | #--------------------------------------------------------------------- 71 | # assumes you have $CLOUDY_EXE and $CLOUDY_DATA_PATH set as sys vars. 72 | 73 | # name of ascii file 74 | ascii_file = 'FSPS_MIST_SSP.ascii' 75 | 76 | # the ascii file takes a while to generate, so if an already-compiled 77 | # version exists, the code will not overwrite it. 78 | 79 | compiled_ascii = '{}.mod'.format(ascii_file.split('.')[0]) 80 | if exec_write_ascii: 81 | print("Executing write ascii sequence...") 82 | if not compiledExists(ascii_file): 83 | print("No compiled model exists...Writing.") 84 | mist_ascii(ascii_file) 85 | print("Compiling {} with Cloudy".format(ascii_file)) 86 | compileASCII(ascii_file) 87 | print("Checking to see if compilation was successful...") 88 | if checkCompiled(ascii_file): 89 | print("Your model {} is ready to run.".format(compiled_ascii)) 90 | else: 91 | sys.exit() 92 | else: 93 | print("{} already exists.".format(compiled_ascii)) 94 | -------------------------------------------------------------------------------- /scripts/runCloudy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import print_function, absolute_import 5 | from __future__ import unicode_literals 6 | 7 | import os 8 | import sys 9 | import subprocess 10 | import numpy as np 11 | from cloudyfsps.cloudyOutputTools import formatCloudyOutput 12 | 13 | use_extended_lines=False 14 | 15 | def get_pars(dir_, mod_prefix, modnum): 16 | ''' 17 | reads from your/mod/dir/PREFIX.pars 18 | order is: 19 | logZ, Age, logU, logR, logQ, nH, efrac, gas_logZ 20 | ''' 21 | data = np.genfromtxt(dir_+mod_prefix+".pars") 22 | return data[np.int(modnum)-1, 1:] 23 | 24 | def output_OK(fl): 25 | ''' 26 | looks in PREFIX123.out for 'Cloudy exited OK' 27 | ''' 28 | f = open(fl, 'r') 29 | l = f.readlines()[-1] 30 | if 'OK' in l: 31 | return True 32 | else: 33 | return False 34 | def main(argv): 35 | fulloutfile=argv[0] 36 | dir_='/'.join(fulloutfile.split('/')[0:-1])+'/' 37 | fname = fulloutfile.split('/')[-1] 38 | mod_prefix=fname.split('.out')[0][0:3] 39 | modnum=fname.split('.out')[0][3::] 40 | if os.path.exists(fulloutfile): 41 | if output_OK(fulloutfile): 42 | print("Cloudy exited OK.") 43 | print("Formatting output...") 44 | modpars = get_pars(dir_, mod_prefix, modnum) 45 | formatCloudyOutput(dir_, mod_prefix, modnum, modpars, 46 | use_extended_lines=use_extended_lines) 47 | else: 48 | print("CLOUDY ERROR in {}. Stopping.".format(fname)) 49 | else: 50 | print("ERROR, no outfile. Stopping.") 51 | 52 | if __name__ == "__main__": 53 | main(sys.argv[1:]) 54 | -------------------------------------------------------------------------------- /scripts/runCloudy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo $PATH 3 | echo $PYTHONPATH 4 | echo $CLOUDY_EXE 5 | suffix='.in' 6 | mod_prefix=$2$3 7 | infile=$mod_prefix$suffix 8 | dir=$1 9 | echo $dir 10 | echo $infile 11 | echo "Running CLOUDY on $infile" 12 | cd $dir && $CLOUDY_EXE -r $mod_prefix 13 | echo "CLOUDY finished $infile" 14 | suffix='.out' 15 | outfile="$dir/$mod_prefix$suffix" 16 | echo $outfile 17 | if [ -f $outfile ]; 18 | then 19 | echo "File $outfile exists." 20 | echo "Running python..." 21 | python runCloudy.py $outfile 22 | echo "Python finished." 23 | else 24 | echo "ERROR: file $outfile does NOT exist." 25 | fi 26 | echo "Done." 27 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import sys 5 | import glob 6 | 7 | try: 8 | from setuptools import setup 9 | except ImportError: 10 | from distutils.core import setup 11 | 12 | import cloudyfsps 13 | VERSION = cloudyfsps.__version__ 14 | 15 | setup(name="cloudyfsps", 16 | version="0.1", 17 | description="nebular emission for FSPS", 18 | url="http://github.com/nell-byler/cloudyfsps", 19 | author="Nell Byler", 20 | author_email="nell.byler@gmail.com", 21 | license="BSD new", 22 | packages=["cloudyfsps", 23 | "cloudyfsps.astrodata"], 24 | package_dir={"cloudyfsps":"cloudyfsps", 25 | "astrodata":"cloudyfsps/astrodata"}, 26 | package_data={ 27 | "": ["README.rst", "LICENSE.rst", "AUTHORS.rst"], 28 | "cloudyfsps":["data/*.dat"], 29 | "astrodata":["data/*.dat", "data/*.npz"] 30 | }, 31 | include_package_data=True, 32 | scripts=glob.glob("scripts/*.py"), 33 | install_requires=['fsps'], 34 | classifiers=[ 35 | "Intended Audience :: Developers", 36 | "Intended Audience :: Science/Research", 37 | "License :: OSI Approved :: BSD License", 38 | "Operating System :: OS Independent", 39 | "Programming Language :: Python"], 40 | zip_safe=True) 41 | --------------------------------------------------------------------------------