emd 0.1.2.0 → 0.1.2.1
raw patch · 5 files changed
+28/−7 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +11/−0
- emd.cabal +2/−2
- src/Numeric/EMD.hs +3/−0
- src/Numeric/EMD/Internal/Spline.hs +11/−3
- src/Numeric/HHT.hs +1/−2
CHANGELOG.md view
@@ -1,6 +1,16 @@ Changelog ========= +Version 0.1.2.1+---------------++*July 27, 2018*++<https://github.com/mstksg/emd/releases/tag/v0.1.2.1>++* *BUG FIX* Fixed behavior of frequency wrapping to wrap between 0 and 1,+ instead of 0.5, as claimed!+ Version 0.1.2.0 --------------- @@ -11,6 +21,7 @@ * Actually implemented the Hilbert-Huang transform * Allowed for other border handling behaviors during EMD * Changed default stopping conditions for sifting process+* Added clamped spline end conditions. * Removed unsized interface * Sifting will now throw runtime exception for singular splining matrices, instead of treating the result as a residual. This might change in the
emd.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 1b094b03f7c2c369028d76bd580e55e637de3c9d9e63c53dd715fa2bb4187644+-- hash: eba3e48d66b797a1e9b109e1bb2cc296003754c5adda30419efb80cfee7a1d66 name: emd-version: 0.1.2.0+version: 0.1.2.1 synopsis: Empirical Mode Decomposition and Hilbert-Huang Transform description: Please see the README on GitHub at <https://github.com/mstksg/emd#readme> category: Math
src/Numeric/EMD.hs view
@@ -122,6 +122,9 @@ -- | An @'EMD' v n a@ is an Empirical Mode Decomposition of a time series -- with @n@ items of type @a@ stored in a vector @v@.+--+-- The component-wise sum of 'emdIMFs' and 'emdResidual' should yield+-- exactly the original series. data EMD v n a = EMD { emdIMFs :: ![SVG.Vector v n a] , emdResidual :: !(SVG.Vector v n a) }
src/Numeric/EMD/Internal/Spline.hs view
@@ -40,9 +40,17 @@ import qualified Data.Vector.Sized as SV -- | End condition for spline-data SplineEnd a = SENotAKnot- | SENatural- | SEClamped a a+data SplineEnd a+ -- | "Not-a-knot" condition: third derivatives are continuous at+ -- endpoints. Default for matlab spline.+ = SENotAKnot+ -- | \"Natural\" condition: curve becomes a straight line at endpoints.+ | SENatural+ -- | \"Clamped\" condition: Slope of curves at endpoints are explicitly+ -- given.+ --+ -- @since 0.1.2.0+ | SEClamped a a deriving (Show, Eq, Ord) data SplineCoef a = SC { _scAlpha :: !a -- ^ a
src/Numeric/HHT.hs view
@@ -162,8 +162,7 @@ v' = hilbertIm v hilbertMag = SVG.zipWith (\x x' -> magnitude (x :+ x')) v v' hilbertPhase = SVG.zipWith (\x x' -> phase (x :+ x')) v v'- hilbertFreq = SVG.map (wrap . (/ (2 * pi))) $ SVG.tail hilbertPhase - SVG.init hilbertPhase- wrap = subtract 0.5 . (`mod'` 1) . (+ 0.5)+ hilbertFreq = SVG.map ((`mod'` 1) . (/ (2 * pi))) $ SVG.tail hilbertPhase - SVG.init hilbertPhase -- | Real part is original series and imaginary part is hilbert transformed -- series. Creates a "helical" form of the original series that rotates