Skip to content

drola/hysteresis-interpolator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Hysteresis interpolator

This is a simple class based on NumPy/SciPy that enables you to interpolate values of a function with respect to direction. You get one curve when ascending and the other one when declining.

Usage

If you have a datafile with columns like this:

#H [A/m]	B[T]
...rows with values over time...

you can obtain value of B at any H like this:

from HysteresisInterpolator import *
ip = HysteresisInterpolator.fromFile("datafile.dat", 0, 1)
print ip(particular_H, direction)

direction is either positive or negative number that tells the interpolator which curve so select in terms of rising/falling.

If you want to skip some lines you can add additional parameter skip like this:

ip = HysteresisInterpolator.fromFile("gp000.dat", 1, 0, skip=15)

About

Hysteresis interpolator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages