diff --git a/Stoner/Analysis.py b/Stoner/Analysis.py
index 512a04406..c22ea08de 100755
--- a/Stoner/Analysis.py
+++ b/Stoner/Analysis.py
@@ -17,7 +17,6 @@
class AnalysisMixin:
-
"""A mixin calss designed to work with :py:class:`Stoner.Core.DataFile` to provide additional analysis methods."""
def __dir__(self):
diff --git a/Stoner/Core.py b/Stoner/Core.py
index 99f54fc6c..a75ba7392 100755
--- a/Stoner/Core.py
+++ b/Stoner/Core.py
@@ -1,4 +1,5 @@
"""Stoner.Core provides the core classes for the Stoner package."""
+
__all__ = [
"StonerLoadError",
"StonerSetasError",
@@ -64,7 +65,6 @@ class DataFile(
metadataObject,
MutableSequence,
):
-
"""Base class object that represents a matrix of data, associated metadata and column headers.
Attributes:
diff --git a/Stoner/Folders.py b/Stoner/Folders.py
index 8d3773b11..055499b25 100755
--- a/Stoner/Folders.py
+++ b/Stoner/Folders.py
@@ -2,6 +2,7 @@
The core classes provides a means to access them as an ordered collection or as a mapping.
"""
+
__all__ = ["DataFolder", "PlotFolder"]
from Stoner.tools import make_Data
@@ -11,7 +12,6 @@
class DataFolder(DataMethodsMixin, DiskBasedFolderMixin, baseFolder):
-
"""Provide an interface to manipulating lots of data files stored within a directory structure on disc.
By default, the members of the DataFolder are instances of :class:`Stoner.Data`. The DataFolder emplys a lazy
@@ -28,5 +28,4 @@ def __init__(self, *args, **kargs):
class PlotFolder(PlotMethodsMixin, DataFolder):
-
"""A :py:class:`Stoner.folders.baseFolder` that knows how to ploth its underlying data files."""
diff --git a/Stoner/HDF5.py b/Stoner/HDF5.py
index 1587d8729..196c91ef2 100755
--- a/Stoner/HDF5.py
+++ b/Stoner/HDF5.py
@@ -9,6 +9,7 @@
to :py:class:`Stoner.Core.Data`.
"""
+
__all__ = ["HDF5File", "HDF5Folder", "HGXFile", "SLS_STXMFile", "STXMImage", "HDFFileManager"]
import importlib
import os.path as path
@@ -52,7 +53,6 @@ def get_hdf_loader(f, default_loader=lambda *args, **kargs: None):
class HDFFileManager:
-
"""Context manager for HDF5 files."""
def __init__(self, filename, mode="r"):
@@ -115,7 +115,6 @@ def __exit__(self, _type, _value, _traceback):
class HDF5File(DataFile):
-
"""A sub class of DataFile that sores itself in a HDF5File or group.
Args:
@@ -287,7 +286,6 @@ def to_hdf(self, filename=None, **kargs): # pylint: disable=unused-argument
class HGXFile(DataFile):
-
"""A subclass of DataFile for reading GenX HDF Files.
These files typically have an extension .hgx. This class has been based on a limited sample
@@ -372,7 +370,6 @@ def main_data(self, data_grp):
class HDF5FolderMixin:
-
"""Provides a method to load and save data from a single HDF5 file with groups.
See :py:class:`Stoner.Folders.DataFolder` for documentation on constructor.
@@ -568,7 +565,6 @@ def save(self, root=None):
class HDF5Folder(HDF5FolderMixin, DataFolder):
-
"""Just enforces the loader attriobute to be an HDF5File."""
def __init__(self, *args, **kargs):
@@ -578,7 +574,6 @@ def __init__(self, *args, **kargs):
class SLS_STXMFile(DataFile):
-
"""Load images from the Swiss Light Source Pollux beamline."""
priority = 16
@@ -671,7 +666,6 @@ def scan_meta(self, group):
class STXMImage(ImageFile):
-
"""An instance of KerrArray that will load itself from a Swiss Light Source STXM image."""
# pylint: disable=no-member
diff --git a/Stoner/Image/attrs.py b/Stoner/Image/attrs.py
index d6d4e864b..7c5b0b086 100755
--- a/Stoner/Image/attrs.py
+++ b/Stoner/Image/attrs.py
@@ -47,7 +47,6 @@ def _proxy(self, *args, **kargs):
@class_modifier(draw, adaptor=_draw_apaptor, RTD_restrictions=False, no_long_names=True)
class DrawProxy:
-
"""Provides a wrapper around :py:mod:`skimage.draw` to allow easy drawing of objects onto images.
This class allows access the user to draw simply shapes on an image (or its mask) by specifying the desired shape
@@ -205,7 +204,6 @@ def square(self, r, c, w, angle=0.0, shape=None, value=1.0):
class MaskProxy:
-
"""Provides a wrapper to support manipulating the image mask easily.
The actual mask of a :py:class:`Stonmer.ImageFile` is held by the mask attribute of the underlying
diff --git a/Stoner/Image/core.py b/Stoner/Image/core.py
index 0babdc206..7ea9267fa 100755
--- a/Stoner/Image/core.py
+++ b/Stoner/Image/core.py
@@ -151,7 +151,6 @@ def copy_into(source: "ImageFile", dest: "ImageFile") -> "ImageFile":
@class_modifier([ndi], transpose=True)
@class_modifier(imagefuncs, overload=True)
class ImageArray(np.ma.MaskedArray, metadataObject):
-
"""A numpy array like class with a metadata parameter and pass through to skimage methods.
ImageArray is for manipulating images stored as a 2d numpy array.
@@ -701,7 +700,6 @@ def save(self, filename=None, **kargs):
@class_modifier(imagefuncs, overload=True, adaptor=image_file_adaptor)
@class_wrapper(target=ImageArray, exclude_below=metadataObject)
class ImageFile(metadataObject):
-
"""An Image file type that is analogous to :py:class:`Stoner.Data`.
This contains metadata and an image attribute which
diff --git a/Stoner/Image/folders.py b/Stoner/Image/folders.py
index e23631ed4..c25524d43 100755
--- a/Stoner/Image/folders.py
+++ b/Stoner/Image/folders.py
@@ -19,7 +19,6 @@
class ImageFolderMixin:
-
"""Mixin to provide a folder object for images.
ImageFolderMixin is designed to behave pretty much like DataFolder but with
@@ -474,7 +473,6 @@ def to_tiff(self, filename):
class ImageFolder(ImageFolderMixin, DiskBasedFolderMixin, baseFolder):
-
"""Folder object for images.
ImageFolder is designed to behave pretty much like DataFolder but with
diff --git a/Stoner/Image/kerr.py b/Stoner/Image/kerr.py
index 8bc52689a..833686ccc 100755
--- a/Stoner/Image/kerr.py
+++ b/Stoner/Image/kerr.py
@@ -33,7 +33,6 @@
@class_modifier(kerrfuncs)
class KerrArray(ImageArray):
-
"""A subclass for Kerr microscopy specific image functions."""
# useful_keys are metadata keys that we'd usually like to keep from a
@@ -90,7 +89,6 @@ def save(self, filename=None, **kargs):
@class_modifier(kerrfuncs, adaptor=image_file_adaptor)
class KerrImageFile(ImageFile):
-
"""Subclass of ImageFile that keeps the data as a KerrArray so that extra functions are available."""
priority = 16
@@ -127,7 +125,6 @@ def image(self, v): # pylint: disable=function-redefined
class KerrStackMixin:
-
"""A mixin for :py:class:`ImageStack` that adds some functionality particular to Kerr images.
Attributes:
@@ -331,7 +328,6 @@ def average_Hcmap(self, weights=None, ignore_zeros=False):
class MaskStackMixin:
-
"""A Mixin for :py:class:`Stoner.Image.ImageStack` but made for stacks of boolean or binary images."""
def __init__(self, *args, **kargs):
@@ -398,10 +394,8 @@ def switch_index(self, saturation_end=True, saturation_value=True):
class KerrStack(KerrStackMixin, ImageStack):
-
"""Represent a stack of Kerr images."""
class MaskStack(MaskStackMixin, KerrStackMixin, ImageStack):
-
"""Represent a set of masks for Kerr images."""
diff --git a/Stoner/Image/stack.py b/Stoner/Image/stack.py
index 8a54381e8..a9236d6a6 100755
--- a/Stoner/Image/stack.py
+++ b/Stoner/Image/stack.py
@@ -25,7 +25,6 @@ def _load_ImageArray(f, **kargs):
class ImageStackMixin:
-
"""Implement an interface for a baseFolder to store images in a 3D numpy array for faster access."""
_defaults = {"type": ImageFile}
@@ -481,7 +480,6 @@ def show(self):
class StackAnalysisMixin:
-
"""Add some analysis capability to ImageStack.
These functions may override :py:class:`Stoner,Image.ImageFile` functions but do them efficiently for a numpy
@@ -520,5 +518,4 @@ def subtract(self, background):
class ImageStack(StackAnalysisMixin, ImageStackMixin, ImageFolderMixin, DiskBasedFolderMixin, baseFolder):
-
"""An alternative implementation of an image stack based on baseFolder."""
diff --git a/Stoner/Image/widgets.py b/Stoner/Image/widgets.py
index 53c150d40..ab625e7cb 100755
--- a/Stoner/Image/widgets.py
+++ b/Stoner/Image/widgets.py
@@ -45,7 +45,6 @@ def _rotated_ellipse(p, data):
class LineSelect:
-
"""Show an Image and slow the user to draw a line on it using cursors."""
def __init__(self):
@@ -171,7 +170,6 @@ def draw_line(self, event):
class RegionSelect:
-
"""Show an Image and slow the user to select a rectangular section."""
def __init__(self):
@@ -257,7 +255,6 @@ def finish(self, key_event):
class ShapeSelect:
-
"""Show an Image and slow the user to draw a line on it using cursors."""
def __init__(self):
diff --git a/Stoner/Zip.py b/Stoner/Zip.py
index 82181e025..96e7f63c6 100755
--- a/Stoner/Zip.py
+++ b/Stoner/Zip.py
@@ -54,7 +54,6 @@ def test_is_zip(filename, member=""):
class ZippedFile(DataFile):
-
"""A sub class of DataFile that sores itself in a zip file.
If the first non-keyword argument is not an :py:class:`zipfile:ZipFile` then
@@ -228,7 +227,6 @@ def save(self, filename=None, **kargs):
class ZipFolderMixin:
-
"""Provides methods to load and save data from a single Zip file.
See :py:class:`Stoner.Folders.DataFolder` for documentation on constructor.
@@ -511,7 +509,6 @@ def _save(self, f, trail):
class ZipFolder(ZipFolderMixin, DiskBasedFolderMixin, baseFolder):
-
"""A sub class of DataFile that sores itself in a zip file.
If the first non-keyword argument is not an :py:class:`zipfile:ZipFile` then
diff --git a/Stoner/__init__.py b/Stoner/__init__.py
index 0d67223b5..98c70f77b 100755
--- a/Stoner/__init__.py
+++ b/Stoner/__init__.py
@@ -3,6 +3,7 @@
It has been developed by members of the `Condensed Matter Group` at the
`University of Leeds`.
"""
+
# pylint: disable=import-error
__all__ = [
"core",
diff --git a/Stoner/analysis/__init__.py b/Stoner/analysis/__init__.py
index 5f12a9780..2e1a8f639 100755
--- a/Stoner/analysis/__init__.py
+++ b/Stoner/analysis/__init__.py
@@ -1,4 +1,5 @@
"""Subpaclage to support the data analysis functions."""
+
from . import fitting, utils, columns
__all__ = ["fitting", "utils", "columns", "filtering", "features"]
diff --git a/Stoner/analysis/columns.py b/Stoner/analysis/columns.py
index 2204e998c..dcd53e116 100755
--- a/Stoner/analysis/columns.py
+++ b/Stoner/analysis/columns.py
@@ -11,7 +11,6 @@
class ColumnOpsMixin:
-
"""A mixin calss designed to work with :py:class:`Stoner.Core.DataFile` to provide additional stats methods."""
def _do_error_calc(self, col_a, col_b, error_type="relative"):
diff --git a/Stoner/analysis/features.py b/Stoner/analysis/features.py
index 05bef6437..92e1c0ffd 100755
--- a/Stoner/analysis/features.py
+++ b/Stoner/analysis/features.py
@@ -14,7 +14,6 @@
class FeatureOpsMixin:
-
"""Mixin to provide additional functions to support finding features in a dataset."""
def peaks(self, **kargs):
diff --git a/Stoner/analysis/filtering.py b/Stoner/analysis/filtering.py
index 150d0338c..2f114165d 100755
--- a/Stoner/analysis/filtering.py
+++ b/Stoner/analysis/filtering.py
@@ -19,7 +19,6 @@
class FilteringOpsMixin:
-
"""Provide additional filtering sndsmoothing methods to :py:class:`Stoner.Data`."""
def SG_Filter(
diff --git a/Stoner/analysis/fitting/__init__.py b/Stoner/analysis/fitting/__init__.py
index 1ad0dc5ad..58a1bbce3 100755
--- a/Stoner/analysis/fitting/__init__.py
+++ b/Stoner/analysis/fitting/__init__.py
@@ -1,4 +1,5 @@
"""Provides additional functionality for doing curve fitting to data."""
+
__all__ = ["odr_Model", "FittingMixin", "models"]
from .mixins import odr_Model, FittingMixin
from . import models
diff --git a/Stoner/analysis/fitting/mixins.py b/Stoner/analysis/fitting/mixins.py
index 80965a7bc..8ab16f6a4 100755
--- a/Stoner/analysis/fitting/mixins.py
+++ b/Stoner/analysis/fitting/mixins.py
@@ -24,7 +24,6 @@
class odr_Model(odrModel):
-
"""A wrapper for converting lmfit models to odr models."""
def __init__(self, *args, **kargs):
@@ -109,7 +108,6 @@ def param_names(self):
class MimizerAdaptor:
-
"""Work with an lmfit.Model or generic callable to use with scipy.optimize global minimization functions.
The :pymod:`scipy.optimize` module's minimizers generally expect functions which take an array like parameter
@@ -171,7 +169,6 @@ def wrapper(beta, x, y, sigma, *args):
class _curve_fit_result:
-
"""Represent a result from fitting using :py:func:`scipy.optimize.curve_fit`
as a class to make handling easier.
"""
@@ -471,7 +468,6 @@ def _prep_lmfit_p0(model, ydata, xdata, p0, kargs):
class FittingMixin:
-
"""A mixin calss for :py:class:`Stoner.Core.DataFile` to provide additional curve_fiotting methods."""
def annotate_fit(self, model, x=None, y=None, z=None, text_only=False, **kargs):
diff --git a/Stoner/analysis/fitting/models/__init__.py b/Stoner/analysis/fitting/models/__init__.py
index 137303171..d4561851b 100755
--- a/Stoner/analysis/fitting/models/__init__.py
+++ b/Stoner/analysis/fitting/models/__init__.py
@@ -1,4 +1,5 @@
"""Sub package of various built-in models for the Stoner package."""
+
__all__ = [
"generic",
"thermal",
diff --git a/Stoner/analysis/fitting/models/e_transport.py b/Stoner/analysis/fitting/models/e_transport.py
index f15b75443..d44d9e1e9 100755
--- a/Stoner/analysis/fitting/models/e_transport.py
+++ b/Stoner/analysis/fitting/models/e_transport.py
@@ -131,7 +131,6 @@ def blochGrueneisen(T, thetaD, rho0, A, n):
class WLfit(Model):
-
"""Weak localisation model class.
Args:
@@ -175,7 +174,6 @@ def guess(self, data, x=None, **kwargs):
class FluchsSondheimer(Model):
-
"""Evaluate a Fluchs-Sondheumer model function for conductivity.
Args:
@@ -210,7 +208,6 @@ def guess(self, data, t=None, **kwargs): # pylint: disable=unused-argument
class BlochGrueneisen(Model):
-
"""BlochGrueneiseen Function for fitting R(T).
Args:
diff --git a/Stoner/analysis/fitting/models/generic.py b/Stoner/analysis/fitting/models/generic.py
index 45528d6bd..16e561b06 100755
--- a/Stoner/analysis/fitting/models/generic.py
+++ b/Stoner/analysis/fitting/models/generic.py
@@ -112,7 +112,6 @@ def lorentzian_diff(x, A, sigma, mu):
class Linear(_Linear):
-
"""Simple linear fit class."""
diff --git a/Stoner/analysis/fitting/models/magnetism.py b/Stoner/analysis/fitting/models/magnetism.py
index 5333899d5..cc497ab4a 100755
--- a/Stoner/analysis/fitting/models/magnetism.py
+++ b/Stoner/analysis/fitting/models/magnetism.py
@@ -125,11 +125,7 @@ def inverse_kittel(f, g, M_s, H_k):
\gamma^{2} \mu_{0}^{2} + 16 \pi^{2} f^{2}}`
"""
gamma = g * cnst.e / (2 * cnst.m_e)
- return (
- -H_k
- - M_s / 2
- + np.sqrt(M_s**2 * gamma**2 * cnst.mu_0**2 + 16 * np.pi**2 * f**2) / (2 * gamma * cnst.mu_0)
- )
+ return -H_k - M_s / 2 + np.sqrt(M_s**2 * gamma**2 * cnst.mu_0**2 + 16 * np.pi**2 * f**2) / (2 * gamma * cnst.mu_0)
def fmr_power(H, H_res, Delta_H, K_1, K_2):
diff --git a/Stoner/analysis/fitting/models/superconductivity.py b/Stoner/analysis/fitting/models/superconductivity.py
index 28d96f355..e56921416 100755
--- a/Stoner/analysis/fitting/models/superconductivity.py
+++ b/Stoner/analysis/fitting/models/superconductivity.py
@@ -78,9 +78,7 @@ def _strijkers_core(V, omega, delta, P, Z):
Au2 = (((np.abs(E) / (np.sqrt((E**2) - (delta**2)))) ** 2) - 1) / (
((np.abs(E) / (np.sqrt((E**2) - (delta**2)))) + (1 + 2 * (Z**2))) ** 2
)
- Bu2 = (4 * (Z**2) * (1 + (Z**2))) / (
- ((np.abs(E) / (np.sqrt((E**2) - (delta**2)))) + (1 + 2 * (Z**2))) ** 2
- )
+ Bu2 = (4 * (Z**2) * (1 + (Z**2))) / (((np.abs(E) / (np.sqrt((E**2) - (delta**2)))) + (1 + 2 * (Z**2))) ** 2)
Bp2 = Bu2 / (1 - Au2)
unpolarised_prefactor = (1 - P) * (1 + (Z**2))
@@ -312,7 +310,6 @@ def ic_RN_Dirty(d_f, IcRn0, E_x, v_f, d_0, tau, delta, T):
class Strijkers(Model):
-
"""strijkers Model for point-contact Andreev Reflection Spectroscopy.
Args:
diff --git a/Stoner/analysis/fitting/models/tunnelling.py b/Stoner/analysis/fitting/models/tunnelling.py
index 346925e33..a882cb9da 100755
--- a/Stoner/analysis/fitting/models/tunnelling.py
+++ b/Stoner/analysis/fitting/models/tunnelling.py
@@ -125,7 +125,6 @@ def tersoffHammann(V, A):
class Simmons(Model):
-
"""Simmons model of electron tunnelling.
Args:
@@ -160,7 +159,6 @@ def guess(self, data, V=None, **kwargs): # pylint: disable=unused-argument
class BDR(Model):
-
"""BDR model tunnelling.
Args:
@@ -195,7 +193,6 @@ def guess(self, data, V=None, **kwargs): # pylint: disable=unused-argument
class FowlerNordheim(Model):
-
"""Fowler Nordhiem Model of electron tunnelling.
Args:
@@ -224,7 +221,6 @@ def guess(self, data, V=None, **kwargs): # pylint: disable=unused-argument
class TersoffHammann(Model):
-
"""Tersoff-Hamman model for tunnelling through STM tip.
Args:
diff --git a/Stoner/compat.py b/Stoner/compat.py
index 6bdaca36a..c0c8dacc0 100755
--- a/Stoner/compat.py
+++ b/Stoner/compat.py
@@ -151,7 +151,6 @@ def listdir_recursive(dirname, glob=None):
class ClassPropertyDescriptor:
-
"""Supports adding class properties."""
def __init__(self, fget, fset=None):
@@ -180,7 +179,6 @@ def _jit(func, *_, **__):
class _dummy:
-
"""A class that does nothing so that float64 can be an instance of it safely."""
def jit(self, func, *_, **__): # pylint: disable=no-self-use
diff --git a/Stoner/core/base.py b/Stoner/core/base.py
index 9691ae956..dee453246 100755
--- a/Stoner/core/base.py
+++ b/Stoner/core/base.py
@@ -119,12 +119,10 @@ def string_to_type(value: String_Types) -> Any:
class _evaluatable:
-
"""Placeholder to indicate that special action needed to convert a string representation to valid Python type."""
class regexpDict(sorteddict):
-
"""An ordered dictionary that permits looks up by regular expression."""
allowed_keys: Tuple = (object,)
@@ -260,7 +258,6 @@ def has_key(self, name: Any) -> bool:
class typeHintedDict(regexpDict):
-
"""Extends a :py:class:`blist.sorteddict` to include type hints of what each key contains.
The CM Physics Group at Leeds makes use of a standard file format that closely matches
@@ -670,7 +667,6 @@ def import_key(self, line: str) -> None:
class metadataObject(MutableMapping):
-
"""Represent some sort of object that has metadata stored in a :py:class:`Stoner.Core.typeHintedDict` object.
Attributes:
@@ -783,7 +779,6 @@ def _load(self, filename: Filename, *args: Any, **kargs: Any) -> "metadataObject
@pd.api.extensions.register_dataframe_accessor("metadata")
class PandasMetadata(typeHintedDict):
-
"""Add a typehintedDict to PandasDataFrames."""
def __init__(self, pandas_obj):
diff --git a/Stoner/core/data.py b/Stoner/core/data.py
index 2ac088ab7..46050e45e 100755
--- a/Stoner/core/data.py
+++ b/Stoner/core/data.py
@@ -20,7 +20,6 @@
class Data(AnalysisMixin, FittingMixin, ColumnOpsMixin, FilteringOpsMixin, FeatureOpsMixin, PlotMixin, DataFile):
-
"""The principal class for representing a data file.
This merges:
diff --git a/Stoner/core/exceptions.py b/Stoner/core/exceptions.py
index 47d72dab6..586547bdc 100755
--- a/Stoner/core/exceptions.py
+++ b/Stoner/core/exceptions.py
@@ -4,7 +4,6 @@
class StonerLoadError(Exception):
-
"""An exception thrown by the file loading routines in the Stoner Package.
This special exception is thrown when one of the subclasses of :py:class:`Stoner.Core.DataFile`
@@ -15,7 +14,6 @@ class StonerLoadError(Exception):
class StonerUnrecognisedFormat(IOError):
-
"""An exception thrown by the file loading routines in the Stoner Package.
This special exception is thrown when none of the subclasses was able to load the specified file.
@@ -23,12 +21,10 @@ class StonerUnrecognisedFormat(IOError):
class StonerSetasError(AttributeError):
-
"""An exception tjrown when we try to access a column in data without setas being set."""
class StonerAssertionError(RuntimeError):
-
"""An exception raised when the library thinks an assertion has failed."""
diff --git a/Stoner/core/interfaces.py b/Stoner/core/interfaces.py
index 52e3299d4..121b3ad28 100755
--- a/Stoner/core/interfaces.py
+++ b/Stoner/core/interfaces.py
@@ -10,7 +10,6 @@
class DataFileInterfacesMixin:
-
"""Implement the required methods for a sequence and mapping type object."""
def __contains__(self, item):
diff --git a/Stoner/core/methods.py b/Stoner/core/methods.py
index a575bd4e9..b69488618 100755
--- a/Stoner/core/methods.py
+++ b/Stoner/core/methods.py
@@ -13,7 +13,6 @@
class DataFileSearchMixin:
-
"""Mixin class that provides the search, selecting and sorting methods for a DataFile."""
def _search_index(self, xcol=None, value=None, accuracy=0.0, invert=False):
diff --git a/Stoner/core/operators.py b/Stoner/core/operators.py
index 215800282..d8dbdf191 100755
--- a/Stoner/core/operators.py
+++ b/Stoner/core/operators.py
@@ -11,7 +11,6 @@
class DataFileOperatorsMixin:
-
"""Provides the operator mixins for DataFile like objects."""
def __add__(self, other):
diff --git a/Stoner/core/property.py b/Stoner/core/property.py
index a11f99134..c29a92809 100755
--- a/Stoner/core/property.py
+++ b/Stoner/core/property.py
@@ -27,7 +27,6 @@
class DataFilePropertyMixin:
-
"""Provide the properties for DataFile Like Objects."""
_subclasses = None
diff --git a/Stoner/core/setas.py b/Stoner/core/setas.py
index aef7acaea..acb9b485f 100755
--- a/Stoner/core/setas.py
+++ b/Stoner/core/setas.py
@@ -14,7 +14,6 @@
class setas(MutableMapping):
-
"""A Class that provides a mechanism for managing the column assignments in a DataFile like object.
Implements a MutableMapping bsed on the column_headers as the keys (with a few tweaks!).
diff --git a/Stoner/core/utils.py b/Stoner/core/utils.py
index cf7408f9b..f1c61032c 100755
--- a/Stoner/core/utils.py
+++ b/Stoner/core/utils.py
@@ -200,7 +200,6 @@ def sub_core(other: Union[Int_Types, slice, Callable], newdata: "DataFile") -> "
class tab_delimited(csv.Dialect):
-
"""A customised csv dialect class for reading tab delimited text files."""
delimiter = "\t"
diff --git a/Stoner/folders/core.py b/Stoner/folders/core.py
index 93fd35c6f..99529a169 100755
--- a/Stoner/folders/core.py
+++ b/Stoner/folders/core.py
@@ -178,7 +178,6 @@ def _build_select_function(kargs, arg):
class baseFolder(MutableSequence):
-
"""A base class for objectFolders that supports both a sequence of objects and a mapping of instances of itself.
Attributes:
diff --git a/Stoner/folders/each.py b/Stoner/folders/each.py
index e97dc9fdf..36cf7d691 100755
--- a/Stoner/folders/each.py
+++ b/Stoner/folders/each.py
@@ -1,4 +1,5 @@
"""Classes and support functions for the :py:attr:`Stoner.DataFolder.each`.magic attribute."""
+
__all__ = ["Item"]
from collections.abc import MutableSequence
from functools import wraps, partial
@@ -35,7 +36,6 @@ def _worker(d, **kwargs):
class SetasWrapper(MutableSequence):
-
"""Manages wrapping each member of the folder's setas attribute."""
def __init__(self, parent):
@@ -108,7 +108,6 @@ def collapse(self):
class Item:
-
"""Provides a proxy object for accessing methods on the inividual members of a Folder.
Notes:
diff --git a/Stoner/folders/groups.py b/Stoner/folders/groups.py
index 8bec57a24..586a26d36 100755
--- a/Stoner/folders/groups.py
+++ b/Stoner/folders/groups.py
@@ -11,7 +11,6 @@
class GroupsDict(regexpDict):
-
"""A typeHinted dictionary to manages collections of :py:class:`Stoner.folders.core.baseFolder` objects."""
def __init__(self, *args, **kargs):
diff --git a/Stoner/folders/metadata.py b/Stoner/folders/metadata.py
index 8834a4e03..0a5681cab 100755
--- a/Stoner/folders/metadata.py
+++ b/Stoner/folders/metadata.py
@@ -108,7 +108,6 @@ def _slice_keys(args, possible=None):
class MetadataProxy(MutableMapping):
-
"""Provide methods to interact with a whole collection of metadataObjects' metadata."""
def __init__(self, folder):
diff --git a/Stoner/folders/mixins.py b/Stoner/folders/mixins.py
index b81d170ce..eb0fd1a4d 100755
--- a/Stoner/folders/mixins.py
+++ b/Stoner/folders/mixins.py
@@ -57,7 +57,6 @@ def _loader(name, loader=None, typ=None, directory=None):
class DiskBasedFolderMixin:
-
"""A Mixin class that implements reading metadataObjects from disc.
Attributes:
@@ -469,7 +468,6 @@ def unload(self, name=None):
class DataMethodsMixin:
-
"""Methods for working with :py:class:`Stner.Data` in py:class:`Stoner.DataFolder`s."""
def concatenate(self, sort=None, reverse=False):
@@ -639,7 +637,6 @@ def _gatherer(group, _, xcol=None, ycol=None, xerr=None, yerr=None, **kargs):
class PlotMethodsMixin:
-
"""A Mixin for :py:class:`Stoner.folders.core.baseFolder` with extra methods for plotting lots of files.
Example:
@@ -734,7 +731,6 @@ def plot(self, *args, **kargs):
class DataFolder(DataMethodsMixin, DiskBasedFolderMixin, baseFolder):
-
"""Provide an interface to manipulating lots of data files stored within a directory structure on disc.
By default, the members of the DataFolder are instances of :class:`Stoner.Data`. The DataFolder emplys a lazy
@@ -750,5 +746,4 @@ def __init__(self, *args, **kargs):
class PlotFolder(PlotMethodsMixin, DataFolder):
-
"""A :py:class:`Stoner.folders.baseFolder` that knows how to ploth its underlying data files."""
diff --git a/Stoner/formats/__init__.py b/Stoner/formats/__init__.py
index c23eacaea..bdbc1481c 100755
--- a/Stoner/formats/__init__.py
+++ b/Stoner/formats/__init__.py
@@ -17,5 +17,6 @@
provide a :py:attr:`Stoner.Core.DataFile.mime_type` attribute which gives a list of mime types that this class might
be able to open. This helps identify classes that could be use to load particular file types.
"""
+
__all__ = ["instruments", "generic", "rigs", "facilities", "simulations", "attocube", "maximus"]
from . import instruments, generic, rigs, facilities, simulations, attocube, maximus
diff --git a/Stoner/formats/attocube.py b/Stoner/formats/attocube.py
index d2078b560..26f81d038 100755
--- a/Stoner/formats/attocube.py
+++ b/Stoner/formats/attocube.py
@@ -48,7 +48,6 @@ def _raise_error(openfile, message=""):
class AttocubeScanMixin:
-
"""Provides the specialist methods for dealing with Attocube SPM scan files.
See :py:class:`AttocubeScan` for details."""
@@ -468,7 +467,6 @@ def read_hdf5(cls, filename, *args, **kargs):
class AttocubeScan(AttocubeScanMixin, ImageStack):
-
"""An ImageStack subclass that can load scans from the AttocubeScan SPM System.
AttocubeScan represents a scan from an Attocube SPM system as a 3D stack of scan data with
diff --git a/Stoner/formats/facilities.py b/Stoner/formats/facilities.py
index 363a3c324..b4f0ec82b 100755
--- a/Stoner/formats/facilities.py
+++ b/Stoner/formats/facilities.py
@@ -22,7 +22,6 @@
class BNLFile(Core.DataFile):
-
"""Reader of files in the SPEC format given by BNL (specifically u4b beamline but hopefully generalisable).
Author RCT 12/2011
@@ -137,7 +136,6 @@ def _load(self, filename, *args, **kargs): # fileType omitted, implicit in clas
class MDAASCIIFile(Core.DataFile):
-
"""Reads files generated from the APS."""
priority = 16
@@ -223,7 +221,6 @@ def _load(self, filename=None, *args, **kargs):
class OpenGDAFile(Core.DataFile):
-
"""Extends Core.DataFile to load files from RASOR."""
priority = 16 # Makes a positive ID of it's file type so give priority
@@ -264,12 +261,10 @@ def _load(self, filename=None, *args, **kargs):
class RasorFile(OpenGDAFile):
-
"""Just an alias for OpenGDAFile."""
class SNSFile(Core.DataFile):
-
"""Reads the ASCII exported PNR reduced files from BL-4A line at the SSNS at Oak Ridge National Lab.
File has a large header marked up with # prefixes which include several section is []
@@ -343,7 +338,6 @@ def _load(self, filename=None, *args, **kargs):
if fabio:
class ESRF_DataFile(Core.DataFile):
-
"""Utilise the fabIO library to read an edf file has a DataFile."""
priority = 16
@@ -365,7 +359,6 @@ def _load(self, filename=None, *args, **kargs):
raise StonerLoadError("Not an ESRF data file !") from err
class FabioImageFile(Image.ImageFile):
-
"""Utilise the fabIO library to read an edf file has a DataFile."""
priority = 32
diff --git a/Stoner/formats/generic.py b/Stoner/formats/generic.py
index 21a02eb32..53264f484 100755
--- a/Stoner/formats/generic.py
+++ b/Stoner/formats/generic.py
@@ -20,7 +20,6 @@
class _refuse_log(logging.Filter):
-
"""Refuse to log all records."""
def filter(self, record):
@@ -73,7 +72,6 @@ def _delim_detect(line):
class CSVFile(DataFile):
-
"""A subclass of DataFiule for loading generic deliminated text fiules without metadata."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -178,7 +176,6 @@ def save(self, filename=None, **kargs):
class JustNumbersFile(CSVFile):
-
"""A reader format for things which are just a block of numbers with no headers or metadata."""
priority = 256 # Rather generic file format so make it a low priority
@@ -190,7 +187,6 @@ class JustNumbersFile(CSVFile):
class KermitPNGFile(DataFile):
-
"""Loads PNG files with additional metadata embedded in them and extracts as metadata."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -278,7 +274,6 @@ def save(self, filename=None, **kargs):
from nptdms import TdmsFile
class TDMSFile(DataFile):
-
"""First stab at writing a file that will import TDMS files."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -334,7 +329,6 @@ def _load(self, filename=None, *args, **kargs):
if Hyperspy_ok:
class HyperSpyFile(DataFile):
-
"""Wrap the HyperSpy file to map to DataFile."""
priority = 64 # Makes an ID check but is quite generic
diff --git a/Stoner/formats/instruments.py b/Stoner/formats/instruments.py
index 40f2575fa..4e7295233 100755
--- a/Stoner/formats/instruments.py
+++ b/Stoner/formats/instruments.py
@@ -18,7 +18,6 @@
class LSTemperatureFile(Core.DataFile):
-
"""A class that reads and writes Lakeshore Temperature Calibration Curves.
.. warning::
@@ -145,7 +144,6 @@ def save(self, filename=None, **kargs):
class QDFile(Core.DataFile):
-
"""Extends Core.DataFile to load files from Quantum Design Systems - including PPMS, MPMS and SQUID-VSM."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -239,7 +237,6 @@ def _load(self, filename=None, *args, **kargs):
class RigakuFile(Core.DataFile):
-
"""Loads a .ras file as produced by Rigaku X-ray diffractormeters."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -377,7 +374,6 @@ def to_Q(self, wavelength=1.540593):
class SPCFile(Core.DataFile):
-
"""Extends Core.DataFile to load SPC files from Raman."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -650,7 +646,6 @@ def _load(self, filename=None, *args, **kargs):
class VSMFile(Core.DataFile):
-
"""Extends Core.DataFile to open VSM Files."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -737,7 +732,6 @@ def _load(self, filename=None, *args, **kargs):
class XRDFile(Core.DataFile):
-
"""Loads Files from a Brucker D8 Discovery X-Ray Diffractometer."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
diff --git a/Stoner/formats/maximus.py b/Stoner/formats/maximus.py
index 64a8383d2..9dfb39678 100755
--- a/Stoner/formats/maximus.py
+++ b/Stoner/formats/maximus.py
@@ -37,7 +37,6 @@ def _raise_error(openfile, message=""):
class MaximusSpectra(DataFile):
-
"""Provides a :py:class:`Stoner.DataFile` subclass for loading Point spectra from Maximus."""
# We treat the hdr file as the key file type
@@ -90,7 +89,6 @@ def _load(self, *args, **kargs):
class MaximusImage(ImageFile):
-
"""Provide a STXMImage like class for the Maximus Beamline."""
_patterns = ["*.hdr", "*.xim"]
@@ -121,7 +119,6 @@ def _load(self, filename, **kargs):
class MaximusStackMixin:
-
"""Handle a stack of Maximus Images."""
_defaults = {"type": MaximusImage, "pattern": "*.hdr"}
@@ -355,7 +352,6 @@ def read_hdf5(cls, filename, *args, **kargs):
class MaximusStack(MaximusStackMixin, ImageStack):
-
"""Process an image scan stack from the Bessy Maximus beamline as an ImageStack subclass."""
@@ -374,7 +370,7 @@ def hdr_to_dict(filename, to_python=True):
(dict or str):
Either the header file as a python dictionary, or a json string.
"""
- bare = re.compile("([\s\{])([A-Za-z][A-Za-z0-9_]*)\s\:") # Match for keys
+ bare = re.compile(r"([\s\{])([A-Za-z][A-Za-z0-9_]*)\s\:") # Match for keys
term = re.compile(r",\s*([\]\}])") # match for extra , at the end of a dict or list
nan = re.compile(r"([\-0-9\.]+\#QNAN)") # Handle NaN values
diff --git a/Stoner/formats/rigs.py b/Stoner/formats/rigs.py
index 0c440c27b..624807c27 100755
--- a/Stoner/formats/rigs.py
+++ b/Stoner/formats/rigs.py
@@ -16,7 +16,6 @@
class BigBlueFile(CSVFile):
-
"""Extends CSVFile to load files from Nick Porter's old BigBlue code."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -50,7 +49,6 @@ def _load(self, filename, *args, **kargs):
class BirgeIVFile(Core.DataFile):
-
"""Implements the IV File format used by the Birge Group in Michigan State University Condesned Matter Physiscs."""
patterns = ["*.dat"]
@@ -110,7 +108,6 @@ def _load(self, filename, *args, **kargs):
class MokeFile(Core.DataFile):
-
"""Class that extgends Core.DataFile to load files from the Leeds MOKE system."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -155,7 +152,6 @@ def _load(self, filename, *args, **kargs):
class FmokeFile(Core.DataFile):
-
"""Extends Core.DataFile to open Fmoke Files."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -201,7 +197,6 @@ def _load(self, filename, *args, **kargs):
class EasyPlotFile(Core.DataFile):
-
"""A class that will extract as much as it can from an EasyPlot save File."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -296,7 +291,6 @@ def _sa_cmd(self, parts):
class PinkLibFile(Core.DataFile):
-
"""Extends Core.DataFile to load files from MdV's PINK library - as used by the GMR anneal rig."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
diff --git a/Stoner/formats/simulations.py b/Stoner/formats/simulations.py
index 9ffb7c6e0..fc229b9ab 100755
--- a/Stoner/formats/simulations.py
+++ b/Stoner/formats/simulations.py
@@ -32,7 +32,6 @@ def _read_line(data, metadata):
class GenXFile(DataFile):
-
"""Extends DataFile for GenX Exported data."""
#: priority (int): is the load order for the class, smaller numbers are tried before larger numbers.
@@ -42,7 +41,7 @@ class GenXFile(DataFile):
priority = 16
#: pattern (list of str): A list of file extensions that might contain this type of file. Used to construct
# the file load/save dialog boxes.
- patterns = ["*.dat"] # Recognised filename patterns
+ patterns = ["*.dat", "*.txt"] # Recognised filename patterns
def _load(self, filename=None, *args, **kargs):
"""Load function. File format has space delimited columns from row 3 onwards."""
@@ -50,8 +49,8 @@ def _load(self, filename=None, *args, **kargs):
self.get_filename("r")
else:
self.filename = filename
- pattern = re.compile(r'# Dataset "([^\"]*)" exported from GenX on (.*)$')
- pattern2 = re.compile(r"#\sFile\sexported\sfrom\sGenX\'s\sReflectivity\splugin")
+ pattern = re.compile(r'# Dataset "([^\"]*)" exported from GenX3? on (.*)$')
+ pattern2 = re.compile(r"#\sFile\sexported\sfrom\sGenX3?\'s\sReflectivity\splugin")
i = 0
ix = 0
with FileManager(self.filename, "r", errors="ignore", encoding="utf-8") as datafile:
@@ -72,14 +71,14 @@ def _load(self, filename=None, *args, **kargs):
raise StonerLoadError("Not a GenXFile")
for ix, line in enumerate(datafile):
line = line.strip()
- if line in ["# Headers:", "# Column labels:"]:
+ if line in ["# Headers:", "# Column lables:"]:
line = next(datafile)[1:].strip()
break
else:
raise StonerLoadError("Cannot find headers")
- skip = ix + i + 2
- column_headers = [f.strip() for f in line.strip().split("\t")]
- self.data = np.real(np.genfromtxt(self.filename, skip_header=skip, dtype=complex))
+ skip = ix + i + 2
+ column_headers = [f.strip() for f in re.split(r"[\s\t]+", line.strip())]
+ self.data = np.real(np.genfromtxt(datafile, dtype=complex))
self["dataset"] = dataset
if "sld" in dataset.lower():
self["type"] = "SLD"
@@ -90,11 +89,11 @@ def _load(self, filename=None, *args, **kargs):
elif "uu" in dataset.lower():
self["type"] = "Up"
self.column_headers = column_headers
+ self.setas = "xyye"
return self
class OVFFile(DataFile):
-
"""A class that reads OOMMF vector format files and constructs x,y,z,u,v,w data.
OVF 1 and OVF 2 files with text or binary data and only files with a meshtype rectangular are supported
diff --git a/Stoner/plot/core.py b/Stoner/plot/core.py
index 8367a6782..ef513ba31 100755
--- a/Stoner/plot/core.py
+++ b/Stoner/plot/core.py
@@ -4,6 +4,7 @@
PlotMixin:
A class that uses matplotlib to plot data
"""
+
# pylint: disable=C0413
from __future__ import division
diff --git a/Stoner/plot/formats.py b/Stoner/plot/formats.py
index e8fc7cc62..8c911b81c 100755
--- a/Stoner/plot/formats.py
+++ b/Stoner/plot/formats.py
@@ -83,7 +83,6 @@ def format_data_short(self, value): # pylint: disable=r0201
class TexEngFormatter(EngFormatter):
-
"""An axis tick label formatter that emits Tex formula mode code.
Formatting is set so that large numbers are registered as with SI prefixes
@@ -146,7 +145,6 @@ def format_data_short(self, value): # pylint: disable=r0201
class DefaultPlotStyle(MutableMapping):
-
"""Produces a default plot style.
To produce alternative plot styles, create subclasses of this plot. Either override or
@@ -566,7 +564,6 @@ def annotate(self, ix, multiple, plot, **kargs):
class GBPlotStyle(DefaultPlotStyle):
-
"""Template developed for Gavin's plotting.
This is largely an experimental class for trying things out rather than
@@ -595,7 +592,6 @@ def customise_axes(self, ax, plot):
class JTBPlotStyle(DefaultPlotStyle):
-
"""Template class for Joe's Plot settings.
Example:
@@ -612,7 +608,6 @@ def customise_axes(self, ax, plot):
class JTBinsetStyle(DefaultPlotStyle):
-
"""Template class for Joe's Plot settings."""
show_title = False
@@ -623,7 +618,6 @@ def customise_axes(self, ax, plot):
class ThesisPlotStyle(DefaultPlotStyle):
-
"""Template class for Joe's Plot settings."""
show_title = False
@@ -631,7 +625,6 @@ class ThesisPlotStyle(DefaultPlotStyle):
class PRBPlotStyle(DefaultPlotStyle):
-
"""A figure Style for making figures for Phys Rev * Jounrals.
Example:
@@ -649,7 +642,6 @@ def customise_axes(self, ax, plot):
class SketchPlot(DefaultPlotStyle):
-
"""Turn on xkcd plot style.
Implemented as a bit of a joke, but perhaps someone will use this in a real
@@ -692,7 +684,6 @@ def customise_axes(self, ax, plot):
if SEABORN: # extra classes if we have seaborn available
class SeabornPlotStyle(DefaultPlotStyle):
-
"""A plotdtyle that makes use of the seaborn plotting package to make visually attractive plots.
Attributes:
diff --git a/Stoner/tools/classes.py b/Stoner/tools/classes.py
index 0fd8a4b7d..f8f7c3bec 100755
--- a/Stoner/tools/classes.py
+++ b/Stoner/tools/classes.py
@@ -31,7 +31,6 @@
class attributeStore(dict):
-
"""A dictionary=like class that provides attributes that work like indices.
Used to implement the mapping of column types to indices in the setas attriobutes.
@@ -124,7 +123,6 @@ def subclasses(cls: Optional[type] = None) -> Dict: # pylint: disable=no-self-a
class typedList(MutableSequence):
-
"""Subclass list to make setitem enforce strict typing of members of the list."""
def __init__(self, *args: Any, **kargs: Any) -> None:
@@ -248,7 +246,6 @@ def set_option(name: str, value: bool) -> None:
class Options:
-
"""Dead simple class to allow access to package options."""
def __init__(self):
diff --git a/Stoner/tools/file.py b/Stoner/tools/file.py
index 193d7c289..4a316132d 100755
--- a/Stoner/tools/file.py
+++ b/Stoner/tools/file.py
@@ -196,7 +196,6 @@ def get_mime_type(filename: Union[pathlib.Path, str], debug: bool = False) -> Op
class FileManager:
-
"""Simple context manager that allows opening files or working with already open string buffers."""
def __init__(self, filename, *args, **kargs):
@@ -265,7 +264,6 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
class SizedFileManager(FileManager):
-
"""Context manager that figures out the size of the file as well as opening it."""
def __enter__(self):
diff --git a/Stoner/tools/widgets.py b/Stoner/tools/widgets.py
index 93ae24d3e..b050a23c6 100755
--- a/Stoner/tools/widgets.py
+++ b/Stoner/tools/widgets.py
@@ -18,7 +18,6 @@
except ImportError:
class App:
-
"""Mock App that raises an error when you try to call openDialog on it."""
modes: Dict = dict()
@@ -36,7 +35,6 @@ def openDialog(
else:
class App(QApplication):
-
"""Placehold PyQT5 Application for producing filedialog boxes."""
modes = {
@@ -141,7 +139,6 @@ def openDialog(
class RangeSelect:
-
"""A simple class to allow a matplotlib graph to be used to select data."""
def __init__(self):
diff --git a/doc/.coveralls.yml b/doc/.coveralls.yml
deleted file mode 100755
index f2a441ff3..000000000
--- a/doc/.coveralls.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-service_name: travis-pro
-repo_token: kwYbCcg0mDbFK4fLXaV7JayClxaOAcWPd
diff --git a/doc/samples/3D_plot.py b/doc/samples/3D_plot.py
index 893f2f296..be0f6702f 100755
--- a/doc/samples/3D_plot.py
+++ b/doc/samples/3D_plot.py
@@ -1,4 +1,5 @@
"""3D surface plot example."""
+
# pylint: disable=invalid-name
import numpy as np
import matplotlib.cm
@@ -8,9 +9,7 @@
x, y = np.meshgrid(np.linspace(-2, 2, 100), np.linspace(-2, 2, 100))
x = x.ravel()
y = y.ravel()
-z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(
- -np.sqrt(x**2 + y**2)
-)
+z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(-np.sqrt(x**2 + y**2))
p = Data()
p = p & x & y & z
diff --git a/doc/samples/Fitting/Arrhenius.py b/doc/samples/Fitting/Arrhenius.py
index fab3119b4..517ba044f 100755
--- a/doc/samples/Fitting/Arrhenius.py
+++ b/doc/samples/Fitting/Arrhenius.py
@@ -1,4 +1,5 @@
"""Example of Arrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace, ceil, log10, abs as np_abs
from numpy.random import normal
diff --git a/doc/samples/Fitting/BDR.py b/doc/samples/Fitting/BDR.py
index 96ed16758..c5929d2b3 100755
--- a/doc/samples/Fitting/BDR.py
+++ b/doc/samples/Fitting/BDR.py
@@ -1,4 +1,5 @@
"""Example of nDimArrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace, ones_like
from numpy.random import normal
diff --git a/doc/samples/Fitting/FowlerNordheim.py b/doc/samples/Fitting/FowlerNordheim.py
index 26483ad44..1b84aadd6 100755
--- a/doc/samples/Fitting/FowlerNordheim.py
+++ b/doc/samples/Fitting/FowlerNordheim.py
@@ -1,4 +1,5 @@
"""Example of nDimArrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace, ones_like
from numpy.random import normal
diff --git a/doc/samples/Fitting/Powerlaw.py b/doc/samples/Fitting/Powerlaw.py
index ef1500dde..4cd5eb523 100755
--- a/doc/samples/Fitting/Powerlaw.py
+++ b/doc/samples/Fitting/Powerlaw.py
@@ -1,4 +1,5 @@
"""Example of PowerLaw Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace
from numpy.random import normal
diff --git a/doc/samples/Fitting/Quadratic.py b/doc/samples/Fitting/Quadratic.py
index 35d5e9794..6ef6481d6 100755
--- a/doc/samples/Fitting/Quadratic.py
+++ b/doc/samples/Fitting/Quadratic.py
@@ -1,4 +1,5 @@
"""Example of Quadratic Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace
from numpy.random import normal
diff --git a/doc/samples/Fitting/Simmons.py b/doc/samples/Fitting/Simmons.py
index 8c6919066..25680df01 100755
--- a/doc/samples/Fitting/Simmons.py
+++ b/doc/samples/Fitting/Simmons.py
@@ -1,4 +1,5 @@
"""Example of nDimArrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace, ones_like
from numpy.random import normal
diff --git a/doc/samples/Fitting/b_g.py b/doc/samples/Fitting/b_g.py
index e64d70649..1d48ebb11 100755
--- a/doc/samples/Fitting/b_g.py
+++ b/doc/samples/Fitting/b_g.py
@@ -1,4 +1,5 @@
"""Test Weak-localisation fitting."""
+
# pylint: disable=invalid-name
from copy import deepcopy
diff --git a/doc/samples/Fitting/blochlaw.py b/doc/samples/Fitting/blochlaw.py
index 91255e060..35cc79cb9 100755
--- a/doc/samples/Fitting/blochlaw.py
+++ b/doc/samples/Fitting/blochlaw.py
@@ -1,4 +1,5 @@
"""Test langevin fitting."""
+
# pylint: disable=invalid-name
from numpy import linspace, ones_like, where, nan, isnan
from numpy.random import normal
diff --git a/doc/samples/Fitting/f_s.py b/doc/samples/Fitting/f_s.py
index 0101298fb..b3aa9ddf6 100755
--- a/doc/samples/Fitting/f_s.py
+++ b/doc/samples/Fitting/f_s.py
@@ -1,4 +1,5 @@
"""Test Weak-localisation fitting."""
+
# pylint: disable=invalid-name
from numpy import logspace, ones_like, log10
from numpy.random import normal
diff --git a/doc/samples/Fitting/kittel.py b/doc/samples/Fitting/kittel.py
index 73eee1f47..5ce9b8fe5 100755
--- a/doc/samples/Fitting/kittel.py
+++ b/doc/samples/Fitting/kittel.py
@@ -1,4 +1,5 @@
"""Test Weak-localisation fitting."""
+
# pylint: disable=invalid-name
from copy import copy
diff --git a/doc/samples/Fitting/langevin.py b/doc/samples/Fitting/langevin.py
index 1f87361f5..1045225a9 100755
--- a/doc/samples/Fitting/langevin.py
+++ b/doc/samples/Fitting/langevin.py
@@ -1,4 +1,5 @@
"""Test langevin fitting."""
+
# pylint: disable=invalid-name
from copy import copy
diff --git a/doc/samples/Fitting/lorentzian.py b/doc/samples/Fitting/lorentzian.py
index f483f3eeb..00cfd142a 100755
--- a/doc/samples/Fitting/lorentzian.py
+++ b/doc/samples/Fitting/lorentzian.py
@@ -1,4 +1,5 @@
"""Test langevin fitting."""
+
# pylint: disable=invalid-name
from copy import copy
diff --git a/doc/samples/Fitting/modArrhenius.py b/doc/samples/Fitting/modArrhenius.py
index 66db19bd3..51f1c426a 100755
--- a/doc/samples/Fitting/modArrhenius.py
+++ b/doc/samples/Fitting/modArrhenius.py
@@ -1,4 +1,5 @@
"""Example of nDimArrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace
from numpy.random import normal
diff --git a/doc/samples/Fitting/nDimArrhenius.py b/doc/samples/Fitting/nDimArrhenius.py
index 78d4479fc..77cb44275 100755
--- a/doc/samples/Fitting/nDimArrhenius.py
+++ b/doc/samples/Fitting/nDimArrhenius.py
@@ -1,4 +1,5 @@
"""Example of nDimArrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import linspace
from numpy.random import normal
diff --git a/doc/samples/Fitting/vftEquation.py b/doc/samples/Fitting/vftEquation.py
index 02c76fa81..04f166a49 100755
--- a/doc/samples/Fitting/vftEquation.py
+++ b/doc/samples/Fitting/vftEquation.py
@@ -1,4 +1,5 @@
"""Example of Arrhenius Fit."""
+
# pylint: disable=invalid-name
from numpy import logspace, log10
from numpy.random import normal
diff --git a/doc/samples/Fitting/weak_localisation.py b/doc/samples/Fitting/weak_localisation.py
index af5c02b1b..27e06bba3 100755
--- a/doc/samples/Fitting/weak_localisation.py
+++ b/doc/samples/Fitting/weak_localisation.py
@@ -1,4 +1,5 @@
"""Test Weak-localisation fitting."""
+
# pylint: disable=invalid-name
from copy import copy
diff --git a/doc/samples/Smoothing_Data.py b/doc/samples/Smoothing_Data.py
index d12bed0d3..e528836b6 100755
--- a/doc/samples/Smoothing_Data.py
+++ b/doc/samples/Smoothing_Data.py
@@ -1,4 +1,5 @@
"""Smoothing Data methods example."""
+
# pylint: disable=invalid-name, no-member, not-callable
import matplotlib.pyplot as plt
diff --git a/doc/samples/Vectorfield.py b/doc/samples/Vectorfield.py
index 665b8ff6a..82cef694a 100755
--- a/doc/samples/Vectorfield.py
+++ b/doc/samples/Vectorfield.py
@@ -1,4 +1,5 @@
"""Create a 2D vector field plot."""
+
# pylint: disable=invalid-name
from os import path
diff --git a/doc/samples/bins.py b/doc/samples/bins.py
index 8cfa55e38..4408509fb 100755
--- a/doc/samples/bins.py
+++ b/doc/samples/bins.py
@@ -1,4 +1,5 @@
"""Re-binning data example."""
+
# pylint: disable=invalid-name
from Stoner import Data
from Stoner.plot.utils import errorfill
diff --git a/doc/samples/channel_math.py b/doc/samples/channel_math.py
index 584f0feb1..7ee01e0de 100755
--- a/doc/samples/channel_math.py
+++ b/doc/samples/channel_math.py
@@ -1,4 +1,5 @@
"""Demonstrate Channel math operations."""
+
# pylint: disable=invalid-name
from numpy import linspace, ones_like, sin, cos, pi
from numpy.random import normal, seed
diff --git a/doc/samples/colormap_plot.py b/doc/samples/colormap_plot.py
index a9a355ca5..7b6b12f19 100755
--- a/doc/samples/colormap_plot.py
+++ b/doc/samples/colormap_plot.py
@@ -1,4 +1,5 @@
"""Plot 3d fdata as a colourmap."""
+
# pylint: disable=invalid-name
import numpy as np
@@ -8,9 +9,7 @@
x, y = np.meshgrid(np.linspace(-2, 2, 100), np.linspace(-2, 2, 100))
x = x.ravel()
y = y.ravel()
-z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(
- -np.sqrt(x**2 + y**2)
-)
+z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(-np.sqrt(x**2 + y**2))
p = Data(np.column_stack((x, y, z)), column_headers=["X", "Y", "Z"])
p.setas = "xyz"
diff --git a/doc/samples/common_y_plot.py b/doc/samples/common_y_plot.py
index 38383e019..ad32a1723 100755
--- a/doc/samples/common_y_plot.py
+++ b/doc/samples/common_y_plot.py
@@ -1,4 +1,5 @@
"""Plot data on a single y-axis."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/contour_plot.py b/doc/samples/contour_plot.py
index 57c97002a..fe89ee538 100755
--- a/doc/samples/contour_plot.py
+++ b/doc/samples/contour_plot.py
@@ -1,4 +1,5 @@
"""Plot 3D data on a contour plot."""
+
# pylint: disable=invalid-name
import numpy as np
from Stoner import Data
@@ -6,9 +7,7 @@
x, y = np.meshgrid(np.linspace(-2, 2, 100), np.linspace(-2, 2, 100))
x = x.ravel()
y = y.ravel()
-z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(
- -np.sqrt(x**2 + y**2)
-)
+z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(-np.sqrt(x**2 + y**2))
p = Data()
p = p & x & y & z
diff --git a/doc/samples/curve_fit_line.py b/doc/samples/curve_fit_line.py
index 1692911c5..96439d8d1 100755
--- a/doc/samples/curve_fit_line.py
+++ b/doc/samples/curve_fit_line.py
@@ -1,4 +1,5 @@
"""USe curve_fit to fit a straight line."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/curve_fit_plane.py b/doc/samples/curve_fit_plane.py
index fe2c72103..e418c459f 100755
--- a/doc/samples/curve_fit_plane.py
+++ b/doc/samples/curve_fit_plane.py
@@ -1,4 +1,5 @@
"""Use curve_fit to fit a plane to some data."""
+
# pylint: disable=invalid-name
from numpy.random import normal, seed
from numpy import linspace, meshgrid, column_stack, array
diff --git a/doc/samples/curvefit_models.py b/doc/samples/curvefit_models.py
index 1ca81c202..0707d82a7 100755
--- a/doc/samples/curvefit_models.py
+++ b/doc/samples/curvefit_models.py
@@ -1,4 +1,5 @@
"""Simple use of lmfit to fit data."""
+
# pylint: disable=invalid-name
from numpy import linspace, random
diff --git a/doc/samples/decompose.py b/doc/samples/decompose.py
index e5f428fb2..63350ea09 100755
--- a/doc/samples/decompose.py
+++ b/doc/samples/decompose.py
@@ -1,4 +1,5 @@
"""Decompose Into symmetric and antisymmetric parts example."""
+
# pylint: disable=invalid-name
from numpy import linspace, reshape, array
diff --git a/doc/samples/differential_evolution_simple.py b/doc/samples/differential_evolution_simple.py
index cf415509c..57394dc3b 100755
--- a/doc/samples/differential_evolution_simple.py
+++ b/doc/samples/differential_evolution_simple.py
@@ -1,4 +1,5 @@
"""Simple use of lmfit to fit data."""
+
# pylint: disable=invalid-name
from numpy import linspace, exp, random
diff --git a/doc/samples/double_y_plot.py b/doc/samples/double_y_plot.py
index 51209fb8e..3f4c3fc75 100755
--- a/doc/samples/double_y_plot.py
+++ b/doc/samples/double_y_plot.py
@@ -1,4 +1,5 @@
"""Plot data using two y-axes."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/extrapolate-demo.py b/doc/samples/extrapolate-demo.py
index f1af8ba5b..c6fffd7f2 100755
--- a/doc/samples/extrapolate-demo.py
+++ b/doc/samples/extrapolate-demo.py
@@ -1,4 +1,5 @@
"""Extrapolate data example."""
+
# pylint: disable=invalid-name
from numpy import linspace, ones_like, column_stack, exp, sqrt
from numpy.random import normal, seed
diff --git a/doc/samples/find_peaks_example.py b/doc/samples/find_peaks_example.py
index 0c8ea30fc..dc1fd7c64 100755
--- a/doc/samples/find_peaks_example.py
+++ b/doc/samples/find_peaks_example.py
@@ -1,4 +1,5 @@
"""Detect peaks in a dataset."""
+
# pylint: disable=invalid-name
from Stoner import Data
from Stoner.analysis.fitting.models.generic import Linear
diff --git a/doc/samples/folder_fit.py b/doc/samples/folder_fit.py
index f88aac5fd..d98c0124e 100755
--- a/doc/samples/folder_fit.py
+++ b/doc/samples/folder_fit.py
@@ -1,4 +1,5 @@
"""Demo of Fitting a directory of files."""
+
# pylint: disable=invalid-name
from os.path import join
from matplotlib.pyplot import figure
diff --git a/doc/samples/image/STXMIMage_Demo.py b/doc/samples/image/STXMIMage_Demo.py
index 936a1fe0a..a946263c0 100755
--- a/doc/samples/image/STXMIMage_Demo.py
+++ b/doc/samples/image/STXMIMage_Demo.py
@@ -1,4 +1,5 @@
"""Demonstrate STXM Image Processing - G.Burnell Nov. 2017"""
+
# pylint: disable=invalid-name,no-member
from os.path import join, dirname
from types import MethodType
diff --git a/doc/samples/inset_plot.py b/doc/samples/inset_plot.py
index 5e560609d..777b0a9b9 100755
--- a/doc/samples/inset_plot.py
+++ b/doc/samples/inset_plot.py
@@ -1,4 +1,5 @@
"""Add an inset to a plot."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/joy_division_plot.py b/doc/samples/joy_division_plot.py
index 65f5aadc4..ac008cfdb 100755
--- a/doc/samples/joy_division_plot.py
+++ b/doc/samples/joy_division_plot.py
@@ -11,7 +11,6 @@
class RigakuFolder(DataFolder):
-
"""Quick subclass of DataFolder that knows how to extract multiple files from a single Rigaku file."""
def load_files(self, filename):
diff --git a/doc/samples/lmfit_chi^2_demo.py b/doc/samples/lmfit_chi^2_demo.py
index e570fdf66..5d7280abc 100755
--- a/doc/samples/lmfit_chi^2_demo.py
+++ b/doc/samples/lmfit_chi^2_demo.py
@@ -1,4 +1,5 @@
"""Demo of new Stoner.Analysis.AnalyseFile.lmfit."""
+
# pylint: disable=invalid-name
from os.path import join
diff --git a/doc/samples/lmfit_demo.py b/doc/samples/lmfit_demo.py
index 468c43a22..be699603f 100755
--- a/doc/samples/lmfit_demo.py
+++ b/doc/samples/lmfit_demo.py
@@ -1,4 +1,5 @@
"""Demo of new Stoner.Analysis.AnalyseFile.lmfit."""
+
# pylint: disable=invalid-name
from os.path import join
diff --git a/doc/samples/lmfit_demo_url.py b/doc/samples/lmfit_demo_url.py
index ce3d73684..5da4d4437 100755
--- a/doc/samples/lmfit_demo_url.py
+++ b/doc/samples/lmfit_demo_url.py
@@ -1,4 +1,5 @@
"""Demo of new Stoner.Analysis.AnalyseFile.lmfit."""
+
# pylint: disable=invalid-name
import urllib
import io
diff --git a/doc/samples/lmfit_example.py b/doc/samples/lmfit_example.py
index d6565b0a5..46aad96ab 100755
--- a/doc/samples/lmfit_example.py
+++ b/doc/samples/lmfit_example.py
@@ -1,4 +1,5 @@
"""Example of using lmfit to do a bounded fit."""
+
# pylint: disable=invalid-name
from Stoner import Data
from Stoner.analysis.fitting.models.generic import StretchedExp
diff --git a/doc/samples/lmfit_simple.py b/doc/samples/lmfit_simple.py
index f14f26c8d..c574622b8 100755
--- a/doc/samples/lmfit_simple.py
+++ b/doc/samples/lmfit_simple.py
@@ -1,4 +1,5 @@
"""Simple use of lmfit to fit data."""
+
# pylint: disable=invalid-name
from numpy import linspace, exp, random
diff --git a/doc/samples/matrix_plot.py b/doc/samples/matrix_plot.py
index efa37a81c..fd56d8a8b 100755
--- a/doc/samples/matrix_plot.py
+++ b/doc/samples/matrix_plot.py
@@ -1,13 +1,12 @@
"""Plot data defined on a matrix."""
+
# pylint: disable=invalid-name
import numpy as np
from Stoner import Data
x, y = np.meshgrid(np.linspace(-2, 2, 101), np.linspace(-2, 2, 101))
-z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(
- -np.sqrt(x**2 + y**2)
-)
+z = np.cos(4 * np.pi * np.sqrt(x**2 + y**2)) * np.exp(-np.sqrt(x**2 + y**2))
p = Data()
p = p & np.linspace(-2, 2, 101) & z
diff --git a/doc/samples/multiple_panels_plot.py b/doc/samples/multiple_panels_plot.py
index 7392baada..f79d3362d 100755
--- a/doc/samples/multiple_panels_plot.py
+++ b/doc/samples/multiple_panels_plot.py
@@ -1,4 +1,5 @@
"""Plot data using multiple sub-plots."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/multiple_y2_plot.py b/doc/samples/multiple_y2_plot.py
index 6d22a4e2b..e7516141c 100755
--- a/doc/samples/multiple_y2_plot.py
+++ b/doc/samples/multiple_y2_plot.py
@@ -1,4 +1,5 @@
"""Double y axis plot."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/odr_demo.py b/doc/samples/odr_demo.py
index b19ed4a72..82682041b 100755
--- a/doc/samples/odr_demo.py
+++ b/doc/samples/odr_demo.py
@@ -1,4 +1,5 @@
"""Demo of new Stoner.Analysis.AnalyseFile.lmfit."""
+
# pylint: disable=invalid-name
from os.path import join
diff --git a/doc/samples/odr_model.py b/doc/samples/odr_model.py
index da2966e59..500429ffb 100755
--- a/doc/samples/odr_model.py
+++ b/doc/samples/odr_model.py
@@ -1,4 +1,5 @@
"""Simple use of lmfit to fit data."""
+
# pylint: disable=invalid-name
from numpy import linspace, exp, random
from scipy.odr import Model as odrModel
diff --git a/doc/samples/odr_simple.py b/doc/samples/odr_simple.py
index c47e2d472..703810b99 100755
--- a/doc/samples/odr_simple.py
+++ b/doc/samples/odr_simple.py
@@ -1,4 +1,5 @@
"""Simple use of lmfit to fit data."""
+
# pylint: disable=invalid-name
from numpy import linspace, exp, random
diff --git a/doc/samples/outlier.py b/doc/samples/outlier.py
index b696fa2f4..289201951 100755
--- a/doc/samples/outlier.py
+++ b/doc/samples/outlier.py
@@ -1,4 +1,5 @@
"""Detect outlying points from a lione."""
+
# pylint: disable=invalid-name
import numpy as np
diff --git a/doc/samples/panel_plot.py b/doc/samples/panel_plot.py
index a7f73e61d..20ba2f032 100755
--- a/doc/samples/panel_plot.py
+++ b/doc/samples/panel_plot.py
@@ -1,4 +1,5 @@
"""Plot multiple y data using separate sub-plots."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/peaks_example.py b/doc/samples/peaks_example.py
index 3e41b197a..f15447ec3 100755
--- a/doc/samples/peaks_example.py
+++ b/doc/samples/peaks_example.py
@@ -1,4 +1,5 @@
"""Detect peaks in a dataset."""
+
# pylint: disable=invalid-name,unsubscriptable-object
from matplotlib.cm import jet
from numpy import linspace
diff --git a/doc/samples/plotstyles/GBStyle.py b/doc/samples/plotstyles/GBStyle.py
index 84dc7560a..0e57367e1 100755
--- a/doc/samples/plotstyles/GBStyle.py
+++ b/doc/samples/plotstyles/GBStyle.py
@@ -1,4 +1,5 @@
"""Example plot using experimental GBStyle."""
+
# pylint: disable=invalid-name
import os.path as path
diff --git a/doc/samples/plotstyles/JTBStyle.py b/doc/samples/plotstyles/JTBStyle.py
index 597e06f8f..47c824e72 100755
--- a/doc/samples/plotstyles/JTBStyle.py
+++ b/doc/samples/plotstyles/JTBStyle.py
@@ -1,4 +1,5 @@
"""Example plot using Joe Batley's plot style."""
+
# pylint: disable=invalid-name
import os.path as path
diff --git a/doc/samples/plotstyles/PRBStyle.py b/doc/samples/plotstyles/PRBStyle.py
index 60bbe27b1..36b226a01 100755
--- a/doc/samples/plotstyles/PRBStyle.py
+++ b/doc/samples/plotstyles/PRBStyle.py
@@ -1,4 +1,5 @@
"""Example plot using a style similar to Physical Review B."""
+
# pylint: disable=invalid-name
import os.path as path
diff --git a/doc/samples/plotstyles/SeabornStyle.py b/doc/samples/plotstyles/SeabornStyle.py
index ceade5884..60d11385a 100755
--- a/doc/samples/plotstyles/SeabornStyle.py
+++ b/doc/samples/plotstyles/SeabornStyle.py
@@ -1,4 +1,5 @@
"""Example plot style using Seaborn plot styling template."""
+
# pylint: disable=invalid-name
import os.path as path
diff --git a/doc/samples/plotstyles/SketchStyle.py b/doc/samples/plotstyles/SketchStyle.py
index 52c755db6..3dbeac4bd 100755
--- a/doc/samples/plotstyles/SketchStyle.py
+++ b/doc/samples/plotstyles/SketchStyle.py
@@ -1,4 +1,5 @@
"""Example plot in XKCD comic style SketchPlot template."""
+
# pylint: disable=invalid-name
import os.path as path
from Stoner import Data, __home__
diff --git a/doc/samples/plotstyles/customising.py b/doc/samples/plotstyles/customising.py
index 74c1448d0..80db26213 100755
--- a/doc/samples/plotstyles/customising.py
+++ b/doc/samples/plotstyles/customising.py
@@ -1,4 +1,5 @@
"""Example customising a plot using default style."""
+
# pylint: disable=invalid-name
import os.path as path
from cycler import cycler
diff --git a/doc/samples/plotstyles/default.py b/doc/samples/plotstyles/default.py
index 4492b5f26..05411230c 100755
--- a/doc/samples/plotstyles/default.py
+++ b/doc/samples/plotstyles/default.py
@@ -1,4 +1,5 @@
"""Example plot using default style."""
+
# pylint: disable=invalid-name
import os.path as path
diff --git a/doc/samples/scale_curves.py b/doc/samples/scale_curves.py
index 162229312..5400ae60d 100755
--- a/doc/samples/scale_curves.py
+++ b/doc/samples/scale_curves.py
@@ -1,4 +1,5 @@
"""Example of using scale to overlap data."""
+
# pylint: disable=invalid-name, no-member
from numpy import linspace, sin, exp, pi, column_stack
from numpy.random import normal, seed
diff --git a/doc/samples/select_example.py b/doc/samples/select_example.py
index 4c3e2598f..17d6b748f 100755
--- a/doc/samples/select_example.py
+++ b/doc/samples/select_example.py
@@ -1,4 +1,5 @@
"""Example using select method to pick out data."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/single_plot.py b/doc/samples/single_plot.py
index 0298eaec2..b5ceb8bd0 100755
--- a/doc/samples/single_plot.py
+++ b/doc/samples/single_plot.py
@@ -1,4 +1,5 @@
"""Simple plot in 2 lines."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/sphere_fit.py b/doc/samples/sphere_fit.py
index a7ed9df45..272c5abd7 100755
--- a/doc/samples/sphere_fit.py
+++ b/doc/samples/sphere_fit.py
@@ -1,4 +1,5 @@
"""Fit a sphere with curve_fit."""
+
# pylint: disable=invalid-name, redefined-outer-name
from numpy import (
sin,
diff --git a/doc/samples/stitch.py b/doc/samples/stitch.py
index 96a2f267c..70c26f8ad 100755
--- a/doc/samples/stitch.py
+++ b/doc/samples/stitch.py
@@ -1,4 +1,5 @@
"""Scale data to stitch it together."""
+
# pylint: disable=invalid-name
import matplotlib.pyplot as plt
diff --git a/doc/samples/stitch_int_overlap.py b/doc/samples/stitch_int_overlap.py
index 7a8f98e11..72766637a 100755
--- a/doc/samples/stitch_int_overlap.py
+++ b/doc/samples/stitch_int_overlap.py
@@ -1,6 +1,7 @@
"""Scale data to stitch it together.
This example demonstrates specifying the overlap as an integer and scaling both curves to match the other."""
+
# pylint: disable=invalid-name
import matplotlib.pyplot as plt
diff --git a/doc/samples/subplot_plot.py b/doc/samples/subplot_plot.py
index 25ec5b452..d3d762a11 100755
--- a/doc/samples/subplot_plot.py
+++ b/doc/samples/subplot_plot.py
@@ -1,4 +1,5 @@
"""Independent sub plots for multiple y data."""
+
# pylint: disable=invalid-name
from Stoner import Data
diff --git a/doc/samples/template.py b/doc/samples/template.py
index 245c18a21..94d01f412 100755
--- a/doc/samples/template.py
+++ b/doc/samples/template.py
@@ -1,4 +1,5 @@
"""Simple plotting with a template."""
+
# pylint: disable=invalid-name, no-member
from cycler import cycler
diff --git a/doc/samples/template2.py b/doc/samples/template2.py
index 7e169c069..445ef8a3e 100755
--- a/doc/samples/template2.py
+++ b/doc/samples/template2.py
@@ -1,4 +1,5 @@
"""Customising a template for plotting."""
+
# pylint: disable=invalid-name
from Stoner import Data
from Stoner.plot.formats import SketchPlot
diff --git a/doc/samples/voxel_plot.py b/doc/samples/voxel_plot.py
index 0b5210a5d..d6e680e48 100755
--- a/doc/samples/voxel_plot.py
+++ b/doc/samples/voxel_plot.py
@@ -1,4 +1,5 @@
"""3D surface plot example."""
+
# pylint: disable=invalid-name
import numpy as np
import matplotlib.cm
diff --git a/scripts/BNL_FileSplitter.py b/scripts/BNL_FileSplitter.py
index dd84660ab..4acbdedd7 100755
--- a/scripts/BNL_FileSplitter.py
+++ b/scripts/BNL_FileSplitter.py
@@ -4,6 +4,7 @@
Will overwrite any files already split but that should be ok for an update.
"""
+
# pylint: disable=invalid-name
import os
import numpy as np
diff --git a/scripts/GenX/stoner.py b/scripts/GenX/stoner.py
index df7fa68d5..9bc2ea99a 100755
--- a/scripts/GenX/stoner.py
+++ b/scripts/GenX/stoner.py
@@ -3,6 +3,7 @@
Hacked up version of the default data loader plugin that uses the Stoner package classes to
read in data files. Supports loading from the Brucker D8
"""
+
# pylint: disable=invalid-name
import numpy as np
import wx
@@ -16,7 +17,6 @@
class Plugin(Template):
-
"""Plugin class from GenX."""
def __init__(self, parent):
@@ -94,7 +94,6 @@ def SettingsDialog(self):
class SettingsDialog(wx.Dialog):
-
"""Plugin Settings dialog class."""
def __init__(self, parent, col_values):
diff --git a/scripts/Kiessig.py b/scripts/Kiessig.py
index 82d1a4310..cdf010f46 100755
--- a/scripts/Kiessig.py
+++ b/scripts/Kiessig.py
@@ -4,6 +4,7 @@
TODO: Implement an error bar on the uncertainity by understanding the significance of the covariance terms
"""
+
# pylint: disable=invalid-name
import sys
from copy import copy
diff --git a/scripts/PCAR-New.py b/scripts/PCAR-New.py
index d923cf6d6..92ad71559 100755
--- a/scripts/PCAR-New.py
+++ b/scripts/PCAR-New.py
@@ -2,6 +2,7 @@
Gavin Burnell g.burnell@leeds.ac.uk
"""
+
# pylint: disable=invalid-name
import configparser as ConfigParser
import pathlib
@@ -13,7 +14,6 @@
class working(Data):
-
"""Utility class to manipulate data and plot it."""
def __init__(self, *args, **kargs):
diff --git a/scripts/VSManalysis_v2.py b/scripts/VSManalysis_v2.py
index f61b87a29..718a6618e 100755
--- a/scripts/VSManalysis_v2.py
+++ b/scripts/VSManalysis_v2.py
@@ -15,6 +15,7 @@
shift algorithm is different to make for better zeroing
"""
+
# pylint: disable=invalid-name, redefined-outer-name
import os
diff --git a/scripts/VSManalysis_v3.py b/scripts/VSManalysis_v3.py
index 5e84b4d1a..314ce34d6 100755
--- a/scripts/VSManalysis_v3.py
+++ b/scripts/VSManalysis_v3.py
@@ -13,7 +13,6 @@
class VSMAnalysis(Data):
-
"""Augment Data with some extra methods."""
def true_m(self):
diff --git a/scripts/XMCD_Reduction.py b/scripts/XMCD_Reduction.py
index fedb15bdc..8eb7a39a8 100755
--- a/scripts/XMCD_Reduction.py
+++ b/scripts/XMCD_Reduction.py
@@ -1,4 +1,5 @@
"""Simple XMCD Data reduction example."""
+
# pylint: disable=invalid-name, redefined-outer-name
import re
import numpy as np