smpl.data

Simplified internal data parsing and transforming.

data_kwargs(kwargs)

Set default data_kwargs if not set.

filtered_data_split(datax, datay, **kwargs)

Splits datax and datay into (x,y,xerr,yerr).

flatmesh(*args)

Similar to numpy.meshgrid but the result will be of one dimension instead of stacked arrays.

Functions

smpl.data.data_kwargs(kwargs)[source]

Set default data_kwargs if not set.

data_kwargs

default

description

frange

None

Limit the fit to given range. First integer is the lowest and second the highest index.

fselector

None

Function that takes x and y as parameters and returns an array mask in order to limit the data points for fitting. Alternatively a mask for selecting elements from datax and datay.

sortbyx

True

Enable sorting the x and y data so that x is sorted.

bins

0

Number of bins for histogram

binunc

poisson_dist

Number of bins for histogram

xerror

True

enable xerrors

yerror

True

enable yerrors

smpl.data.filtered_data_split(datax, datay, **kwargs)[source]

Splits datax and datay into (x,y,xerr,yerr). Applies filters fselector and frange.

(x,y,xerr,yerr)tuple

four arrays with specified values.

**kwargsoptional

see data_kwargs().

smpl.data.flatmesh(*args)[source]

Similar to numpy.meshgrid but the result will be of one dimension instead of stacked arrays.