calamari.simulate.synthetic_mh_curve#
- calamari.simulate.synthetic_mh_curve(field_oe, m_sat_emu, h_knee_oe, noise=0.0, rng=None)#
A saturating M(H) curve:
m_sat_emu * tanh(H / h_knee_oe).This reversible toy curve exercises fitting and unit conversion; it models neither hysteresis nor a particular material. Convert its saturation moment with
Sample.moment_emu_to_muB_per_ion; this is distinct from the effective moment inferred from a Curie constant.h_knee_oesets the characteristic saturation field.- Parameters:
field_oe (
ArrayLike) – Applied field in Oe (may be negative).m_sat_emu (
float) – Saturation moment in emu.h_knee_oe (
float) – Characteristic field (Oe) at which the curve is withintanh(1) ~ 0.76of saturation.noise (
float) – Standard deviation (emu) of additive Gaussian noise. Default 0 (no noise, andrngmay then be omitted).rng (
Generator|None) – Required whennoise > 0– there is no implicit unseeded fallback, so every noisy call is reproducible by construction.
- Return type:
- Returns:
numpy.ndarray– M(H) in emu, same shape asfield_oe.- Raises:
ValueError – If
noise > 0andrngis None.