calamari.fitting.models.linear#

calamari.fitting.models.linear(x, slope, intercept)#

Straight line y = slope * x + intercept.

A general-purpose baseline model – e.g. a linear background under a feature, or a high-field M(H) slope used to subtract a paramagnetic or diamagnetic contribution before reading a saturation moment.

Parameters:
  • x (ArrayLike) – Independent variable.

  • slope (float) – Line coefficients.

  • intercept (float) – Line coefficients.

Return type:

NDArray[double]

Returns:

numpy.ndarray – y at each x.