Hyperfine Model¶
The hyperfine line modeling tool is a generic tool for modeling hyperfine lines. Given a list of hyperfine line separations and weights, it will treat the full set of lines as a single component when fitting. There are many options for the free parameters, as illustrated below:
Module API¶
- class pyspeckit.spectrum.models.hyperfine.hyperfinemodel(line_names, voff_lines_dict, freq_dict, line_strength_dict, relative_strength_total_degeneracy)[source] [github] [bitbucket]¶
Wrapper for the hyperfine model class. Specify the offsets and relative strengths when initializing, then you’ve got yourself a hyperfine modeler.
There are a wide variety of different fitter attributes, each designed to free a different subset of the parameters. Their purposes should be evident from their names.
Initialize the various parameters defining the hyperfine transitions
- Parameters
line_names: list :
list of the line names to be used as indices for the dictionaries
voff_lines_dict: dict :
a linename:v_off dictionary of velocity offsets for the hyperfine components. Technically, this is redundant with freq_dict
freq_dict: dict :
frequencies of the indvidual transitions
line_strength_dict: dict :
Relative strengths of the hyperfine components, usually determined by their degeneracy and Einstein A coefficients
- hyperfine(xarr, Tex=5.0, tau=0.1, xoff_v=0.0, width=1.0, return_hyperfine_components=False, Tbackground=2.73, amp=None, return_tau=False, tau_total=None, vary_hyperfine_tau=False, vary_hyperfine_width=False)[source] [github] [bitbucket]¶
Generate a model spectrum given an excitation temperature, optical depth, offset velocity, and velocity width.
- Parameters
return_tau : bool
If specified, return just the tau spectrum, ignoring Tex
tau_total : bool
If specified, use this instead of tau, and it tries to normalize to the peak of the line
vary_hyperfine_tau : bool
If set to true, allows the hyperfine transition amplitudes to vary and does not use the line_strength_dict. If set,
tau
must be a dict
- hyperfine_addbackground(xarr, Tbackground=2.73, Tex=5.0, tau=0.1, xoff_v=0.0, width=1.0, return_tau=False, **kwargs)[source] [github] [bitbucket]¶
Identical to hyperfine, but adds Tbackground as a constant continuum level
- hyperfine_amp(xarr, amp=None, xoff_v=0.0, width=1.0, return_hyperfine_components=False, Tbackground=2.73, Tex=5.0, tau=0.1)[source] [github] [bitbucket]¶
wrapper of self.hyperfine with order of arguments changed
- hyperfine_background(xarr, Tbackground=2.73, Tex=5.0, tau=0.1, xoff_v=0.0, width=1.0, return_tau=False, **kwargs)[source] [github] [bitbucket]¶
Identical to hyperfine, but with Tbackground free. Assumes already background-subtracted
- hyperfine_tau(xarr, tau, xoff_v, width, **kwargs)[source] [github] [bitbucket]¶
same as hyperfine, but with arguments in a different order, AND tau is returned instead of exp(-tau)
- hyperfine_tau_total(xarr, tau_total, xoff_v, width, **kwargs)[source] [github] [bitbucket]¶
same as hyperfine, but with arguments in a different order, AND tau is returned instead of exp(-tau), AND the peak tau is used
- hyperfine_varyhf(xarr, Tex, xoff_v, width, *args, **kwargs)[source] [github] [bitbucket]¶
Wrapper of hyperfine for using a variable number of peaks with specified tau
- hyperfine_varyhf_amp(xarr, xoff_v, width, *args, **kwargs)[source] [github] [bitbucket]¶
Wrapper of hyperfine for using a variable number of peaks with specified amplitude (rather than tau). Uses some opaque tricks: Tex is basically ignored, and return_tau means you’re actually returning the amplitude, which is just passed in as tau
- hyperfine_varyhf_amp_width(xarr, xoff_v, *args, **kwargs)[source] [github] [bitbucket]¶
Wrapper of hyperfine for using a variable number of peaks with specified amplitude (rather than tau). Uses some opaque tricks: Tex is basically ignored, and return_tau means you’re actually returning the amplitude, which is just passed in as tau