plesty.fss.report

What a fine-structure analysis found, as a report a reader renders without this module.

plesty.fss.FineStructure.report() returns it; the experiment saves it beside the outputs (plesty.lib.report.Report.save()). Three blocks:

  1. A sentence — how many lines were measured over which sweep, which of them split and by how much, and which did not.

  2. A table, one row per line — the line, the splitting as an energy and as a wavelength under one “Splitting” heading, the polarization axis, and the linewidth as an energy. A line whose position moves by at least its linewidth is marked: that oscillation is the fit hopping between lines, not a splitting. A splitting below SIGNIFICANCE standard errors has no axis to quote.

  3. A figure — every line’s energy shift against the rotator angle with its fitted sine, drawn by the same function as the live FineStructureView.

Attributes

SIGNIFICANCE

ROTATORS

_HOP

_UNRESOLVED

Functions

fine_structure_report(→ plesty.lib.report.Report)

Build the report of one fine-structure analysis.

_resolved(→ bool)

Whether a line's splitting is real and above SIGNIFICANCE.

_summary(→ str)

One paragraph: the sweep, the lines that split, the lines that did not.

_table(→ plesty.lib.report.Table)

One row per line, the splitting as an energy and a wavelength under one heading.

_count(→ str)

"one line", "two lines", "12 lines".

_join(→ str)

"a", "a and b", "a, b and c".

Module Contents

plesty.fss.report.SIGNIFICANCE = 3.0
plesty.fss.report.ROTATORS
plesty.fss.report._HOP = '†'
plesty.fss.report._UNRESOLVED = '‡'
plesty.fss.report.fine_structure_report(fine_structure: plesty.fss.data.FineStructureData, fit: plesty.lib.data.SpectrumFitData, *, title: str = 'Fine structure', provenance: dict[str, Any] | None = None) → plesty.lib.report.Report

Build the report of one fine-structure analysis.

Parameters:
  • fine_structure (plesty.fss.data.FineStructureData) – The analyzer’s fine_structure output.

  • fit (plesty.lib.data.SpectrumFitData) – The analyzer’s fit output.

  • title (str) – The report’s title.

  • provenance (Optional[dict[str, Any]]) – The analyzer’s stamp.

Returns:

A sentence, the table of lines, and the figure of the sweep.

Return type:

plesty.lib.report.Report

plesty.fss.report._resolved(fine_structure: plesty.fss.data.FineStructureData, index: int) → bool

Whether a line’s splitting is real and above SIGNIFICANCE.

Parameters:
Return type:

bool

plesty.fss.report._summary(fine_structure: plesty.fss.data.FineStructureData, fit: plesty.lib.data.SpectrumFitData, unit: str, rotator: str) → str

One paragraph: the sweep, the lines that split, the lines that did not.

Parameters:
Return type:

str

plesty.fss.report._table(fine_structure: plesty.fss.data.FineStructureData, unit: str, to_nm: float) → plesty.lib.report.Table

One row per line, the splitting as an energy and a wavelength under one heading.

Parameters:
Return type:

plesty.lib.report.Table

plesty.fss.report._count(number: int, noun: str) → str

"one line", "two lines", "12 lines".

Parameters:
  • number (int)

  • noun (str)

Return type:

str

plesty.fss.report._join(items: list[str]) → str

"a", "a and b", "a, b and c".

Parameters:

items (list[str])

Return type:

str