piXedfit_fitting

piXedfit.piXedfit_fitting.SEDfit_from_binmap(fits_binmap, binid_range=[], bin_ids=[], models_spec=None, params_ranges=None, params_priors=None, fit_method='mcmc', gal_z=None, nrands_z=10, add_igm_absorption=0, igm_type=0, likelihood='gauss', dof=3.0, nwalkers=100, nsteps=600, nsteps_cut=50, nproc=10, initfit_nmodels_mcmc=30000, perc_chi2=90.0, cosmo=0, H0=70.0, Om0=0.3, store_full_samplers=1, name_out_fits=[])

A function for performing SED fitting to set of spatially resolved SEDs from the reduced data cube that is produced after the pixel binning.

Parameters
  • fits_binmap – Input FITS file of reduced data cube after pixel binning. This FITS file is the one that is output by pixel_binning_photo() function in the piXedfit_bin module. This is a mandatory parameter.

  • binid_range – Range of bin IDs that are going to be fit. Allowed format is [idmin,idmax]. The id starts from 0. If empty, [], fitting will be done to SEDs of all spatial bins.

  • bin_ids – Bin ids whose the SEDs are going to be fit. Allowed format is a 1D array. The id starts from 0. Both binid_range and bin_ids can’t be empty, []. If both of them are not empty, the bin_ids will be used.

  • models_spec – Model spectral templates in the rest-frame that is generated prior to the fitting. This set of models will be used in the main fitting step if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • params_ranges

  • params_priors

  • fit_method – (default: ‘mcmc’) Choice for the fitting method. Options are: (1)’mcmc’, and (2)’rdsps’.

  • gal_z – Redshift of the galaxy. If gal_z=None, then redshift is taken from the header of the FITS file. If gal_z in the FITS file header is negatiive, then redshift is set to be free.

  • params_range – Ranges of parameters. The format of this input argument is python dictionary. The range for redshift (‘z’) only relevant if gal_z=None (i.e., redshift becomes free parameter).

  • nrands_z – (default: 10) Number of random redshift to be generated in the main fitting if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • 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).

  • likelihood – (default: ‘gauss’) Choice of likelihood function for the RDSPS method. Only relevant if the fit_method=’rdsps’. Options are: (1)’gauss’, and (2) ‘student_t’.

  • dof – (default: 2.0) Degree of freedom (nu) in the Student’s likelihood function. Only relevant if the fit_method=’rdsps’ and likelihood=’student_t’.

  • nwalkers – (default: 100) Number of walkers to be set in the MCMC process. This parameter is only applicable if fit_method=’mcmc’.

  • nsteps – (default: 600) Number of steps for each walker in the MCMC process. Only relevant if fit_method=’mcmc’.

  • nsteps_cut – (optional, default: 50) Number of first steps of each walkers that will be cut when constructing the final sampler chains. Only relevant if fit_method=’mcmc’.

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

  • initfit_nmodels_mcmc – (default: 30000) Number of models to be used for initial fitting in the MCMC method.

  • perc_chi2 – (optional, default: 90.0) Lowest chi-square Percentage from the full model SEDs that are considered in the calculation of posterior-weighted averaging. This parameter is only relevant for the RDSPS fitting method and it is not applicable for the MCMC method.

  • 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.

  • store_full_samplers – (default: 1 or True) Flag indicating whether full sampler models will be stored into the output FITS file or not. Options are: (a) 1 or True and (b) 0 or False.

  • name_out_fits – (optional, default: []) Names of output FITS files. This parameter is optional. If not empty, it must be in a list format with number of elements is the same as the number of bins to be fit. Example: name_out_fits = [‘bin1.fits’, ‘bin2.fits’, …, ‘binN.fits’].

piXedfit.piXedfit_fitting.SEDfit_from_binmap_specphoto(fits_binmap, binid_range=[], bin_ids=[], models_spec=None, params_ranges=None, params_priors=None, fit_method='mcmc', gal_z=None, nrands_z=10, add_igm_absorption=0, igm_type=0, spec_sigma=2.6, poly_order=8, likelihood='gauss', dof=3.0, nwalkers=100, nsteps=600, nsteps_cut=50, nproc=10, initfit_nmodels_mcmc=30000, perc_chi2=90.0, spec_chi_sigma_clip=3.0, cosmo=0, H0=70.0, Om0=0.3, del_wave_nebem=10.0, store_full_samplers=1, name_out_fits=[])

A function for performing SED fitting to set of spatially resolved SEDs from the reduced data cube that is produced after the pixel binning.

Parameters
  • fits_binmap – Input FITS file of reduced data cube after pixel binning. This FITS file is the one that is output by pixel_binning_photo() function in the piXedfit_bin module. This is a mandatory parameter.

  • binid_range – Range of bin IDs that are going to be fit. Allowed format is [idmin,idmax]. The id starts from 0. If empty, [], fitting will be done to SEDs of all spatial bins.

  • bin_ids – Bin ids whose the SEDs are going to be fit. Allowed format is a 1D array. The id starts from 0. Both binid_range and bin_ids can’t be empty, []. If both of them are not empty, the bin_ids will be used.

  • models_spec – Model spectral templates in the rest-frame that is generated prior to the fitting. This set of models will be used in the main fitting step if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • fit_method – (default: ‘mcmc’) Choice for the fitting method. Options are: (1)’mcmc’, and (2)’rdsps’.

  • gal_z – Redshift of the galaxy. If gal_z=None, then redshift is taken from the header of the FITS file. If gal_z in the FITS file header is negatiive, then redshift is set to be free.

  • spec_sigma – (default: 2.6) Spectral resolution.

  • poly_order – (default: 5.0)

  • params_range – Ranges of parameters. The format of this input argument is python dictionary. The range for redshift (‘z’) only relevant if gal_z=None (i.e., redshift becomes free parameter).

  • nrands_z – (default: 10) Number of random redshift to be generated in the main fitting if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • 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).

  • likelihood – (default: ‘gauss’) Choice of likelihood function for the RDSPS method. Only relevant if the fit_method=’rdsps’. Options are: (1)’gauss’, and (2) ‘student_t’.

  • dof – (default: 2.0) Degree of freedom (nu) in the Student’s likelihood function. Only relevant if the fit_method=’rdsps’ and likelihood=’student_t’.

  • nwalkers – (default: 100) Number of walkers to be set in the MCMC process. This parameter is only applicable if fit_method=’mcmc’.

  • nsteps – (default: 600) Number of steps for each walker in the MCMC process. Only relevant if fit_method=’mcmc’.

  • nsteps_cut – (optional, default: 50) Number of first steps of each walkers that will be cut when constructing the final sampler chains. Only relevant if fit_method=’mcmc’.

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

  • initfit_nmodels_mcmc – (default: 30000) Number of models to be used for initial fitting in the MCMC method.

  • perc_chi2 – (optional, default: 90.0) Lowest chi-square Percentage from the full model SEDs that are considered in the calculation of posterior-weighted averaging. This parameter is only relevant for the RDSPS fitting method and it is not applicable for the MCMC method.

  • spec_chi_sigma_clip – (default: 3.0)

  • 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.

  • store_full_samplers – (default: 1 or True) Flag indicating whether full sampler models will be stored into the output FITS file or not. Options are: (a) 1 or True and (b) 0 or False.

  • name_out_fits – (optional, default: []) Names of output FITS files. This parameter is optional. If not empty, it must be in a list format with number of elements is the same as the number of bins to be fit. Example: name_out_fits = [‘bin1.fits’, ‘bin2.fits’, …, ‘binN.fits’].

piXedfit.piXedfit_fitting.SEDfit_pixels_from_fluxmap(fits_fluxmap, x_range=[], y_range=[], models_spec=None, params_ranges=None, params_priors=None, fit_method='mcmc', gal_z=None, nrands_z=10, add_igm_absorption=0, igm_type=0, likelihood='gauss', dof=2.0, nwalkers=100, nsteps=600, nsteps_cut=50, nproc=10, initfit_nmodels_mcmc=30000, cosmo=0, H0=70.0, Om0=0.3, perc_chi2=10.0, store_full_samplers=1)

A function for performing SED fitting on pixel-by-pixel basis.

Parameters
  • fits_fluxmap – Input FITS file of reduced 3D data cube of multiband fluxes. It is the ouput (or should have the same format as that of the output) of the image processing by images_processing() function of the piXedfit_images module.

  • x_range – Range of x-axis coordinate within which SED fitting will be performed to the pixels. The format is [xmin,xmax]. If x_range=[], the whole x-axis range of the data cube is considered.

  • y_range – Range of y-axis coordinate within which SED fitting will be performed to the pixels. The format is [ymin,ymax]. If y_range=[], the whole y-axis range of the data cube is considered.

  • models_spec – Model spectral templates in the rest-frame that is generated prior to the fitting. This set of models will be used in the main fitting step if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • params_ranges

  • params_priors

  • fit_method – (default: ‘mcmc’) Choice for the fitting method. Options are: (1)’mcmc’, and (2)’rdsps’.

  • gal_z – Redshift of the galaxy. If gal_z=None, then redshift is taken from the FITS file header. If gal_z from the header is negative, then redshift is set to be free. As for the current version of **piXedfit, photo-z hasn’t been implemented**.

  • params_range – Ranges of parameters. The format of this input argument is python dictionary. The range for redshift (‘z’) only relevant if gal_z=None (i.e., redshift becomes free parameter).

  • nrands_z – (default: 10) Number of random redshift to be generated in the main fitting if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • 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).

  • likelihood – (default: ‘gauss’) Choice of likelihood function for the RDSPS method. Only relevant if the fit_method=’rdsps’. Options are: (1)’gauss’, and (2) ‘student_t’.

  • dof – (default: 2.0) Degree of freedom (nu) in the Student’s likelihood function. Only relevant if the fit_method=’rdsps’ and likelihood=’student_t’.

  • nwalkers – (default: 100) Number of walkers to be set in the MCMC process. This parameter is only applicable if fit_method=’mcmc’.

  • nsteps – (default: 600) Number of steps for each walker in the MCMC process. Only relevant if fit_method=’mcmc’.

  • nsteps_cut – (optional, default: 50) Number of first steps of each walkers that will be cut when constructing the final sampler chains. Only relevant if fit_method=’mcmc’.

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

  • initfit_nmodels_mcmc – (default: 30000) Number of models to be used for initial fitting in the MCMC method.

  • 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.

  • perc_chi2 – (default: 10.0) Lowest chi-square Percentage from the full model SEDs that are considered in the calculation of posterior-weighted averaging. This parameter is only relevant for the RDSPS fitting method and it is not applicable for the MCMC method.

  • store_full_samplers – (default: 1 or True) Flag indicating whether full sampler models will be stored into the output FITS file or not. Options are: (a) 1 or True and (b) 0 or False.

piXedfit.piXedfit_fitting.maps_parameters(fits_binmap=None, bin_ids=[], name_sampler_fits=[], fits_fluxmap=None, refband_SFR=None, refband_SM=None, refband_Mdust=None, name_out_fits=None)

Function that can be used for constructing maps of properties from the fitting results of spatial bins.

Parameters
  • fits_binmap – (Mandatory, default=None) FITS file containing the reduced data after the pixel binning process, which is output of the pixel_binning_photo() function in the piXedfit_bin module.

  • bin_ids – Bin indices of the FITS files listed in name_sampler_fits input. Allowed format is a 1D array. The id starts from 0.

  • name_sampler_fits – List of the names of the FITS files containing the fitting results of spatial bins. This should have the same number of element as that of bin_ids. The number of element doesn’t necessarily the same as the number of bins. A missing bin will be ignored in the creation of the maps of properties.

  • fits_fluxmap – (Mandatory, default: None) FITS file containing reduced maps of multiband fluxes, which is output of the flux_map() in the images_processing class in the piXedfit_images module.

  • refband_SFR – (default: None) Index of band in the multiband set that is used for reference in dividing map of SFR in bin space into map of SFR in pixel space. If None, the band with shortest wavelength is selected.

  • refband_SM – (default: None) Index of band in the multiband set that is used for reference in dividing map of stellar mass in bin space into map of stellar mass in pixel space. If None, the band with longest wavelength is selected.

  • refband_Mdust – (default: None) Index of band/filter in the multiband set that is used for reference in dividing map of dust mass in bin space into map of dust mass in pixel space. If None, the band with longest wavelength is selected.

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

piXedfit.piXedfit_fitting.maps_parameters_fit_pixels(fits_fluxmap=None, pix_x=[], pix_y=[], name_sampler_fits=[], name_out_fits=None)

Function for calculating maps of properties from the fitting results obtained with the MCMC method on pixel basis.

Parameters
  • fits_fluxmap – FITS file containing reduced maps of multiband fluxes, which is output of the flux_map() in the images_processing class in the piXedfit_images module.

  • pix_x – x coordinates of pixels associated with the FITS files (fitting results) in name_sampler_fits input.

  • pix_y – y coordinates of pixels associated with the FITS files (fitting results) in name_sampler_fits input.

  • name_sampler_fits – List of names of the FITS files containing the fitting results. The three inputs of pix_x, pix_y, and name_sampler_fits should have the same number of elements.

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

class piXedfit.piXedfit_fitting.priors(ranges={'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_mass': [4.0, 12.0], 'log_mw_age': [- 2.0, 1.14], '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], 'z': [0.0, 1.0]})

Functions for defining priors.

arbitrary(param, values, prob)

Function for assigning an arbitrary prior.

Parameters
  • param

  • values

  • prob

gamma(param, a, loc, scale)

Function for assigning a prior in the form of Gamma function to a parameter.

Parameters
  • param – The parameter that will be assigned the prior.

  • a

  • loc

  • scale

Returns prior

gaussian(param, loc, scale)

Function for assigning gaussian prior to a parameter.

Parameters
  • param – The parameter that will be assigned the prior.

  • loc

  • scale

Returns prior

joint_with_mass(param, log_mass, param_values, scale)

Function for assigning a joint prior between a parameter and log_mass

Parameters
  • param

  • log_mass

  • param_values

  • scale

params_ranges()

Function for defining ranges of the parameters.

Returns params_ranges

studentt(param, df, loc, scale)

Function for assigning Student’s t prior to a parameter.

Parameters
  • param – The parameter that will be assigned the prior.

  • df

  • loc

  • scale

Returns prior

uniform(param)

Function for assigning uniform prior to a parameter.

Parameters

param – The parameter that will be assigned the prior.

Returns prior

piXedfit.piXedfit_fitting.singleSEDfit(obs_flux, obs_flux_err, filters, models_spec, params_ranges=None, params_priors=None, fit_method='mcmc', gal_z=None, nrands_z=10, add_igm_absorption=0, igm_type=0, likelihood='gauss', dof=2.0, nwalkers=100, nsteps=600, nsteps_cut=50, nproc=10, initfit_nmodels_mcmc=30000, perc_chi2=90.0, cosmo=0, H0=70.0, Om0=0.3, store_full_samplers=1, name_out_fits=None)

Function for performing fitting to a single photometric SED.

Parameters
  • obs_flux – (1D array; float) Input fluxes in multiple bands. The number of elements of the array should be the sama as that of obs_flux_err and filters.

  • obs_flux_err – (1D array; float) Input flux uncertainties in multiple bands.

  • filters – (list; string) List of photometric filters. The list of filters recognized by piXedfit can be accesses using piXedfit.utils.filtering.list_filters().

  • models_spec – Model spectral templates in the rest-frame generated prior to the fitting using piXedfit.piXedfit_model.save_models_rest_spec(). This set of models will be used in the main fitting step if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • params_ranges

  • params_priors

  • fit_method – (default: ‘mcmc’) Method in SED fitting. Options are: (a)’mcmc’ for Markov Chain Monte Carlo, and (b)’rdsps’ for Random Dense Sampling of Parameter Space.

  • gal_z – Redshift of the galaxy. If gal_z=None, then redshift is set to be a free parameter in the fitting.

  • params_range – Ranges of parameters. The format of this input argument is python dictionary. The range for redshift (‘z’) only relevant if gal_z=None (i.e., redshift becomes free parameter).

  • nrands_z – (default: 10) Number of random redshifts to be generated (within the chosen range as set in the params_range) in the main fitting if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’. This is only relevant if gal_z=None (i.e., photometric redshift is activated).

  • add_igm_absorption – (default: 0) Switch for the IGM absorption. Options are: (a)0 for switch off, and (b)1 for switch on.

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

  • likelihood – (default: ‘gauss’) Choice of likelihood function for the RDSPS method. Only relevant if the fit_method=’rdsps’. Options are: (1)’gauss’, and (2) ‘student_t’.

  • dof – (default: 2.0) Degree of freedom (nu) in the Student’s likelihood function. Only relevant if the fit_method=’rdsps’ and likelihood=’student_t’.

  • nwalkers – (default: 100) Number of walkers to be set in the MCMC process. This parameter is only applicable if fit_method=’mcmc’.

  • nsteps – (default: 600) Number of steps for each walker in the MCMC process. Only relevant if fit_method=’mcmc’.

  • nsteps_cut – (default: 50) Number of first steps of each walkers that will be cut when constructing the final sampler chains. Only relevant if fit_method=’mcmc’.

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

  • initfit_nmodels_mcmc – (default: 30000) Number of models to be used for initial fitting in the MCMC method.

  • perc_chi2 – (default: 90.0) Lowest chi-square Percentage from the full model SEDs that are considered in the calculation of posterior-weighted averaging. This parameter is only relevant for the RDSPS fitting method and it is not applicable for the MCMC method.

  • 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.

  • store_full_samplers – (default: 1 or True) Flag indicating whether full sampler models will be stored into the output FITS file or not. Options are: (a) 1 or True and (b) 0 or False.

  • name_out_fits – (optional, default: None) Name of output FITS file. This parameter is optional.

piXedfit.piXedfit_fitting.singleSEDfit_specphoto(obs_flux, obs_flux_err, filters, spec_wave, spec_flux, spec_flux_err, models_spec, params_ranges=None, params_priors=None, fit_method='mcmc', gal_z=None, nrands_z=10, add_igm_absorption=0, igm_type=0, spec_sigma=2.6, poly_order=8, likelihood='gauss', dof=2.0, nwalkers=100, nsteps=600, nsteps_cut=50, nproc=10, initfit_nmodels_mcmc=30000, perc_chi2=90.0, spec_chi_sigma_clip=3.0, cosmo=0, H0=70.0, Om0=0.3, del_wave_nebem=10.0, store_full_samplers=1, name_out_fits=None)

Function for performing SED fitting to a single photometric SED.

Parameters
  • obs_flux – (1D array; float) Input fluxes in multiple bands. The number of elements of the array should be the sama as that of obs_flux_err and filters.

  • obs_flux_err – (1D array; float) Input flux uncertainties in multiple bands.

  • filters – (list; string) List of photometric filters. The list of filters recognized by piXedfit can be accesses using piXedfit.utils.filtering.list_filters().

  • spec_wave – (1D array; float) Wavelength grids of the input spectrum.

  • spec_flux – (1D array; float) Flux grids of the input spectrum.

  • spec_flux_err – (1D array; float) Flux uncertainties of the input spectrum.

  • models_spec – Model spectral templates in the rest-frame generated prior to the fitting using piXedfit.piXedfit_model.save_models_rest_spec(). This set of models will be used in the main fitting step if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • params_ranges

  • params_priors

  • fit_method – (default: ‘mcmc’) Method in SED fitting. Options are: (a)’mcmc’ for Markov Chain Monte Carlo, and (b)’rdsps’ for Random Dense Sampling of Parameter Space.

  • gal_z – (float) Redshift of the galaxy. If gal_z=None, then redshift is set to be a free parameter in the fitting.

  • spec_sigma – (default:2.6; float) Spectral resolution in Angstrom of the input spectrum.

  • poly_order – (default:8.0; integer) Degree of the legendre polynomial function.

  • params_range – (Dictionary) Ranges of parameters. The format of this input argument is python dictionary. The range for redshift (‘z’) only relevant if gal_z=None (i.e., redshift becomes free parameter).

  • nrands_z – (default: 10; integer) Number of random redshift to be generated in the main fitting if fit_method=’rdsps’ or initial fitting if fit_method=’mcmc’.

  • 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).

  • likelihood – (default: ‘gauss’) Choice of likelihood function for the RDSPS method. Only relevant if the fit_method=’rdsps’. Options are: (1)’gauss’, and (2) ‘student_t’.

  • dof – (default: 2.0; float) Degree of freedom (nu) in the Student’s likelihood function. Only relevant if the fit_method=’rdsps’ and likelihood=’student_t’.

  • nwalkers – (default: 100; integer) Number of walkers to be set in the MCMC process. This parameter is only applicable if fit_method=’mcmc’.

  • nsteps – (default: 600; integer) Number of steps for each walker in the MCMC process. Only relevant if fit_method=’mcmc’.

  • nsteps_cut – (default: 50; integer) Number of first steps of each walkers that will be cut when constructing the final sampler chains. Only relevant if fit_method=’mcmc’.

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

  • initfit_nmodels_mcmc – (default: 30000; integer) Number of models to be used for initial fitting in the MCMC method.

  • perc_chi2 – (default: 90.0; float) Lowest chi-square Percentage from the full model SEDs that are considered in the calculation of posterior-weighted averaging. This parameter is only relevant for the RDSPS fitting method and it is not applicable for the MCMC method.

  • spec_chi_sigma_clip – (default: 3.0; float)

  • 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; float) The Hubble constant at z=0. Only relevant when cosmo=’flat_LCDM’ is chosen.

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

  • del_wave_nebem – (default: 10; float)

  • store_full_samplers – (default: 1 or True) Flag indicating whether full sampler models will be stored into the output FITS file or not. Options are: (a) 1 or True and (b) 0 or False.

  • name_out_fits – (optional, default: None; string) Name of output FITS file. This parameter is optional.