plot_ibis8542¶
-
mcalf.visualisation.
plot_ibis8542
(wavelengths, spectrum, fit=None, background=0, sigma=None, sigma_scale=70, stationary_line_core=None, subtraction=False, separate=False, output=None, figsize=None, legend_position='best', dpi=None, fontfamily=None, reduced_legend=False, show_intensity=True, hook=None)[source]¶ Plot an IBIS8542Model fit
It is recommended to use the plot method on either an IBIS8542Model or a FitResult from an IBIS8542Model instead.
- Parameters
wavelengths (ndarray) – The x-axis values.
spectrum (ndarray, length=n_wavelengths) – The y-axis values.
fit (array_like, optional, default = None) – The fitted parameters.
background (float or ndarray of length n_wavelengths, optional, default = 0) – The background to add to the fitted profiles.
sigma (ndarray, length=n_wavelengths, optional, default = None) – The sigma profile used when fitting the parameters to spectrum. If given, will be plotted as shaded regions.
sigma_scale (float, optional, default = 70) – A factor to multiply the error bars to change their prominence.
stationary_line_core (float, optional, default = None) – If given, will show a dashed line at this wavelength.
subtraction (bool, optional, default = False) – Whether to plot the spectrum minus emission fit (if exists) instead.
separate (bool, optional, default = False) – Whether to plot the fitted profiles separately (if multiple components exist).
output (str, optional, default = None) – If present, the filename to save the plot as.
figsize (2-tuple, optional) – Size of the figure.
legend_position (str or int or pair of floats, optional, default = 'best') – Position of the legend. See matplotlib.pyplot.legend documentation from possible values.
dpi (int) – The number of dots per inch. For controlling the quality of the outputted figure.
fontfamily (str, optional, default = None) – If provided, this family string will be added to the ‘font’ rc params group.
reduced_legend (bool, optional, default = False) – Whether to add to the legend the labels that would be displayed on an absorption only plot. Useful for saving space when plotting both a single component fit and a multi-component fit alongside each other.
show_intensity (bool, optional, default = True) – Whether to show the intensity axis tick labels and axis label.
hook (callable, optional, default = None) – If provided this function must accept the current `plt’ as a single argument such that it can operate upon it and make changes to the plot.
See also
models.IBIS8542.plot()
General plotting method
models.IBIS8542.plot_separate()
Plot the fit parameters separately
models.IBIS8542.plot_subtraction()
Plot the spectrum with the emission fit subtracted from it
models.FitResult.plot()
Plotting method on the fit result