API Reference

xaspy package

xaspy.xas module

class xaspy.xas.xas.group(name=None, **kws)

Bases: object

Group: a container for variables, modules, and subgroups. heavy influenced by xraylarch https://github.com/xraypy/xraylarch

xaspy.utils module

xaspy.utils.utils.center(a: float, b: float) int

get position a and b, returns center between them

Arguments

a = number, can be float, should be index-like b = number, can be float, should be index-like

Returns

c = center between a and b as int

Notes

no notes

xaspy.utils.utils.cumtrapz(signal: ndarray, energy: ndarray = None)

Calculates the cumulative trapezoidal integration of y with respect to x.

Args:

signal: The y-values to integrate. energy: (Optional) The x-values. If None, it defaults to range(len(y)).

Returns:

A NumPy array containing the cumulative trapezoidal integration.

class xaspy.utils.utils.get_scan_metadata(file)

Bases: object

energy(df)

get properties of energy steps

field(df)

get properties of magnetic field

sample_position(df)

get x,y,z coordinates for sample determination, and angle

temperature(df)

get properties of temperature sensor Temp B

xaspy.utils.utils.showspeccom(a)

a = SPEC file returns list with commands/comments #C and #S

xaspy.utils.utils.toggle(**kws)
removed in version 0.2.1:

toggles cell in Jupyter notebook; makes button with label ‘a’