Skip to content

Commit

Permalink
refactor: cleaned up re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Nov 24, 2024
1 parent f1a9b93 commit b0f5fb7
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 31 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SignalAnalysis"
uuid = "df1fea92-c066-49dd-8b36-eace3378ea47"
authors = ["Mandar Chitre <[email protected]>"]
version = "0.10.0"
version = "0.10.1"

[deps]
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
20 changes: 9 additions & 11 deletions src/SignalAnalysis.jl
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 2 additions & 5 deletions src/array.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using LinearAlgebra
import Base.@kwdef

export steering, beamform
export Bartlett, Capon, Music

Expand All @@ -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

Expand Down
5 changes: 0 additions & 5 deletions src/dsp.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion src/generate.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export cw, chirp
export hanning, hamming, tukey, cosine, lanczos, triang, bartlett, gaussian, bartlett_hann, blackman, kaiser, dpss

"""
$(SIGNATURES)
Expand Down
1 change: 0 additions & 1 deletion src/iplot.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using .InteractiveViz
using Statistics
using DSP.Periodograms

export iplot, iplot!, ispecgram
Expand Down
2 changes: 0 additions & 2 deletions src/plot.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using .Plots
using DSP
using DSP.Windows

"""
plot(data::SampledSignal; kwargs...)
Expand Down
1 change: 0 additions & 1 deletion src/rand.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Random
using Distributions
using DSP: filt

export RedGaussian, PinkGaussian

Expand Down
1 change: 0 additions & 1 deletion src/signals.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/tfa.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using DSP, DSP.Periodograms
using FFTW
using DSP.Periodograms

export tfd, Wigner, Spectrogram

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b0f5fb7

Please sign in to comment.