Stoner Package¶
Core
Module¶
Classes¶
Stoner.Core.StonerLoadError |
An exception thrown by the file loading routines in the Stoner Package. |
Stoner.Core.DataFile (*args, **kargs) |
Stoner.Core.DataFile is the base class object that represents |
Stoner.Core.DataArray |
A sub class of numpy.ma.MaskedArray with a copy of the setas attribute to allow indexing by name. |
Stoner.Core.typeHintedDict (*args, **kargs) |
Extends a blist.sorteddict to include type hints of what each key contains. |
Functions¶
Stoner.Core.isNone (iterator) |
Returns True if input is None or an empty iterator, or an iterator of None. |
Stoner.Core.all_size (iterator[, size]) |
Check whether each element of iterator is the same length/shape. |
Stoner.Core.all_type (iterator, typ) |
Determines if an interable omnly contains a common type. |
Analysis
Module¶
Classes¶
Stoner.Analysis.AnalyseFile (*args, **kargs) |
Stoner.Analysis.AnalyseFile extends Stoner.Core.DataFile with numpy and scipy passthrough functions. |
Functions¶
Plot
Module¶
Stoner.PlotFormats.DefaultPlotStyle (**kargs) |
Produces a default plot style. |
Stoner.Plot.PlotFile (*args, **kargs) |
Extends DataFile with plotting functions. |
Stoner.Plot.absolute_import |
|
Stoner.Plot.division |
|
Stoner.Plot.hsl2rgb (h, s, l) |
Converts from hsl colourspace to rgb colour space with numpy arrays for speed. |
Stoner.Plot.index_types |
tuple() -> empty tuple |
Stoner.Plot.int_types |
tuple() -> empty tuple |
Stoner.Plot.print_function |
|
Stoner.Plot.python_v3 |
bool(x) -> bool |
Stoner.Plot.string_types |
tuple() -> empty tuple |
Stoner.Plot.unicode_literals |
Folders
Module¶
Stoner.Folders.DataFolder (*args, **kargs) |
Implements a class that manages lists of data files (e.g. |
Stoner.Folders.PlotFolder (*args, **kargs) |
A subclass of DataFolder with extra methods for plotting lots of files. |
Stoner.Folders.absolute_import |
|
Stoner.Folders.division |
|
Stoner.Folders.index_types |
tuple() -> empty tuple |
Stoner.Folders.int_types |
tuple() -> empty tuple |
Stoner.Folders.print_function |
|
Stoner.Folders.python_v3 |
bool(x) -> bool |
Stoner.Folders.string_types |
tuple() -> empty tuple |
Stoner.Folders.unicode_literals |
FileFormats
Module¶
Generic Fomats¶
CSVFile (*args, **kargs) |
A subclass of DataFiule for loading generic deliminated text fiules without metadata. |
SPCFile (*args, **kargs) |
Extends DataFile to load SPC files from Raman |
TDMSFile (*args, **kargs) |
A first stab at writing a file that will import TDMS files |
OVFFile (*args, **kargs) |
A class that reads OOMMF vector format files and constructs x,y,z,u,v,w data. |
EasyPlotFile (*args, **kargs) |
A class that will extract as much as it can from an EasyPlot save File. |
Instrument Formats¶
BigBlueFile (*args, **kargs) |
Extends CSVFile to load files from BigBlue |
FmokeFile (*args, **kargs) |
Extends DataFile to open Fmoke Files |
QDSquidVSMFile (*args, **kargs) |
Extends DataFile to load files from The SQUID VSM |
RigakuFile (*args, **kargs) |
Loads a .ras file as produced by Rigaku X-ray diffractormeters |
VSMFile (*args, **kargs) |
Extends DataFile to open VSM Files |
MokeFile (*args, **kargs) |
Class that extgends DataFile to load files from the Leeds MOKE system. |
XRDFile (*args, **kargs) |
Loads Files from a Brucker D8 Discovery X-Ray Diffractometer |
LSTemperatureFile (*args, **kargs) |
A class that reads and writes Lakeshore Temperature Calibration Curves. |
Facility Outputs¶
BNLFile (*params) |
Creates BNLFile a subclass of DataFile that caters for files in the SPEC format given by BNL (specifically u4b beamline but hopefully generalisable). |
MDAASCIIFile (*args, **kargs) |
Reads files generated from the APS. |
OpenGDAFile (*args, **kargs) |
Extends DataFile to load files from RASOR |
RasorFile (*args, **kargs) |
Just an alias for OpenGDAFile |
SNSFile (*args, **kargs) |
This reads the ASCII exported Poalrised Neutron Rfeflectivity reduced files from BL-4A line at the Spallation Neutron Source at Oak Ridge National Lab. |
SLS_STXMFile |
PlotFormats
Module¶
Classes¶
Stoner.PlotFormats.DefaultPlotStyle (**kargs) |
Produces a default plot style. |
Stoner.PlotFormats.GBPlotStyle (**kargs) |
Template developed for Gavin’s plotting. |
Stoner.PlotFormats.JTBPlotStyle (**kargs) |
Template class for Joe’s Plot settings. |
Stoner.PlotFormats.JTBinsetStyle (**kargs) |
Template class for Joe’s Plot settings. |
Stoner.PlotFormats.PRBPlotStyle (**kargs) |
A figure Style for making figures for Phys Rev * Jounrals. |
Stoner.PlotFormats.SketchPlot (**kargs) |
Turn on xkcd plot style. |
Stoner.PlotFormats.TexEngFormatter ([unit, ...]) |
An axis tick label formatter that emits Tex formula mode code so that large numbers are registered as times 10^{power} rather than ysing E notation. |
Stoner.PlotFormats.TexFormatter |
An axis tick label formatter that emits Tex formula mode code so that large numbers are registered as times 10^{power} rather than ysing E notation. |
Stoner.PlotFormats.ThesisPlotStyle (**kargs) |
Template class for Joe’s Plot settings. |
Functions¶
Stoner.PlotFormats.normal ([loc, scale, size]) |
Draw random samples from a normal (Gaussian) distribution. |
See also the stylesheets available in the stylelib directory.
plotutils
Module¶
Classes¶
Functions¶
Stoner.plotutils.errorfill (x, y[, yerr, ...]) |
Plot data with errors marked by a filled region. |
Fit
Module¶
lmfit Model Classes¶
Stoner.Fit.Arrhenius (*args, **kwargs) |
Arrhenius Equation without T dependendent prefactor. |
Stoner.Fit.BDR (*args, **kwargs) |
BDR model tunnelling. |
Stoner.Fit.BlochGrueneisen (*args, **kwargs) |
BlochGrueneiseen Function for fitting R(T). |
Stoner.Fit.FluchsSondheimer (*args, **kwargs) |
Evaluate a Fluchs-Sondheumer model function for conductivity. |
Stoner.Fit.FowlerNordheim (*args, **kwargs) |
Fowler Nordhiem Model of electron tunnelling. |
Stoner.Fit.KittelEquation (*args, **kwargs) |
Kittel Equation for finding ferromagnetic resonance peak in frequency with field. |
Stoner.Fit.Langevin (*args, **kwargs) |
“The Langevin function for paramagnetic M-H loops/ |
Stoner.Fit.ModArrhenius (*args, **kwargs) |
Arrhenius Equation with a variable T power dependent prefactor. |
Stoner.Fit.NDimArrhenius (*args, **kwargs) |
Arrhenius Equation without T dependendent prefactor for various dimensions. |
Stoner.Fit.Simmons (*args, **kwargs) |
Simmons model of electron tunnelling. |
Stoner.Fit.StretchedExp (*args, **kwargs) |
A stretched exponential fuinction. |
Stoner.Fit.Strijkers (*args, **kwargs) |
strijkers Model for point-contact Andreev Reflection Spectroscopy. |
Stoner.Fit.TersoffHammann (*args, **kwargs) |
TersoffHamman model for tunnelling through STM tip. |
Stoner.Fit.VFTEquation (*args, **kwargs) |
Vogel-Flucher-Tammann (VFT) Equation without T dependendent prefactor. |
Stoner.Fit.WLfit (*args, **kwargs) |
Weak localisation |
Bare functions¶
Stoner.Fit.arrhenius (x, A, DE) |
Arrhenius Equation without T dependendent prefactor. |
Stoner.Fit.bdr (V, A, phi, dphi, d, mass) |
BDR model tunnelling. |
Stoner.Fit.blochGrueneisen (T, thetaD, rho0, A, n) |
BlochGrueneiseen Function for fitting R(T). |
Stoner.Fit.cfg_data_from_ini (inifile[, filename]) |
Read an inifile and load and configure a DataFile from it. |
Stoner.Fit.cfg_model_from_ini (inifile[, ...]) |
Utility function to configure an lmfit Model from an inifile. |
Stoner.Fit.fluchsSondheimer (t, l, p, sigma_0) |
Evaluate a Fluchs-Sondheumer model function for conductivity. |
Stoner.Fit.fowlerNordheim (V, A, phi, d) |
Fowler Nordhiem Model of electron tunnelling. |
Stoner.Fit.kittelEquation (H, gamma, M_s, H_k) |
Kittel Equation for finding ferromagnetic resonance peak in frequency with field. |
Stoner.Fit.langevin (H, M_s, m, T) |
“The Langevin function for paramagnetic M-H loops/ |
Stoner.Fit.linear (x, intercept, slope) |
Simple linear function |
Stoner.Fit.modArrhenius (x, A, DE, n) |
Arrhenius Equation with a variable T power dependent prefactor. |
Stoner.Fit.nDimArrhenius (x, A, DE, n) |
Arrhenius Equation without T dependendent prefactor for various dimensions. |
Stoner.Fit.powerLaw (x, A, k) |
Power Law Fitting Equation. |
Stoner.Fit.quadratic (x, a, b, c) |
A Simple quadratic fitting function. |
Stoner.Fit.simmons (V, A, phi, d) |
Simmons model of electron tunnelling. |
Stoner.Fit.stretchedExp (x, A, beta, x_0) |
A stretched exponential fuinction. |
Stoner.Fit.strijkers (V, omega, delta, P, Z) |
strijkers Model for point-contact Andreev Reflection Spectroscopy. |
Stoner.Fit.tersoffHammann (V, A) |
TersoffHamman model for tunnelling through STM tip. |
Stoner.Fit.vftEquation (x, A, DE, x_0) |
Vogel-Flucher-Tammann (VFT) Equation without T dependendent prefactor. |
Stoner.Fit.wlfit (B, s0, DS, B1, B2) |
Weak localisation |
The following modules offer specialised file and foler formats.
HDF5
Module¶
Stoner.HDF5.HDF5File (*args, **kargs) |
A sub class of DataFile that sores itself in a HDF5File or group. |
Stoner.HDF5.HDF5Folder (*args, **kargs) |
A sub class of Stoner.Folders.DataFolder that provides a method to load and save data from a single HDF5 file with groups. |
Stoner.HDF5.HGXFile (*args, **kargs) |
A subclass of DataFile for reading GenX HDF Files. |
Stoner.HDF5.SLS_STXMFile (*args, **kargs) |
Load images from the Swiss Light Source Pollux beamline. |
Stoner.HDF5.absolute_import |
|
Stoner.HDF5.division |
|
Stoner.HDF5.index_types |
tuple() -> empty tuple |
Stoner.HDF5.int_types |
tuple() -> empty tuple |
Stoner.HDF5.print_function |
|
Stoner.HDF5.python_v3 |
bool(x) -> bool |
Stoner.HDF5.string_types |
tuple() -> empty tuple |
Stoner.HDF5.unicode_literals |
Zip
Module¶
Classes¶
Stoner.Zip.ZipFile (*args, **kargs) |
A sub class of DataFile that sores itself in a zip file. |
Stoner.Zip.ZipFolder (*args, **kargs) |
A sub class of Stoner.Folders.DataFolder that provides a method to load and save data from a single Zip file. |
Functions¶
Stoner.Zip.test_is_zip (filename[, member]) |
Recursively searches for a zipfile in the tree. |
Util
Module¶
Classes¶
Stoner.Util.Data (*args, **kargs) |
A merged class of AnalyseFile and PlotFile which also has the FielFormats loaded redy for use. |
Functions¶
Stoner.Util.format_error (value, error[, ...]) |
This handles the printing out of the answer with the uncertaintly to 1sf and the value to no more sf’s than the uncertainty. |
Stoner.Util.format_error (value, error[, ...]) |
This handles the printing out of the answer with the uncertaintly to 1sf and the value to no more sf’s than the uncertainty. |
Stoner.Util.hysteresis_correct (data, **kargs) |
Peform corrections to a hysteresis loop. |
Stoner.Util.ordinal (value) |
Format an integer into an ordinal string. |
Stoner.Util.split_up_down (data[, col, folder]) |
Splits the DataFile data into several files where the column col is either rising or falling |