Skip to content

2.0 - Generalizing Behaviour

Latest
Compare
Choose a tag to compare
@cslotboom cslotboom released this 04 Jun 00:03
· 17 commits to master since this release

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.