High-Level Functions

xrayphysics.xrayPhysics.about(self)

Prints info about this package, including the version number

xrayphysics.xrayPhysics.use_mm(self)

Call this function so that all units that use lengths are mm-based

The documentation of all functions in this class is written so that the arguments and return values are cm-based, but if this function is called one should assume that all function arguments and return values are mm-based.

xrayphysics.xrayPhysics.use_cm(self)

Call this function so that all units that use lengths are cm-based (this is the default setting)

xrayphysics.xrayPhysics.resample(self, gammas, s, gammas_out)

Resamples the binning array on which a spectra is defined

Parameters:
  • gammas (numpy array) – the energy samples (keV) of the given spectra

  • s (numpy array) – the given spectra to resample

  • gammmas_out (numpy array) – the energy samples (keV) to rebin to

Returns:

resampled spectra