diff --git a/Project.toml b/Project.toml index 7a3e64b..a5dea92 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SignalAnalysis" uuid = "df1fea92-c066-49dd-8b36-eace3378ea47" authors = ["Mandar Chitre "] -version = "0.10.0" +version = "0.10.1" [deps] DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" @@ -15,6 +15,7 @@ PaddedViews = "5432bcbf-9aad-5242-b902-cca2824c8663" Peaks = "18e31ff7-3703-566c-8e60-38913d67486b" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +Reexport = "189a3867-3050-52da-a836-e630ba90ab69" Requires = "ae029012-a4dd-5104-9daa-d747884805df" SignalBase = "00c44e92-20f5-44bc-8f45-a1dcef76ba38" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" @@ -31,6 +32,7 @@ Optim = "1" PaddedViews = "0.5" Peaks = "0.5" PrecompileTools = "1" +Reexport = "1.2.2" Requires = "1" SignalBase = "0.1" WAV = "1" diff --git a/src/SignalAnalysis.jl b/src/SignalAnalysis.jl index 60290e4..bd471ff 100644 --- a/src/SignalAnalysis.jl +++ b/src/SignalAnalysis.jl @@ -1,21 +1,19 @@ module SignalAnalysis using Requires +using Reexport using DocStringExtensions -using SignalBase -using SignalBase.Units +@reexport using SignalBase +@reexport using SignalBase.Units -# from SignalBase -export nframes, nchannels, sampletype, framerate, duration -export 𝓈, ms, Hz, kHz - -# from DSP -export db2amp, amp2db, pow2db, db2pow, stft +@reexport using DSP +@reexport using FFTW +@reexport using Peaks +@reexport using Statistics +@reexport using LinearAlgebra -# from Peaks -export findmaxima, argmaxima, peakproms, peakproms!, peakwidths, peakwidths! -export peakheights, peakheights!, filterpeaks!, findnextmaxima +export 𝓈, ms, Hz, kHz const 𝓈 = Units.s diff --git a/src/array.jl b/src/array.jl index 08a57fb..0c2b9ce 100644 --- a/src/array.jl +++ b/src/array.jl @@ -1,6 +1,3 @@ -using LinearAlgebra -import Base.@kwdef - export steering, beamform export Bartlett, Capon, Music @@ -14,14 +11,14 @@ struct Bartlett <: Beamformer end @doc """ Frequency-domain Capon beamformer with diagonal loading factor `γ`. """ Capon -@kwdef struct Capon <: Beamformer +Base.@kwdef struct Capon <: Beamformer γ = 0.0 end @doc """ Frequency-domain MUSIC beamformer with `nsignals` signals. """ Music -@kwdef struct Music <: Beamformer +Base.@kwdef struct Music <: Beamformer nsignals = 1 end diff --git a/src/dsp.jl b/src/dsp.jl index 5d7e3f3..38f5c30 100644 --- a/src/dsp.jl +++ b/src/dsp.jl @@ -1,9 +1,4 @@ -import DSP: DSP, filt, filtfilt, resample, nextfastfft -import Statistics: std -import Peaks: findmaxima, argmaxima, peakproms, peakproms!, peakwidths, peakwidths! -import Peaks: peakheights, peakheights!, filterpeaks!, findnextmaxima import Optim: optimize, minimizer, BFGS -import FFTW: fft, ifft export fir, removedc, removedc!, demon export upconvert, downconvert, rrcosfir, rcosfir diff --git a/src/generate.jl b/src/generate.jl index 51d50bf..b0bc603 100644 --- a/src/generate.jl +++ b/src/generate.jl @@ -1,5 +1,4 @@ export cw, chirp -export hanning, hamming, tukey, cosine, lanczos, triang, bartlett, gaussian, bartlett_hann, blackman, kaiser, dpss """ $(SIGNATURES) diff --git a/src/iplot.jl b/src/iplot.jl index 58ae959..f03026f 100644 --- a/src/iplot.jl +++ b/src/iplot.jl @@ -1,5 +1,4 @@ using .InteractiveViz -using Statistics using DSP.Periodograms export iplot, iplot!, ispecgram diff --git a/src/plot.jl b/src/plot.jl index 2489fdd..7e4fe3f 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -1,6 +1,4 @@ using .Plots -using DSP -using DSP.Windows """ plot(data::SampledSignal; kwargs...) diff --git a/src/rand.jl b/src/rand.jl index 439a5ce..836e701 100644 --- a/src/rand.jl +++ b/src/rand.jl @@ -1,6 +1,5 @@ using Random using Distributions -using DSP: filt export RedGaussian, PinkGaussian diff --git a/src/signals.jl b/src/signals.jl index e49979e..45e0608 100644 --- a/src/signals.jl +++ b/src/signals.jl @@ -1,7 +1,6 @@ using MetaArrays: MetaArray using Base.Iterators: partition using WAV: wavread -using DSP: hilbert using PaddedViews: PaddedView export signal, analytic, isanalytic, samples diff --git a/src/tfa.jl b/src/tfa.jl index f1b54c1..40fd7bf 100644 --- a/src/tfa.jl +++ b/src/tfa.jl @@ -1,5 +1,4 @@ -using DSP, DSP.Periodograms -using FFTW +using DSP.Periodograms export tfd, Wigner, Spectrogram @@ -85,7 +84,7 @@ function tfd(s, kernel::Wigner; onesided=eltype(s)<:Real, fs=framerate(s)) if pad > 0 xx = X[floor(Int, pad/2)+2 : end-(ceil(Int, pad/2)-1), n+1] # view else - xx = X[:, n+1] # view + xx = X[:, n+1] # view end xx .= x̂[1 .+ 2n .+ (-kn:kn)] .* conj.(x̂[1 .+ 2n .- (-kn:kn)]) end