piXedfit_model

piXedfit.piXedfit_model.generate_modelSED_photo(sp=None, imf_type=1, duste_switch=0, add_neb_emission=1, dust_law=1, sfh_form=4, add_agn=0, filters=[], add_igm_absorption=0, igm_type=0, cosmo='flat_LCDM', H0=70.0, Om0=0.3, gas_logu=- 2.0, params_val={'dust1': 0.5, 'dust2': 0.5, 'dust_index': - 0.7, 'log_age': 1.0, 'log_alpha': 0.1, 'log_beta': 0.1, 'log_fagn': - 3.0, 'log_gamma': - 2.0, 'log_mass': 0.0, 'log_qpah': 0.54, 'log_t0': 0.4, 'log_tau': 0.4, 'log_tauagn': 1.0, 'log_umin': 0.0, 'logzsol': 0.0, 'z': 0.001})

Function for generating a model photometric SED given some parameters.

Parameters
  • sp – (optional, default: None) Initialization of FSPS, such as sp=fsps.StellarPopulation().

  • imf_type – (default: 1) Choice for the IMF. Choices are: (1)0 for Salpeter(1955), (2)1 for Chabrier(2003), and (3)2 for Kroupa(2001).

  • duste_switch – (default: 0) Choice for turning on (value: 1) or off (value: 0) the dust emission modeling.

  • add_neb_emission – (default: 1) Choice for turning on (1) or off (0) the nebular emission modeling.

  • dust_law – (default: 1) Choice for the dust attenuation law. Options are: (a) 0 for Charlot & Fall (2000), (b) 1 for Calzetti et al. (2000).

  • sfh_form – (default: 4) Choice for the parametric SFH model. Options are: (a) 0 for exponentially declining or tau model, (b) 1 for delayed tau model, (c) 2 for log normal model, (d) 3 for Gaussian form, (e) 4 for double power-law model.

  • add_agn – (default: 0) Choice for turning on (value: 1) or off (value: 0) the AGN dusty torus modeling.

  • filters – List of the photometric filters. This is mandatory parameter, in other word it should not empty. The accepted naming for the filters can be seen using list_filters() function in the utils.filtering module.

  • add_igm_absorption – (default: 0) Choice for turning on (value: 1) or off (value: 0) the IGM absorption modeling.

  • igm_type – (default: 0) Choice for the IGM absorption model. Options are: (a) 0 for Madau (1995), and (b) 1 for Inoue+(2014).

  • cosmo – (default: ‘flat_LCDM’) Choices for the cosmology. Options are: (1)’flat_LCDM’ or 0, (2)’WMAP5’ or 1, (3)’WMAP7’ or 2, (4)’WMAP9’ or 3, (5)’Planck13’ or 4, (6)’Planck15’ or 5. These options are similar to the choices available in the Astropy Cosmology package.

  • H0 – (default: 70.0) The Hubble constant at z=0. Only relevant when cosmo=’flat_LCDM’ is chosen.

  • Om0 – (default: 0.3) The Omega matter at z=0.0. Only relevant when cosmo=’flat_LCDM’ is chosen.

  • gas_logu – (default: -2.0) Gas ionization parameter in logarithmic scale.

  • param_val – Dictionary of the input values of the parameters. Should folllow the structure given in the default set. Available free parameters are the same as those tabulated in Table 1 of Abdurro’uf et al. (2021).

Returns photo_SED

Arrays containing output model photometric SED. It consists of photo_SED[‘wave’] which is the central wavelengths of the photometric filters and photo_SED[‘flux’] which is the photometric fluxes.

piXedfit.piXedfit_model.generate_modelSED_spec(sp=None, imf_type=1, duste_switch=1, add_neb_emission=1, dust_law=1, sfh_form=4, add_agn=0, add_igm_absorption=0, igm_type=0, cosmo='flat_LCDM', H0=70.0, Om0=0.3, gas_logu=- 2.0, params_val={'dust1': 0.5, 'dust2': 0.5, 'dust_index': - 0.7, 'log_age': 1.0, 'log_alpha': 0.1, 'log_beta': 0.1, 'log_fagn': - 3.0, 'log_gamma': - 2.0, 'log_mass': 0.0, 'log_qpah': 0.54, 'log_t0': 0.4, 'log_tau': 0.4, 'log_tauagn': 1.0, 'log_umin': 0.0, 'logzsol': 0.0, 'z': 0.001})

Function for generating a model spectroscopic SED given some parameters.

Parameters
  • sp – (optional, default: None) Initialization of FSPS, such as sp=fsps.StellarPopulation().

  • imf_type – (default: 1) Choice for the IMF. Choices are: (1)0 for Salpeter(1955), (2)1 for Chabrier(2003), and (3)2 for Kroupa(2001).

  • duste_switch – (default: 0) Choice for turning on (value: 1) or off (value: 0) the dust emission modeling.

  • add_neb_emission – (default: 1) Choice for turning on (1) or off (0) the nebular emission modeling.

  • dust_law – (default: 1) Choice for the dust attenuation law. Options are: (a) 0 for Charlot & Fall (2000), (b) 1 for Calzetti et al. (2000).

  • sfh_form – (default: 4) Choice for the parametric SFH model. Options are: (a) 0 for exponentially declining or tau model, (b) 1 for delayed tau model, (c) 2 for log normal model, (d) 3 for Gaussian form, (e) 4 for double power-law model.

  • add_agn – (default: 0) Choice for turning on (value: 1) or off (value: 0) the AGN dusty torus modeling.

  • add_igm_absorption – (default: 0) Choice for turning on (value: 1) or off (value: 0) the IGM absorption modeling.

  • igm_type – (default: 0) Choice for the IGM absorption model. Options are: (a) 0 for Madau (1995), and (b) 1 for Inoue+(2014).

  • cosmo

    (default: ‘flat_LCDM’) Choices for the cosmology. Options are: (1)’flat_LCDM’ or 0, (2)’WMAP5’ or 1, (3)’WMAP7’ or 2, (4)’WMAP9’ or 3, (5)’Planck13’ or 4, (6)’Planck15’ or 5. These options are similar to the choices available in the Astropy Cosmology package.

  • H0 – (default: 70.0) The Hubble constant at z=0. Only relevant when cosmo=’flat_LCDM’ is chosen.

  • Om0 – (default: 0.3) The Omega matter at z=0.0. Only relevant when cosmo=’flat_LCDM’ is chosen.

  • gas_logu – (default: -2.0) Gas ionization parameter in logarithmic scale.

  • param_val

    Dictionary of the input values of the parameters. Should folllow the structure given in the default set. Available free parameters are the same as those tabulated in Table 1 of Abdurro’uf et al. (2021).

Returns spec_SED

Arrays containing output model spectrum. It consists of spec_SED[‘wave’] which is the wavelengths grid and spec_SED[‘flux’] which is the fluxes or the spectrum.

piXedfit.piXedfit_model.save_models_photo(filters=[], gal_z=None, imf_type=1, sfh_form=4, dust_law=1, add_igm_absorption=0, igm_type=0, duste_switch=0, add_neb_emission=1, add_agn=0, gas_logu=- 2.0, nmodels=100000, params_range={'dust1': [0.0, 4.0], 'dust2': [0.0, 4.0], 'dust_index': [- 2.2, 0.4], 'log_age': [- 3.0, 1.14], 'log_alpha': [- 2.0, 2.0], 'log_beta': [- 2.0, 2.0], 'log_fagn': [- 5.0, 0.48], 'log_gamma': [- 4.0, 0.0], 'log_qpah': [- 3.0, 1.0], 'log_t0': [- 1.0, 1.14], 'log_tau': [- 1.0, 1.5], 'log_tauagn': [0.7, 2.18], 'log_umin': [- 1.0, 1.39], 'logzsol': [- 2.0, 0.2]}, nproc=10, cosmo=0, H0=70.0, Om0=0.3, name_out_fits=None)

Function for generating pre-calculated model SEDs and store them into a FITS file. This is supposed to be created one for one redshift (i.e, one galaxy or a group of galaxies with similar redshift). This FITS file can be used in fitting all the spatial bins in the galaxy (or a group of galaxies with similar redshift).

Parameters
  • filters – (default: []) Set of photometric filters. The accepted naming for the filters can be seen using list_filters() function in the utils.filtering module.

  • gal_z – Galaxy’s redshift. This parameter is mandatory.

  • imf_type – (default: 1) Choice for the IMF. Options are: (1)0 for Salpeter(1955), (2)1 for Chabrier(2003), and (3)2 for Kroupa(2001).

  • sfh_form – (default: 4) Choice for the parametric SFH model. Options are: (a) 0 for exponentially declining or tau model, (b) 1 for delayed tau model, (c) 2 for log normal model, (d) 3 for Gaussian form, (e) 4 for double power-law model.

  • dust_law – (default: 1) Choice for the dust attenuation law. Options are: (a) 0 for Charlot & Fall (2000), (b) 1 for Calzetti et al. (2000).

  • add_igm_absorption – (default: 0) Switch for the IGM absorption. Options are: (1)0 means turn off, and (2)1 means turn on.

  • igm_type – (default: 0) Choice for the IGM absorption model. Options are: (a) 0 for Madau (1995), and (b) 1 for Inoue+(2014).

  • duste_switch – (default: 0) Switch for the dust emission modeling. Options are: (1)0 means turn off, and (2)1 means turn on.

  • add_neb_emission – (default: 1) Switch for the nebular emission modeling. Options are: (1)0 means turn off, and (2)1 means turn on.

  • add_agn – (default: 0) Switch for the AGN dusty torus emission modeling. Options are: (1)0 means turn off, and (2)1 means turn on.

  • gas_logu – (default: -2.0) Gas ionization parameter in log scale.

  • nmodels – (default: 100000) Number of model SEDs to be generated.

  • params_range – Ranges of parameters. The format of this input argument is python dictionary.

  • nproc – (default: 10) Number of processors (cores) to be used in the calculation.

  • cosmo

    (default: 0) Choices for the cosmology. Options are: (1)’flat_LCDM’ or 0, (2)’WMAP5’ or 1, (3)’WMAP7’ or 2, (4)’WMAP9’ or 3, (5)’Planck13’ or 4, (6)’Planck15’ or 5. These options are similar to the choices available in the Astropy Cosmology package.

  • H0 – (default: 70.0) The Hubble constant at z=0. Only relevant when cosmo=’flat_LCDM’ is chosen.

  • Om0 – (default: 0.3) The Omega matter at z=0.0. Only relevant when cosmo=’flat_LCDM’ is chosen.

  • name_out_fits – (optional, default:None) Desired name for the output FITS file.

Returns name_out_fits

Output FITS file.

piXedfit.piXedfit_model.save_models_rest_spec(imf_type=1, sfh_form=4, dust_law=1, duste_switch=0, add_neb_emission=1, add_agn=0, gas_logu=- 2.0, nmodels=100000, params_range={'dust1': [0.0, 4.0], 'dust2': [0.0, 4.0], 'dust_index': [- 2.2, 0.4], 'log_age': [- 1.0, 1.14], 'log_alpha': [- 2.0, 2.0], 'log_beta': [- 2.0, 2.0], 'log_fagn': [- 5.0, 0.48], 'log_gamma': [- 4.0, 0.0], 'log_qpah': [- 3.0, 1.0], 'log_t0': [- 1.0, 1.14], 'log_tau': [- 1.0, 1.5], 'log_tauagn': [0.7, 2.18], 'log_umin': [- 1.0, 1.39], 'logzsol': [- 2.0, 0.2]}, nproc=10, name_out=None)

Function for generating rest-frame model spectra.

Parameters
  • imf_type – (default: 1) Choice for the IMF. Options are: (1)0 for Salpeter(1955), (2)1 for Chabrier(2003), and (3)2 for Kroupa(2001).

  • sfh_form – (default: 4) Choice for the parametric SFH model. Options are: (a) 0 for exponentially declining or tau model, (b) 1 for delayed tau model, (c) 2 for log normal model, (d) 3 for Gaussian form, (e) 4 for double power-law model.

  • dust_law – (default: 1) Choice for the dust attenuation law. Options are: (a) 0 for Charlot & Fall (2000), (b) 1 for Calzetti et al. (2000).

  • duste_switch – (default: 0) Switch for the dust emission modeling. Options are: (1)0 means turn off, and (2)1 means turn on.

  • add_neb_emission – (default: 1) Switch for the nebular emission modeling. Options are: (1)0 means turn off, and (2)1 means turn on.

  • add_agn – (default: 0) Switch for the AGN dusty torus emission modeling. Options are: (1)0 means turn off, and (2)1 means turn on.

  • gas_logu – (default: -2.0) Gas ionization parameter in log scale.

  • nmodels – (default: 100000) Number of model SEDs to be generated.

  • params_range – Ranges of parameters. The format of this input argument is python dictionary.

  • nproc – (default: 10) Number of processors (cores) to be used in the calculation.

  • name_out – (optional, default:None) Desired name for the output FITS file.

Returns name_out

Output FITS file.