calamari.plot.moment_series#
- calamari.plot.moment_series(measurement, *, x='field', field_unit='oe', units='emu', sample=None, split_branches=False, label=None)#
Resolve a moment-vs-H (or vs-T) request into PlotSeries.
The resolution half of
plot_mh()/plot_mt(). Rows are kept in file order – never sorted by field – so a hysteresis loop’s branches survive; housekeeping rows are excluded and NaN rows dropped exactly as inchi_series().- Parameters:
measurement (
Measurement) – The loaded file.x (
str) – Which axis to resolve against. Default'field'.field_unit (
str) – Forx='field': field in Oe (the default, the file’s native unit) or as mu0 H in Tesla – seechi_series(). Branches split at the same points in either unit. Any value other than the default is refused withx='temperature'.units (
str) – Moment units; themuBforms needsample.split_branches (
bool) – Forx='field': return one series per monotonic sweep segment (virgin curve, descending branch, ascending branch, …), each labelledbranch <n> (up|down)so a legend can name them. Consecutive branches share their turning point, so they still draw as a connected loop. A sweep with no reversal returns one plainly-labelled series, so the flag is safe to set universally.label (
str|None) – Base legend label; the branch suffix is appended when splitting.
- Return type:
- Returns:
listofPlotSeries- Raises:
PlotInputError – For an unknown
x,field_unitorunits; aunitsneeding a Sample without one;split_branchesorfield_unit='tesla'withx='temperature'; or a missing column.AmbiguousColumnError – Propagated from
moment_emuwhen more than one moment column carries data.