mcalf.visualisation.plot_spectrum(wavelengths, spectrum, normalised=True, smooth=True, ax=None)[source]

Plot a spectrum with the wavelength grid shown.

Intended for plotting the raw data.

  • wavelengths (numpy.ndarray) – The x-axis values.

  • spectrum (numpy.ndarray, length=n_wavelengths) – The y-axis values.

  • normalised (bool, optional, default=True) – Whether to normalise the spectrum using the last three spectral points.

  • smooth (bool, optional, default=True) – Whether to smooth the spectrum with a spline.

  • ax (matplotlib.axes.Axes, optional, default=None) – Axes into which the fit will be plotted. Defaults to the current axis of the current figure.


ax – Axes the lines are drawn on.

Return type:



Using IBIS8542Model

Using IBIS8542Model

Plot a fitted spectrum

Plot a fitted spectrum

Plot a spectrum

Plot a spectrum