Skip to content

Releases: cslotboom/hysteresis

2.0 - Generalizing Behaviour

04 Jun 00:03
Compare
Choose a tag to compare

I'm excited to roll out version 2.0! This release doesn't add a lot of new features, but it fixes a lot of bugs and implements better practices across the board and makes using "non-hysteresis" curves easier.

When I started this Library, I was focused on analyzing Hyteresis curves. A lot of behaviour and terminology in 1.0 assumed that "smaller" curves, like the SimpleCycle, were part of a Hysteresis. For example, in our plot functions, we had keyword arguments like "plotCycles". While this made sense in a Hysteresis, it did not for a Monotonic curve where there are no cycles!

I wanted the library to have a more broad scope and be able to support other types of curves without using them in a hysteresis. Among other things, this required a lot of language changes, in a way which did not preserve backwards compatibility. As this is 2.0, it WILL break things, mostly requiring variable name changes.

Detailed changes are as follows:

BaseClass

  • Renamed the module to the more representative "curve"
  • Renamed CurveBase to Curve
  • Added the super classes CurvePlotter, CurveOperations, and had curve inherit from these to get it's plotting behaviour and operations
  • Removed deprecation warnings for using "peakDist" in hysteresis objects. These should be called as "revDist" instead.
  • Overhauled the variable names in all plot functions. so they are more general and better suit what is actually being done. The language was confusing for non hysteresis curves that may have reversals but not peaks.
    • plotCycles -> showReversals
    • plotPeaks -> showPeaks
    • labelCycles -> labelReversals
    • cycleIndexes - > cycleIndicies

General

  • Consolidated language around "Indexes" and "Indices" - everything is now uses "Indexes".
  • Fixed a bug where plotCycles and plotSubCycles was not returning the lines properly
  • Added default values for reversalIndexes and peakIndexes
  • Combined x/y to a single variable in the plot function.
  • Consolidated inputs for showCycles:

Examples:

  • Updated example 4.1 to work properly..
  • Added a WCTE example section.

v1.2 Concatenate and Resample

30 Oct 08:13
Compare
Choose a tag to compare

This release is largely focused at changing the behavior of concatenate, as well as adding a "resampleRegion command".

I wanted to be able to concatenate curves to other objects, i.e. simplecycles. The concatenate function solves this, and allows the user to specify what object they want to use in concatenation. There's one breaking change here - concatenateHys will now take inputs in a list. Managing loose inputs was becoming a nightmare, and this brings it's behavior in line with it's inspiration: numpy's concatenate function.

I also wanted the new objects to have some of the properties of the old objects when resampling - for example, if we resample a simpleCycles and the slope was set for the simpleCycle, the resampled simpleCycle will have it's slope set. To do this I've added some methods for storing and copying state functions to the back-end of some objects.

I was finding that when I made load protocols, I would often only want to resample only a segment of the curve. "resampleRegion" is my answer to this, and allows the user to set regions, i.e. the first and last 10% of a curve, and only use those regions for resampling.

Breaking changes:

  • modified concatenateHys to take inputs in a list, instead of loose arguments.

Additions:

  • added some state properties to hysteresis in the backend, which control how cycles/peaks are found.
  • added concatenate, which can concatenate objects to other classes, i.e. simplecycles.
  • updated concatenateHys to use concatenate by default
  • added resampleRegion, which can be used to resample only part of a curve.
  • new tests for all above functions

v1.1 - Plot Special and Operations

21 Nov 03:52
Compare
Choose a tag to compare

This release focuses on two new features - an animations module for the plotSpecial sub-module, and support of operations for hysteresis curves.

PlotSpecial:

  • A PlotSpecial.Animations module module focused on animations of hysteresis curves
  • A base animation
  • A joint animation
  • Examples showcasing both features

Operations:

  • operations +, -, *, / for all hysteresis curves
  • An example showcasing these features.

Full Changelog: 1.0.5...1.1

v1.0.5 Reversal Attributes

02 May 09:48
Compare
Choose a tag to compare

Removed:

  • Deprecated using "peakDist", "peakWidth", "peakProminence" as kwargs for finding reversal points.

Added:

  • The attributes "revDist", "revWidth", "revProminence" to hysteresis objects.
  • Enables "revDist", "revWidth", "revProminence" as kwargs for finding reversal points. Added these variables as attributes.
  • Added the "recalculateCycles_like" method to hysteresis objects to the recalculate reversal points like another hysteresis.
  • Added the getReversalxy method to the hysteresis class. This returns the xy values of the reversal points.
  • Removed the "xlim" and "ylim" kwargs for several plot functions. These were never implemented and doing nothing.

v1.0 - First release

25 Jan 05:09
Compare
Choose a tag to compare

With this release I have implemented all of the basic features I want for the package. The tests suite is covering the important functions, and basic documentation is completed.

The core classes include:

  • Hysteresis
  • SimpleCycle
  • MonotonicCurve

The core functions of the package include:

  • concatenateHys
  • resample
  • resampleDx
  • compareCycle
  • compareHys
  • exandHysTrace
  • createProtocol
  • getBackboneCurve
  • getAvgBackbone
  • fitEEEP

For climate data, the key classes include:

  • SeasonalCurve