{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Hysteresis values\n", "\n", "It is often needed to generate the values of the hysteresis loop, knowing the maximum, minimum, and step values. There is a convenience fuinction in `ubermagutil`, which does exactly that.\n", "\n", "Let us say we want to generate hysteresis loop values with:\n", "\n", "$$v_\\text{min} = -1$$\n", "$$v_\\text{max} = -1$$\n", "$$\\Delta v = 0.5$$\n", "\n", "This can be done using `hysteresis_values` function." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[1.0, 0.5, 0.0, -0.5, -1.0, -0.5, 0.0, 0.5, 1.0]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import ubermagutil as uu\n", "\n", "uu.hysteresis_values(vmin=-1, vmax=1, step=0.5)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }