PAHFITBase¶
- class pahfit.base.PAHFITBase[source]¶
Bases:
object
Old implementation. Some functions are still used by the new Model class. The unused functionality has been removed.
Construct that is still used for now
- param_info: tuple of dicts called (bb_info, df_info, h2_info, ion_info, abs_info, att_info)
The dictionaries contain info for each type of component. Each component of the dictonaries is a vector. bb_info - dict with {name, temps, temps_limits, temps_fixed, amps, amps_limits, amps_fixed}, each a vector dust_features, h2_features, ion_features - dict with {name amps, amps_limits, amps_fixed, x_0, x_0_limits, x_0_fixed, fwhms, fwhms_limits, fwhm_fixed}.
Methods Summary
model_from_param_info
(param_info)parse_table
(pack_table)Load the model parameters from a Table
plot
(axs, x, y, yerr, model[, ...])Plot model using axis object.
update_dictionary
(feature_dict, instrumentname)Update parameter dictionary based on the instrument name.
Methods Documentation
- static parse_table(pack_table)[source]¶
Load the model parameters from a Table
- Parameters:
- pack_tableTable
Table created by reading in a science pack.
- Returns:
- readouttuple
Tuple containing dictionaries of all components from the input Table. Can be used to create PAHFITBase instance using param_info argument. Dictionary in tuple is None if no components of that type were specified.
- static plot(axs, x, y, yerr, model, model_samples=1000, scalefac_resid=2)[source]¶
Plot model using axis object.
- Parameters:
- axsmatplotlib.axis objects
where to put the plot
- xfloats
wavelength points
- yfloats
observed spectrum
- yerr: floats
observed spectrum uncertainties
- modelPAHFITBase model (astropy modeling CompoundModel)
model giving all the components and parameters
- model_samplesint
Total number of wavelength points to allocate to the model display
- scalefac_residfloat
Factor multiplying the standard deviation of the residuals to adjust plot limits
- static update_dictionary(feature_dict, instrumentname, update_fwhms=False, redshift=0)[source]¶
Update parameter dictionary based on the instrument name. Based on the instrument name, this function removes the features outside of the wavelength range and updates the FWHMs of the lines.
- Parameters:
- feature_dictdictionary
Dictionary created by reading in a science pack.
- instrumentnamestring
Name of the instrument with which the input spectrum is observed.
- update_fwhms = Boolean
True for h2_info and ion_info False for df_info
- Returns:
- updated feature_dict