From: SpinSPJ: a novel NMR scripting system to implement artificial intelligence and advanced applications
Function name | Description | Example |
---|---|---|
Instrument control | ||
aij(n) | Inject a sample, The sample number is “n” | aij(2) |
alock() | Lock the field automatically | alock() |
stm(nucleus) | Automatic tuning and matching | stm('H1') |
smartmapshim() | Create a gradient shim map and perform the shimming | smartmapshim() |
smartshim() | Perform the gradient shimming using the existing field map | smartshim() |
searchshim(algorithm, evaluation, channels, iteration) | Searching for better shim values with an algorithm | searchshim('simplex', 'FIDArea', 'z1-z2', 50) |
vartemp(target, timeout) | Vary temperature to “target” celsius degree within “timeout” seconds | vartemp(35.5, 240) |
spin(target, timeout) | Rotate the sample with the spin rate of “target” Hz within “timeout” seconds | spin(20, 200) |
setshimvalue(channel, value) | Set the shim value of shim coil in “channel” | setshimvalue('z1', 1000) |
go() | Start the data acquisition | go() |
Data processing | ||
setactws(path) | Set the active workspace | setactws('D:/1.nmr') |
setparam(name, value) | Set the value of parameter of the active workspace | setparam('ns', 4) |
getfid(path) | Get the FID data of the workspace whose storage path is “path” | getfid('D:/1.nmr') |
getspec(path) | Get the spectrum data of the workspace whose storage path is “path” | getspec('D:/1.nmr') |
setspec(path, data) | Set the spectrum data of the workspace whose storage path is “path” | setspec('D:/1.nmr', data) |
wft() | Perform the data processing with weighting and Fourier transform | wft() |
Original CPython libraries | ||
np.multiply(a, b) | Matrix multiplication | np.multiply(a, b) |
np.median(a) | Compute median of an array | np.median(a) |
plt.plot(x, y) | Draw a curve | plt.plot(x, y) |
scipy.optimize.curve_fit (func, x, y) | Compute curve fitting | scipy.optimize.curve_fit(func, x, y) |