Skip to content

Commit 71fb3e5

Browse files
authored
Merge pull request #167 from bd-j/hotstars
Hot Stars
2 parents d58f459 + 70458b8 commit 71fb3e5

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

src/fsps/fsps.f90

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,29 @@ subroutine set_ssp_params(imf_type0,imf_upper_limit0,imf_lower_limit0,&
4444
imf1,imf2,imf3,vdmc,mdave,dell,&
4545
delt,sbss,fbhb,pagb,add_stellar_remnants0,&
4646
tpagb_norm_type0,add_agb_dust_model0,agb_dust,&
47-
redgb,agb,masscut,fcstar,evtype,smooth_lsf0)
47+
redgb,agb,masscut,fcstar,evtype,use_wr_spectra0,&
48+
logt_wmb_hot0,smooth_lsf0)
4849

4950
! Set the parameters that affect the SSP computation.
5051

5152
implicit none
5253

5354
integer, intent(in) :: imf_type0,add_stellar_remnants0,tpagb_norm_type0,&
54-
add_agb_dust_model0,smooth_lsf0
55+
add_agb_dust_model0,use_wr_spectra0,smooth_lsf0
5556
double precision, intent(in) :: imf_upper_limit0, imf_lower_limit0,&
5657
imf1,imf2,imf3,vdmc,mdave,dell,&
5758
delt,sbss,fbhb,pagb,agb_dust,&
58-
redgb,agb,masscut,fcstar,evtype
59+
redgb,agb,masscut,fcstar,evtype,&
60+
logt_wmb_hot0
5961

6062
imf_type=imf_type0
6163
imf_upper_limit=imf_upper_limit0
6264
imf_lower_limit=imf_lower_limit0
6365
add_stellar_remnants=add_stellar_remnants0
6466
tpagb_norm_type=tpagb_norm_type0
6567
add_agb_dust_model=add_agb_dust_model0
68+
use_wr_spectra=use_wr_spectra0
69+
logt_wmb_hot=logt_wmb_hot0
6670
smooth_lsf=smooth_lsf0
6771
pset%imf1=imf1
6872
pset%imf2=imf2

src/fsps/fsps.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,14 @@ class StellarPopulation(object):
231231
Compute SSPs for only the given evolutionary type. All phases used when
232232
set to -1.
233233
234+
:param use_wr_spectra: (default: 1)
235+
Turn on/off the WR spectral library. If off (0), will use the main
236+
default library instead
237+
238+
:param logt_wmb_hot: (default: 0.0)
239+
Use the Eldridge (2017) WMBasic hot star library above this value of
240+
:math:`\log T_\mathrm{eff}` or 25,000K, whichever is larger.
241+
234242
:param masscut: (default: 150.0)
235243
Truncate the IMF above this value.
236244
@@ -310,7 +318,7 @@ class StellarPopulation(object):
310318
For ``sfh=5``, this is the slope of the SFR after time ``sf_trunc``.
311319
312320
:param dust_type: (default: 0)
313-
Common variable defining the extinction curve for dust around old stars:
321+
Common variable defining the attenuation curve for dust around 'old' stars:
314322
315323
* 0: power law with index dust index set by ``dust_index``.
316324
* 1: Milky Way extinction law (with the :math:`R = A_V /E(B - V)` value
@@ -327,7 +335,9 @@ class StellarPopulation(object):
327335
effect because the WG00 models specify the full attenuation curve.
328336
* 4: Kriek & Conroy (2013) attenuation curve. In this model the slope
329337
of the curve, set by the parameter ``dust_index``, is linked to the
330-
strength of the UV bump.
338+
strength of the UV bump and is the *offset* in slope from Calzetti.
339+
* 5: The SMC bar extinction curve from Gordon et al. (2003)
340+
* 6: The Reddy et al. (2015) attenuation curve.
331341
332342
:param dust_tesc: (default: 7.0)
333343
Stars younger than ``dust_tesc`` are attenuated by both ``dust1`` and
@@ -464,6 +474,8 @@ def __init__(
464474
vdmc=0.08,
465475
mdave=0.5,
466476
evtype=-1,
477+
use_wr_spectra=1,
478+
logt_wmb_hot=0.0,
467479
masscut=150.0,
468480
sigma_smooth=0.0,
469481
min_wave_smooth=1e3,
@@ -554,7 +566,7 @@ def get_spectrum(self, zmet=None, tage=0.0, peraa=False):
554566
the current value of ``self.params["zmet"]``.
555567
556568
:param tage: (default: 0.0)
557-
The age of the stellar population for which to obtain a
569+
The age of the stellar population in Gyr) for which to obtain a
558570
spectrum. By default, this will compute a grid of ages from
559571
:math:`t \approx 0` to the maximum age in the isochrones.
560572
@@ -602,9 +614,9 @@ def get_mags(self, zmet=None, tage=0.0, redshift=None, bands=None):
602614
current value of ``self.params["zmet"]``.
603615
604616
:param tage: (default: 0.0)
605-
The age of the stellar population. By default, this will compute a
606-
grid of ages from :math:`t \approx 0` to the maximum age in the
607-
isochrones.
617+
The age of the stellar population in Gyr. By default, this will
618+
compute a grid of ages from :math:`t \approx 0` to the maximum age
619+
in the isochrones.
608620
609621
:param redshift: (default: None)
610622
Optionally redshift the spectrum first. If not supplied, the
@@ -1205,6 +1217,8 @@ class ParameterSet(object):
12051217
"masscut",
12061218
"fcstar",
12071219
"evtype",
1220+
"use_wr_spectra",
1221+
"logt_wmb_hot",
12081222
"smooth_lsf",
12091223
]
12101224

@@ -1280,8 +1294,8 @@ def check_params(self):
12801294
1, NZ + 1
12811295
), "zmet={0} out of range [1, {1}]".format(self._params["zmet"], NZ)
12821296
assert self._params["dust_type"] in range(
1283-
5
1284-
), "dust_type={0} out of range [0, 4]".format(self._params["dust_type"])
1297+
7
1298+
), "dust_type={0} out of range [0, 6]".format(self._params["dust_type"])
12851299
assert self._params["imf_type"] in range(
12861300
6
12871301
), "imf_type={0} out of range [0, 5]".format(self._params["imf_type"])

0 commit comments

Comments
 (0)