calamari.plot.chi_series#
- calamari.plot.chi_series(measurement, *, x='temperature', field_unit='oe', component='real', units='emu_per_oe', sample=None, source='auto', inverse=False, label=None)#
Resolve a susceptibility-vs-T (or vs-H) request into PlotSeries.
The resolution half of
plot_chi_vs_t()/plot_chi_vs_h()– everything except the drawing, returned as arrays so a caller can plot, fit or export them directly.The source is never silently conflated. An AC susceptibility (
chi', from the file’s own AC columns) and a DCM/Hare different measurements of related quantities.source='auto'picks whichever the file offers, stamps the provenance into the y-label ($\chi'$vs$M/H$), and refuses – naming both options – when a file offers both, rather than guessing.A file measured at more than one AC frequency returns one series per frequency, labelled
f = <value> Hz, instead of one series zigzagging between them.- Parameters:
measurement (
Measurement) – The loaded file.x (
str) – Which axis to resolve against. Default'temperature'.field_unit (
str) – Forx='field': the unit ofPlotSeries.xand its label.'oe'(the default) is the file’s native unit;'tesla'is mu0 H fromfield_tesla, the unit the family legends, the 2-D maps and the transition table’sH_Talready use. Only the axis changes: a DCM/His stillmoment_emu / field_oe, in emu/Oe. Any value other than the default is refused withx='temperature'.component (
str) –'real'for chi’ (or M/H),'imag'for chi’’. (The drawing layer’scomponent='both'is two calls to this function.)units (
str) –'emu_per_oe'is the file’s own extensive quantity; the others needsampleand convert via theSample.chi_to_chi_*methods. The axis label spells the exact unit.sample (
Sample|None) – Required for everyunitsother than'emu_per_oe'.source (
str) –'ac'readschi_real/chi_imag;'dc'computesmoment_emu / field_oe(component='real'only – a DC measurement has no out-of-phase part; rows at exactly zero field become NaN and are dropped, since M/H means nothing there).'auto'picks the one the file offers and refuses if both.inverse (
bool) – Return1/chi(for Curie-Weiss analysis): values inverted (chi = 0becomes NaN and is dropped), errors propagated asyerr/chi**2, symbol and unit labels reciprocated.label (
str|None) – Base legend label; a frequency suffix is appended when the file splits by frequency.
- Return type:
- Returns:
listofPlotSeries– One entry per AC frequency present (one entry total for a single-frequency or DC file).- Raises:
PlotInputError – For an unknown
x/field_unit/component/units/source;field_unit='tesla'withx='temperature'; aunitsneeding a Sample without one; a source the file cannot supply; orsource='auto'when the file offers both.AmbiguousColumnError – Propagated from
moment_emu(source='dc') when more than one moment column carries data – choose withwith_momentorof_typefirst, exactly as when reading the accessor yourself.