calamari.simulate.synthetic_chi_peak#
- calamari.simulate.synthetic_chi_peak(x, centre, width, height, background=0.0, noise=0.0, rng=None)#
A Gaussian peak on a flat background, for transition-detection tests.
Stands in for a localised feature in a swept quantity – e.g. a chi’(H) peak at a metamagnetic transition, or a chi(T) peak at an ordering temperature – used to plant a known feature location for
calamari.transitions.find_transitions()to recover.- Parameters:
x (
ArrayLike) – Independent variable (field or temperature, in the caller’s units).centre (
float) – Peak centre, same units asx.width (
float) – Gaussian standard deviation, same units asx.height (
float) – Peak height abovebackground.background (
float) – Flat background level. Default 0.noise (
float) – Standard deviation of additive Gaussian noise, same units asheight. Default 0 (no noise, andrngmay then be omitted).rng (
Generator|None) – Required whennoise > 0; seesynthetic_mh_curve().
- Return type:
- Returns:
numpy.ndarray– y(x), same shape asx.- Raises:
ValueError – If
noise > 0andrngis None.