Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/fsps/fsps.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,29 @@ subroutine set_ssp_params(imf_type0,imf_upper_limit0,imf_lower_limit0,&
imf1,imf2,imf3,vdmc,mdave,dell,&
delt,sbss,fbhb,pagb,add_stellar_remnants0,&
tpagb_norm_type0,add_agb_dust_model0,agb_dust,&
redgb,agb,masscut,fcstar,evtype,smooth_lsf0)
redgb,agb,masscut,fcstar,evtype,use_wr_spectra0,&
logt_wmb_hot0,smooth_lsf0)

! Set the parameters that affect the SSP computation.

implicit none

integer, intent(in) :: imf_type0,add_stellar_remnants0,tpagb_norm_type0,&
add_agb_dust_model0,smooth_lsf0
add_agb_dust_model0,use_wr_spectra0,smooth_lsf0
double precision, intent(in) :: imf_upper_limit0, imf_lower_limit0,&
imf1,imf2,imf3,vdmc,mdave,dell,&
delt,sbss,fbhb,pagb,agb_dust,&
redgb,agb,masscut,fcstar,evtype
redgb,agb,masscut,fcstar,evtype,&
logt_wmb_hot0

imf_type=imf_type0
imf_upper_limit=imf_upper_limit0
imf_lower_limit=imf_lower_limit0
add_stellar_remnants=add_stellar_remnants0
tpagb_norm_type=tpagb_norm_type0
add_agb_dust_model=add_agb_dust_model0
use_wr_spectra=use_wr_spectra0
logt_wmb_hot=logt_wmb_hot0
smooth_lsf=smooth_lsf0
pset%imf1=imf1
pset%imf2=imf2
Expand Down
30 changes: 22 additions & 8 deletions src/fsps/fsps.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ class StellarPopulation(object):
Compute SSPs for only the given evolutionary type. All phases used when
set to -1.

:param use_wr_spectra: (default: 1)
Turn on/off the WR spectral library. If off (0), will use the main
default library instead

:param logt_wmb_hot: (default: 0.0)
Use the Eldridge (2017) WMBasic hot star library above this value of
:math:`\log T_\mathrm{eff}` or 25,000K, whichever is larger.

:param masscut: (default: 150.0)
Truncate the IMF above this value.

Expand Down Expand Up @@ -310,7 +318,7 @@ class StellarPopulation(object):
For ``sfh=5``, this is the slope of the SFR after time ``sf_trunc``.

:param dust_type: (default: 0)
Common variable defining the extinction curve for dust around old stars:
Common variable defining the attenuation curve for dust around 'old' stars:

* 0: power law with index dust index set by ``dust_index``.
* 1: Milky Way extinction law (with the :math:`R = A_V /E(B - V)` value
Expand All @@ -327,7 +335,9 @@ class StellarPopulation(object):
effect because the WG00 models specify the full attenuation curve.
* 4: Kriek & Conroy (2013) attenuation curve. In this model the slope
of the curve, set by the parameter ``dust_index``, is linked to the
strength of the UV bump.
strength of the UV bump and is the *offset* in slope from Calzetti.
* 5: The SMC bar extinction curve from Gordon et al. (2003)
* 6: The Reddy et al. (2015) attenuation curve.

:param dust_tesc: (default: 7.0)
Stars younger than ``dust_tesc`` are attenuated by both ``dust1`` and
Expand Down Expand Up @@ -464,6 +474,8 @@ def __init__(
vdmc=0.08,
mdave=0.5,
evtype=-1,
use_wr_spectra=1,
logt_wmb_hot=0.0,
masscut=150.0,
sigma_smooth=0.0,
min_wave_smooth=1e3,
Expand Down Expand Up @@ -554,7 +566,7 @@ def get_spectrum(self, zmet=None, tage=0.0, peraa=False):
the current value of ``self.params["zmet"]``.

:param tage: (default: 0.0)
The age of the stellar population for which to obtain a
The age of the stellar population in Gyr) for which to obtain a
spectrum. By default, this will compute a grid of ages from
:math:`t \approx 0` to the maximum age in the isochrones.

Expand Down Expand Up @@ -602,9 +614,9 @@ def get_mags(self, zmet=None, tage=0.0, redshift=None, bands=None):
current value of ``self.params["zmet"]``.

:param tage: (default: 0.0)
The age of the stellar population. By default, this will compute a
grid of ages from :math:`t \approx 0` to the maximum age in the
isochrones.
The age of the stellar population in Gyr. By default, this will
compute a grid of ages from :math:`t \approx 0` to the maximum age
in the isochrones.

:param redshift: (default: None)
Optionally redshift the spectrum first. If not supplied, the
Expand Down Expand Up @@ -1205,6 +1217,8 @@ class ParameterSet(object):
"masscut",
"fcstar",
"evtype",
"use_wr_spectra",
"logt_wmb_hot",
"smooth_lsf",
]

Expand Down Expand Up @@ -1280,8 +1294,8 @@ def check_params(self):
1, NZ + 1
), "zmet={0} out of range [1, {1}]".format(self._params["zmet"], NZ)
assert self._params["dust_type"] in range(
5
), "dust_type={0} out of range [0, 4]".format(self._params["dust_type"])
7
), "dust_type={0} out of range [0, 6]".format(self._params["dust_type"])
assert self._params["imf_type"] in range(
6
), "imf_type={0} out of range [0, 5]".format(self._params["imf_type"])
Expand Down