epraya.Sload#
- Sload(dat, rows, cols)#
Basic function for data load of counts and fields, using the np.loadtxt function.
- Parameters:
dat (str) – Name of the data field.
rows (int) – Number of rows to load
cols (list) – List of two values with the field and count data [field, count].
- Returns:
field (np.array) – Array of the magnetic field values.
rcount (np.array) – Array of the counts values.
Example
import epraya as epr import matplotlib.pyplot as plt B,spc=epr.Sload('STRONG PITCH.dat',2046,[2,3]) plt.plot(B,spc) plt.xlabel('Magnetic field [mT]') plt.ylabel('Counts [A. U.]') plt.grid() plt.show()