!_      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^None.SUVX_[_emd>Treats every item in a "plateu" as a local minimum or maximum._None4>MX_c`emdSimilar to Conduiti: Type of input streamo: Type of output streamu: Type of the resultA of the upstream pipe (Outputted when upstream pipe finishes)m: Underlying monada': Result type (Outputted when finished)Some specializations: A pipe is a producer if i is ()4: it doesn't need anything to go pump out items.If a pipe is producer and a is a/, it means that it will produce infinitely. A pipe is a consumer if o is a3: it will never yield anything else downstream.-Normally you can ask for input upstream with b, which returns c4 if the pipe upstream stops producing. However, if u is aF, it means that the pipe upstream will never stop, so you can use d to get a guaranteed answer.eemdfF = distribute input to all, and return the first result that finishesg = never finishhemdi> = distribute input to all, and return result when they finishj = immediately finishklm`nbdopqrstuvwxyz{p2None .HUVXk|emd :https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm Will return c8 if the matrix is not invertible. This will happen if: +The first item in the main diagonal is zeroThere is any i such that b_{i + 1} = a_i * c_i. That is, an item in the main diagonal is equal to the product of the off-diagonal elements a row above itAnother mystery condition!|emda: Bottom diagonal of Memdb: Main diagonal of Memdc: Upper diagonal of Memdyemdx such that M x = y|(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone "#&'.07UVXk)g emd1D Cubic spline}emda~emdbemdy_{i-1}emdy_iemd x_i - x_{i-1}emdEnd condition for splineemdc"Not-a-knot" condition: third derivatives are continuous at endpoints. Default for matlab spline.emd@"Natural" condition: curve becomes a straight line at endpoints.emdH"Clamped" condition: Slope of curves at endpoints are explicitly given.emd!Sample a spline at a given point.emdaBuild a cubic spline based on control points using given end conditions (not-a-knot, or natural) 2https://en.wikipedia.org/wiki/Spline_interpolationemdemd(x, y)emdderivative at left endemdderivative at right endNone"#&'-.7HSUVX_kJ!emdResult of a single sift emdVThe result of a sifting operation. Each sift either yields a residual, or a new IMF.emdnumber of sifting iterations emd1A projection of sifting data. Used as a part of  to describe  and .emd*The root mean square of the envelope meansemd7The "energy difference" quotient (Cheng, Yu, Yang 2005)emd#Stop conditions for sifting process<Data type is lazy in its fields, so this infinite data type: nTimes n = SCTimes n  nTimes (n + 1) will be treated identically as: nTimes = SCTimes emdStop using standard SD method emdHWhen the difference between successive items reaches a given threshold \tau8 \frac{\left(f(t-1) - f(t)\right)^2}{f^2(t-1)} < \tau  emd)When the value reaches a given threshold \tau f(t) < \tau  emdS-condition criteria.rThe S-number is the length of current streak where number of extrema or zero crossings all differ at most by one.6Stop sifting when the S-number reaches a given amount.emd/Stop after a fixed number of sifting iterationsemdOne or the otheremd!Stop when both conditions are metemd Boundary conditions for splines.emd4Clamp envelope at end points (Matlab implementation)emdExtend boundaries symmetricallyemdOptions for EMD composition. emdstop condition for sifting!emd#end conditions for envelope splines"emdprocess for handling boundary#emdDefault $emdDefault %emdCheng, Yu, Yang suggest pairing together an energy difference threshold with a threshold for mean envelope RMS. This is a convenience function to construct that pairing.&emdFIterated sifting process, used to produce either an IMF or a residual.emd Single sift'emd@Returns cubic splines of local minimums and maximums. Returns cJ if there are not enough local minimum or maximums to create the splines.emd7Build a splined vector against a map of control points.emdemdemdemdemd%emdThreshold for Energy DifferenceemdThreshold for mean envelope RMSemd extensions  !"#$%&'(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone"#&'-.7HSUVX_kYn(emdAn ( 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 * and +0 should yield exactly the original series (see /).,emdNEMD decomposition of a given time series with a given sifting stop condition.$Takes a sized vector to ensure that: The resulting (D contains IMFs that are all the same length as the input vector,We provide a vector of size of at least one.-emd,n, but tracing results to stdout as IMFs are found. Useful for debugging to see how long each step is taking..emd,$ with a callback for each found IMF./emd Collapse an (C back into its original time series. Should be a left-inverse to ,: using / on the result of ,' should give back the original vector.0emd1emd'  !"#$%&'()*+,-./',-./()*+ !"#$%& 'None>Z(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone"#%.7>HUVX`kM6emdA Hilbert-Huang Transform. An 6 v n a% is a Hilbert-Huang transform of an n#-item time series of items of type a represented using vector v. Create using ? or @.8emd(Skeleton lines corresponding to each IMF9 emdResidual from EMD:emd?A Hilbert Trasnform of a given IMF, given as a "skeleton line".<emd#IMF HHT Magnitude as a time series.+It may be useful to "zip" this vector with =$. To do this, use a function like  or 8 to make these two vectors contain the same length, or 'weaken'/'shift' to make indices in = usable as indices in <.:Prior to v0.1.9.0, this was a length-n vector, just like =!. To get the same behavior, use  on this new field's value.=emdCIMF HHT instantaneous frequency as a time series (between 0 and 1).MIn reality, these frequencies are the frequencies "in between" each step in <.> emd3Initial phase of skeleton line (between -pi and pi)?emdfDirectly compute the Hilbert-Huang transform of a given time series. Essentially is a composition of @ and ,. See @ for a more flexible version.@emdOCompute the Hilbert-Huang transform from a given Empirical Mode Decomposition.A emdIInvert a Hilbert-Huang transform back to an Empirical Mode DecompositionB emdEConstruct a time series correpsonding to its hilbert-huang transform.CemdmFold and collapse a Hilbert-Huang transform along the frequency axis at each step in time along some monoid.DemdCompute the full Hilbert-Huang Transform spectrum. At each timestep is a sparse map of frequency components and their respective magnitudes. Frequencies not in the map are considered to be zero.aTakes a "binning" function to allow you to specify how specific you want your frequencies to be.See E for a sparser version, and F for a denser version.EemdA sparser vesion of DB. Compute the full Hilbert-Huang Transform spectrum. Returns a sparse7 matrix representing the power at each time step (the  n) and frequency (the k).aTakes a "binning" function to allow you to specify how specific you want your frequencies to be.FemdA denser version of D. Compute the full Hilbert-Huang Transform spectrum, returning a dense matrix (as a vector of vectors) representing the power at each time step and each frequency.;Takes a "binning" function that maps a frequency to one of m7 discrete slots, for accumulation in the dense matrix.GemdCompute the marginal spectrum given a Hilbert-Huang Transform. It provides the "total power" over the entire time series for each frequency component. See H for a version that averages over the length of the time series, making it more close in nature to the purpose of a Fourier Transform.eA binning function is accepted to allow you to specify how specific you want your frequencies to be.HemdCompute the mean marginal spectrum given a Hilbert-Huang Transform. It is similar to a Fourier Transform; it provides the "total power" over the entire time series for each frequency component, averaged over the length of the time series.eA binning function is accepted to allow you to specify how specific you want your frequencies to be.IemdReturns the "expected value" of frequency at each time step, calculated as a weighted average of all contributions at every frequency at that time step.JemdbReturns the dominant frequency (frequency with largest magnitude contribution) at each time step.KemdcCompute the instantaneous energy of the time series at every step via the Hilbert-Huang Transform.Lemd3Degree of stationarity, as a function of frequency.Memd1Given a time series, return a time series of the  magnitude# of the hilbert transform and the  frequencyo of the hilbert transform, in units of revolutions per tick. Is only expected to taken in proper/legal IMFs.The frequency will always be between 0 and 1, since we can't determine anything faster given the discretization, and we exclude negative values as physically unmeaningful for an IMF.NemdThe polar form of OQ: returns the magnitude and phase of the discrete hilbert transform of a series.FThe computation of magnitude is unique, but computing phase gives us some ambiguity. The interpretation of the hilbert transform for instantaneous frequency is that the original series "spirals" around the complex plane as time progresses, like a helix. So, we impose a constraint on the phase to uniquely determine it:  \phi_{t+1} is the minimal valid phase such that \phi_{t+1} \geq \phi_{t}d. This enforces the phase to be monotonically increasing at the slowest possible detectable rate.OemdReal part is original series and imaginary part is hilbert transformed series. Creates a "helical" form of the original series that rotates along the complex plane.Note that since 0.1.7.0=, this uses the same algorithm as the matlab implementation 6https://www.mathworks.com/help/signal/ref/hilbert.htmlPemdHilbert transformed series. Essentially the same series, but phase-shifted 90 degrees. Is so-named because it is the "imaginary part" of the proper hilbert transform, O.Note that since 0.1.7.0=, this uses the same algorithm as the matlab implementation 6https://www.mathworks.com/help/signal/ref/hilbert.htmlQemdRemdSemdTemdCemd4Combining function, taking frequency, then magnitudeemdProjecting functionDemd7binning function. takes rev/tick freq between 0 and 1.Eemd7binning function. takes rev/tick freq between 0 and 1.Femd7binning function. takes rev/tick freq between 0 and 1.Gemd7binning function. takes rev/tick freq between 0 and 1.Hemd7binning function. takes rev/tick freq between 0 and 1.Lemd7binning function. takes rev/tick freq between 0 and 1.1 !"#$6789:;<=>?@ABCDEFGHIJKLMNOP16789:;<=>@?ABDEFHGKLIJC !"#$OPNM      !"#$%&'()*+,-./01123456789:;<=>>?@AABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijgklmngopgoqrgosgotuuvwxyz{|}~emd-0.1.10.0-inplaceNumeric.EMD.Internal.Spline Numeric.EMD Numeric.HHTNumeric.EMD.Internal.ExtremaNumeric.EMD.Internal.Pipe Numeric.EMD.Internal.TridiagonalNumeric.EMD.Internal.SiftNumeric.HHT.Internal.FFTSpline SplineEnd SENotAKnot SENatural SEClamped sampleSpline makeSpline$fBinarySplineEnd$fShowSplineEnd $fEqSplineEnd$fOrdSplineEnd$fGenericSplineEnd$fShowSplineCoef SiftResult SRResidualSRIMFSiftProjection SPEnvMeanSum SPEnergyDiff SiftConditionSCStdDevSCCauchySCProjSCSCondSCTimesSCOrSCAndBoundaryHandlerBHClamp BHSymmetricEMDOptsEOeoSiftCondition eoSplineEndeoBoundaryHandler defaultEO defaultSC scEnergyDiffsift envelopesEMDemdIMFs emdResidualemdemdTraceemd'iemd $fBinaryEMD $fNFDataEMD $fShowEMD $fGenericEMD$fEqEMD$fOrdEMDHHThhtLines hhtResidualHHTLinehlMagshlFreqs hlInitPhasehhthhtEmdihhtEmdihhtfoldFreq hhtSpectrumhhtSparseSpectrumhhtDenseSpectrummarginal meanMarginal expectedFreq dominantFreqinstantaneousEnergydegreeOfStationarityhilbertMagFreq hilbertPolarhilbert hilbertIm$fNFDataHHTLine$fBinaryHHTLine $fNFDataHHT $fBinaryHHT$fMonoidSumMap$fSemigroupSumMap $fShowHHTLine $fEqHHTLine $fOrdHHTLine$fGenericHHTLine $fShowHHT$fEqHHT$fOrdHHT $fGenericHHTextremaPipebase Data.VoidVoidawait GHC.MaybeNothing awaitSurely$fAlternativeZipSinkGHC.Base<|>empty$fApplicativeZipSink<*>pureZipSink getZipSink awaitEitherrunPipe.|unfoldPunfoldPForeveriterateP sourceListrepeatM awaitForevermapPmapMPdropPfoldrPsinkListsolveTridiagonal_scAlpha_scBeta _scGamma0 _scGamma1_scDeltaclamped SingleSiftsift' splineAgainst$fBinaryBoundaryHandler$fDefaultSiftCondition$fBinarySiftCondition$fDefaultEMDOpts$fBinaryEMDOptsfftifftUvector-sized-1.4.0.0-e04ce6b83dd2eb19bf90efc18e8e23aa16bd34cd4f7c7c73c2aa963e9f2167b6Data.Vector.Generic.SizedinittailXfinite-typelits-0.1.4.2-7d241a11b2813bf176fcf1f914f3665e4fd52b732c1cda6c1eedd668fda5fc53Data.Finite.InternalFinite