plesty.fss.energy ================= .. py:module:: plesty.fss.energy .. autoapi-nested-parse:: A line's position as a photon-energy shift, which is what a splitting is. A fine-structure splitting is an energy, and the wavelengths it separates differ in the fourth decimal place: 775.2000 nm and 775.2013 nm are 2.7 µeV apart. Plotted in nanometres that is a flat line; plotted as a shift from the line's mean position, in µeV, it is the measurement. Both the report figures (:mod:`plesty.fss.plot`) and the live views (:mod:`plesty.fss.monitor`) draw that shift, so the conversion lives here rather than in either of them. Attributes ---------- .. autoapisummary:: plesty.fss.energy.MICRO Functions --------- .. autoapisummary:: plesty.fss.energy.energy_shift_uev plesty.fss.energy.energy_error_uev Module Contents --------------- .. py:data:: MICRO :value: 1000000.0 .. py:function:: energy_shift_uev(centers: numpy.ndarray, mean: float, to_nm: float = 1.0) -> numpy.ndarray Photon-energy shifts in µeV of line positions from a mean position. :param centers: Fitted line positions. :param mean: The position they are measured from, in the same unit. :param to_nm: Factor converting that unit to nanometres — 1.0 when the positions are already in nm. :returns: One shift per position; positive where the line sits at higher energy (shorter wavelength) than *mean*. .. py:function:: energy_error_uev(errors: numpy.ndarray, centers: numpy.ndarray, to_nm: float = 1.0) -> numpy.ndarray One-sigma energy errors in µeV of line positions with wavelength errors *errors*. :param errors: One-sigma error of each fitted position. :param centers: The fitted positions themselves, in the same unit. :param to_nm: Factor converting that unit to nanometres. :returns: One error per position.