topostats ========= .. py:module:: topostats .. autoapi-nested-parse:: Topostats. .. !! processed by numpydoc !! Subpackages ----------- .. toctree:: :maxdepth: 1 /autoapi/topostats/logs/index /autoapi/topostats/tracing/index Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/topostats/__main__/index /autoapi/topostats/entry_point/index /autoapi/topostats/filters/index /autoapi/topostats/grains/index /autoapi/topostats/grainstats/index /autoapi/topostats/io/index /autoapi/topostats/plotting/index /autoapi/topostats/plottingfuncs/index /autoapi/topostats/processing/index /autoapi/topostats/run_topostats/index /autoapi/topostats/scars/index /autoapi/topostats/statistics/index /autoapi/topostats/theme/index /autoapi/topostats/thresholds/index /autoapi/topostats/unet_masking/index /autoapi/topostats/utils/index /autoapi/topostats/validation/index Attributes ---------- .. autoapisummary:: topostats.LOGGER topostats.release topostats.__version__ Classes ------- .. autoapisummary:: topostats.Colormap Functions --------- .. autoapisummary:: topostats.setup_logger Package Contents ---------------- .. py:function:: setup_logger(log_name: str = LOGGER_NAME) -> logging.Logger Logger setup. The logger for the module is initialised when the module is loaded (as this functions is called from __init__.py). This creates two stream handlers, one for general output and one for errors which are formatted differently (there is greater information in the error formatter). To use in modules import the 'LOGGER_NAME' and create a logger as shown in the Examples, it will inherit the formatting and direction of messages to the correct stream. :param log_name: Name under which logging information occurs. :type log_name: str :returns: Logger object. :rtype: logging.Logger .. rubric:: Examples To use the logger in (sub-)modules have the following. import logging from topostats.logs.logs import LOGGER_NAME LOGGER = logging.getLogger(LOGGER_NAME) LOGGER.info('This is a log message.') .. !! processed by numpydoc !! .. py:class:: Colormap(name: str = 'nanoscope') Class for setting the Colormap. :param name: Name of colormap to use. :type name: str .. !! processed by numpydoc !! .. py:attribute:: name .. py:attribute:: cmap :value: None .. py:method:: __str__() -> str Return string representation of object. :returns: String detailing the colormap. :rtype: str .. !! processed by numpydoc !! .. py:method:: set_cmap(name: str) -> None Set the ColorMap. :param name: Name of the colormap to return. :type name: str .. !! processed by numpydoc !! .. py:method:: get_cmap() -> matplotlib.cm Return the matplotlib.cm colormap object. :returns: Matplotlib Color map object. :rtype: matplotlib.cm .. !! processed by numpydoc !! .. py:method:: nanoscope() -> matplotlib.colors.LinearSegmentedColormap :staticmethod: Matplotlib compatible colormap that replicates the Bruker Nanoscope colorscale. The colormap is implemented in Gwyddion's GwyGradient via 'Nanoscope.txt'. :returns: MatplotLib LinearSegmentedColourmap that replicates Bruker Nanoscope colorscale. :rtype: LinearSegmentedColormap .. !! processed by numpydoc !! .. py:method:: gwyddion() -> matplotlib.colors.LinearSegmentedColormap :staticmethod: Set RGBA colour map for the Gwyddion.net colour gradient. :returns: The 'gwyddion' colormap. :rtype: LinearSegmentedColormap .. !! processed by numpydoc !! .. py:method:: blue() -> matplotlib.colors.ListedColormap :staticmethod: Set RGBA colour map of just the colour blue. :returns: The 'blue' colormap. :rtype: ListedColormap .. !! processed by numpydoc !! .. py:method:: blue_purple_green() -> matplotlib.colors.ListedColormap :staticmethod: RGBA colour map of just the colour blue/purple/green. :returns: The 'blue/purple/green' colormap. :rtype: ListedColormap .. !! processed by numpydoc !! .. py:data:: LOGGER .. py:data:: release .. py:data:: __version__