Skip to content

Commit

Permalink
remove restriction on fs::Int in multitaper methods (#491)
Browse files Browse the repository at this point in the history
* remove restriction on fs being Int

* bump patch
  • Loading branch information
kleinschmidt authored Dec 6, 2022
1 parent b9c0925 commit d04aae3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DSP"
uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2"
version = "0.7.7"
version = "0.7.8"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand Down
8 changes: 4 additions & 4 deletions src/multitaper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ end

"""
mt_spectrogram!(output, signal::AbstractVector{T}, n::Int=length(signal) >> 3,
n_overlap::Int=n >> 1; fs::Int=1, onesided::Bool=T <: Real, kwargs...) where {T}
n_overlap::Int=n >> 1; fs=1, onesided::Bool=T <: Real, kwargs...) where {T}
mt_spectrogram!(destination::AbstractMatrix, signal::AbstractVector, config::MTSpectrogramConfig)
Computes a multitaper spectrogram using the parameters specified in `config`. Arguments:
Expand All @@ -310,7 +310,7 @@ See also [`mt_spectrogram`](@ref).
mt_spectrogram!

function mt_spectrogram!(output, signal::AbstractVector{T}, n::Int=length(signal) >> 3,
n_overlap::Int=n >> 1; fs::Int=1, onesided::Bool=T <: Real,
n_overlap::Int=n >> 1; fs=1, onesided::Bool=T <: Real,
kwargs...) where {T}
config = MTSpectrogramConfig{T}(length(signal), n, n_overlap; fs=fs, onesided=onesided,
fft_flags=FFTW.ESTIMATE, kwargs...)
Expand Down Expand Up @@ -348,7 +348,7 @@ end

"""
mt_spectrogram(signal::AbstractVector{T}, n::Int=length(s) >> 3,
n_overlap::Int=n >> 1; fs::Int=1,
n_overlap::Int=n >> 1; fs=1,
onesided::Bool=T <: Real, kwargs...) where {T}
mt_spectrogram(signal::AbstractVector, config::MTSpectrogramConfig)
Expand All @@ -363,7 +363,7 @@ See also [`mt_spectrogram!`](@ref).
mt_spectrogram

function mt_spectrogram(signal::AbstractVector{T}, n::Int=length(signal) >> 3,
n_overlap::Int=n >> 1; fs::Int=1, onesided::Bool=T <: Real,
n_overlap::Int=n >> 1; fs=1, onesided::Bool=T <: Real,
kwargs...) where {T}
config = MTSpectrogramConfig{T}(length(signal), n, n_overlap; fs=fs, onesided=onesided,
fft_flags=FFTW.ESTIMATE, kwargs...)
Expand Down

2 comments on commit d04aae3

@ararslan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/73585

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.8 -m "<description of version>" d04aae3705fac2ab1094445cd72e311485ad92f7
git push origin v0.7.8

Please sign in to comment.