Convert FSPS-generated SED family to stored table format. More...
Convert FSPS-generated SED family to stored table format.
This script converts data representing a family of SEDs for single stellar populations generated by the FSPS code (see Conroy, Gunn, & White (2009, ApJ) and Conroy & Gunn (2010, ApJ)) to SKIRT stored table format. This enables users to generate customized FSPS SED families and use them with SKIRT.
The SKIRT FSPSSEDFamily
class offers built-in FSPS SED families generated using the default MIST isochrones and the default MILES spectral libraries, excluding dust attenuation and emission as well as nebular emission, for each of the Salpeter, Chabrier and Kroupa IMFs. If one of these built-in SED families suits your use case, you don't need this script.
Users who need one or more FSPS SED families generated with other settings than the built-in families can use the SKIRT FileSSPSEDFamily
class, after following the workflow described below to create the appropriate resources.
sps_vars.f90
to your needs.Create a new Fortran program (or adjust one of the provided example programs) to drive the FSPS engine. SKIRT needs just the ".spec" output files, so you can skip outputting anything else. However, you do need to generate a ".spec" file for each metallicity index in the table applicable to the isochrone set of your choice. For example:
... CALL SPS_SETUP(-1) DO i = 1, 12 pset%zmet = i WRITE(filename,"(I0.2)") i filename = 'FSSP_' // TRIM(imf_name) // '_' // TRIM(filename) CALL SSP_GEN(pset,mass_ssp,lbol_ssp,spec_ssp) CALL COMPSP(2,1,filename,mass_ssp,lbol_ssp,spec_ssp,pset,ocompsp) END DO ...
This script expects two arguments: