Skip to content
Merged

dev #90

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: julia-actions/setup-julia@v2
with:
version: '1.11'
- uses: julia-actions/cache@v1
- uses: julia-actions/cache@v2
- name: Install dependencies
run: julia --project=docs/ -e ' using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add("DocumenterTools"); Pkg.instantiate()'
- name: Build and deploy
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
34 changes: 17 additions & 17 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.11.5"
manifest_format = "2.0"
project_hash = "6189323add309aa8296c854fc68cb656e0d1e276"
project_hash = "672387a885a43f4f548cc1e8b519983b624eac7b"

[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -41,9 +41,9 @@ uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.1.1+0"

[[deps.ConstructionBase]]
git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157"
git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.5.8"
version = "1.6.0"

[deps.ConstructionBase.extensions]
ConstructionBaseIntervalSetsExt = "IntervalSets"
Expand All @@ -57,9 +57,9 @@ version = "1.5.8"

[[deps.DSP]]
deps = ["Bessels", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"]
git-tree-sha1 = "0c8a70a69036d8f3a2426d768d30144547cd73c0"
git-tree-sha1 = "5989debfc3b38f736e69724818210c67ffee4352"
uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2"
version = "0.8.3"
version = "0.8.4"

[deps.DSP.extensions]
OffsetArraysExt = "OffsetArrays"
Expand All @@ -73,9 +73,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
version = "1.11.0"

[[deps.DocStringExtensions]]
git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860"
git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.4"
version = "0.9.5"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
Expand All @@ -84,9 +84,9 @@ version = "1.6.0"

[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "7de7c78d681078f027389e067864a8d53bd7c3c9"
git-tree-sha1 = "797762812ed063b9b94f6cc7742bc8883bb5e69e"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.8.1"
version = "1.9.0"

[[deps.FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
Expand Down Expand Up @@ -230,9 +230,9 @@ uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.6+0"

[[deps.OrderedCollections]]
git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd"
git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.8.0"
version = "1.8.1"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"]
Expand All @@ -247,27 +247,27 @@ version = "1.11.0"

[[deps.Polynomials]]
deps = ["LinearAlgebra", "OrderedCollections", "RecipesBase", "Requires", "Setfield", "SparseArrays"]
git-tree-sha1 = "555c272d20fc80a2658587fb9bbda60067b93b7c"
git-tree-sha1 = "972089912ba299fba87671b025cd0da74f5f54f7"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
version = "4.0.19"
version = "4.1.0"

[deps.Polynomials.extensions]
PolynomialsChainRulesCoreExt = "ChainRulesCore"
PolynomialsFFTWExt = "FFTW"
PolynomialsMakieCoreExt = "MakieCore"
PolynomialsMakieExt = "Makie"
PolynomialsMutableArithmeticsExt = "MutableArithmetics"

[deps.Polynomials.weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"

[[deps.PosDefManifold]]
deps = ["LinearAlgebra", "Statistics"]
git-tree-sha1 = "5c9f8c8dc1faf972a9a2e74a246a857ca6a82a94"
git-tree-sha1 = "1357ca7dd8122a211a6189d565b7f1b4a6a79464"
uuid = "f45a3650-5c51-11e9-1e9a-133aa5e309cf"
version = "0.5.2"
version = "0.5.3"

[[deps.PrecompileTools]]
deps = ["Preferences"]
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FourierAnalysis"
uuid = "e7e9c730-dc46-11e9-3633-f1ab55cc17e1"
authors = ["Marco-Congedo <marco.congedo@gmail.com>"]
version = "1.2.4"
version = "1.2.5"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
1 change: 1 addition & 0 deletions docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
71 changes: 36 additions & 35 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,26 @@ version = "1.11.0"
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
version = "1.11.0"

[[deps.Bessels]]
git-tree-sha1 = "4435559dc39793d53a9e3d278e185e920b4619ef"
uuid = "0e736298-9ec6-45e8-9647-e4fc86a2fe38"
version = "0.2.8"

[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.8"

[[deps.Compat]]
deps = ["TOML", "UUIDs"]
git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.16.0"
weakdeps = ["Dates", "LinearAlgebra"]

[deps.Compat.extensions]
CompatLinearAlgebraExt = "LinearAlgebra"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.1.1+0"

[[deps.ConstructionBase]]
git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157"
git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.5.8"
version = "1.6.0"

[deps.ConstructionBase.extensions]
ConstructionBaseIntervalSetsExt = "IntervalSets"
Expand All @@ -77,26 +72,32 @@ version = "1.5.8"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[[deps.DSP]]
deps = ["Compat", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"]
git-tree-sha1 = "0df00546373af8eee1598fb4b2ba480b1ebe895c"
deps = ["Bessels", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"]
git-tree-sha1 = "5989debfc3b38f736e69724818210c67ffee4352"
uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2"
version = "0.7.10"
version = "0.8.4"

[deps.DSP.extensions]
OffsetArraysExt = "OffsetArrays"

[deps.DSP.weakdeps]
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
version = "1.11.0"

[[deps.DocStringExtensions]]
git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860"
git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.4"
version = "0.9.5"

[[deps.Documenter]]
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
git-tree-sha1 = "6c182d0bd94142d7cbc3ae8a1e74668f15d0dd65"
git-tree-sha1 = "47ffb8f27ffc01e2e57e7ae5365ae5ceef87b03d"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "1.11.4"
version = "1.14.1"

[[deps.DocumenterTools]]
deps = ["AbstractTrees", "Base64", "DocStringExtensions", "Documenter", "FileWatching", "Git", "Gumbo", "LibGit2", "OpenSSH_jll", "Sass"]
Expand All @@ -117,9 +118,9 @@ version = "2.6.5+0"

[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "7de7c78d681078f027389e067864a8d53bd7c3c9"
git-tree-sha1 = "797762812ed063b9b94f6cc7742bc8883bb5e69e"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.8.1"
version = "1.9.0"

[[deps.FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
Expand All @@ -133,9 +134,9 @@ version = "1.11.0"

[[deps.FourierAnalysis]]
deps = ["AbstractFFTs", "DSP", "FFTW", "LinearAlgebra", "PosDefManifold", "RecipesBase", "Statistics"]
git-tree-sha1 = "ce76c8f8422c5faad0259a747808db784c6c9c87"
git-tree-sha1 = "0cc796f2af265edf93e24304e6eb31cf40c37a55"
uuid = "e7e9c730-dc46-11e9-3633-f1ab55cc17e1"
version = "1.2.3"
version = "1.2.4"

[[deps.Future]]
deps = ["Random"]
Expand All @@ -150,9 +151,9 @@ version = "1.4.0"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
git-tree-sha1 = "2f6d6f7e6d6de361865d4394b802c02fc944fc7c"
git-tree-sha1 = "b981ed24de5855f20fce5b8cb767c179f93e4268"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.49.0+0"
version = "2.50.0+0"

[[deps.Gumbo]]
deps = ["AbstractTrees", "Gumbo_jll", "Libdl"]
Expand Down Expand Up @@ -332,9 +333,9 @@ version = "9.9.2+0"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d"
git-tree-sha1 = "87510f7292a2b21aeff97912b0898f9553cc5c2c"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.5.0+0"
version = "3.5.1+0"

[[deps.OpenSpecFun_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"]
Expand All @@ -343,9 +344,9 @@ uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.6+0"

[[deps.OrderedCollections]]
git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd"
git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.8.0"
version = "1.8.1"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
Expand All @@ -369,27 +370,27 @@ weakdeps = ["REPL"]

[[deps.Polynomials]]
deps = ["LinearAlgebra", "OrderedCollections", "RecipesBase", "Requires", "Setfield", "SparseArrays"]
git-tree-sha1 = "555c272d20fc80a2658587fb9bbda60067b93b7c"
git-tree-sha1 = "972089912ba299fba87671b025cd0da74f5f54f7"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
version = "4.0.19"
version = "4.1.0"

[deps.Polynomials.extensions]
PolynomialsChainRulesCoreExt = "ChainRulesCore"
PolynomialsFFTWExt = "FFTW"
PolynomialsMakieCoreExt = "MakieCore"
PolynomialsMakieExt = "Makie"
PolynomialsMutableArithmeticsExt = "MutableArithmetics"

[deps.Polynomials.weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"

[[deps.PosDefManifold]]
deps = ["LinearAlgebra", "Statistics"]
git-tree-sha1 = "5c9f8c8dc1faf972a9a2e74a246a857ca6a82a94"
git-tree-sha1 = "1357ca7dd8122a211a6189d565b7f1b4a6a79464"
uuid = "f45a3650-5c51-11e9-1e9a-133aa5e309cf"
version = "0.5.2"
version = "0.5.3"

[[deps.PrecompileTools]]
deps = ["Preferences"]
Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ makedocs(
deploydocs(
repo = "github.com/Marco-Congedo/FourierAnalysis.jl.git",
target = "build",
devurl = "dev"
devurl = "dev",
push_preview = true,
)
4 changes: 2 additions & 2 deletions docs/src/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ z=filtfilt(filterBP, v)
plot([v, z])

### FIR filters
responsetype = Bandpass(8, 12; fs=sr)
responsetype = Bandpass(8, 12)
filtkind = FIRWindow(hanning(64))
filterBP = digitalfilter(responsetype, filtkind)
filterBP = digitalfilter(responsetype, filtkind; fs=sr)
# forward filter, unlinear phase response
z=filt(digitalfilter(responsetype, filtkind), v)
plot([v, z])
Expand Down
2 changes: 1 addition & 1 deletion src/FourierAnalysis.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Main Module of the FourierAnalysis Package for julia language
# v 1.2.4 - last update May 2025
# v 1.2.5 - last update May 2025
#
# MIT License
# Copyright (c) 2019-2025,
Expand Down
44 changes: 12 additions & 32 deletions src/extras/LOCAL_BUILD.jl
Original file line number Diff line number Diff line change
@@ -1,38 +1,18 @@
# This script is not part of the FourierAnalysis package.
# It allows to build the FourierAnalysis package
# and its documentation locally from the source code,
# This script is not part of the FourierAnalysis.jl package.
# It allows to build the package locally from the source code,
# without actually installing the package.
# It is used for developing purposes using the Julia
# `Revise` package (that you need to have installed on your PC,
# together with the `Documenter` package for building the documentation).
# You won't need tinclude("make.jl")his script for using the package.
# You won't need this script for using the package.
#
# MIT License
# Copyright (c) 2019-2025, Marco Congedo, CNRS, Grenobe, France:
# https://sites.google.com/site/marcocongedo/home
#
# DIRECTIONS:
# 1) If you have installed the FourierAnalysis package
# from github or Julia registry, uninstall it.
# 2) Change the `juliaCodeDir` path here below to the path
# where the FourierAnalysis folder is located on your PC.
# 3) Under Linux, replace all '\\' with `/`
# 4) Put the cursor in this unit and hit SHIFT+CTRL+ENTER
# 1) If you have installed the FourierAnalysis.jl from github or Julia registry, uninstall it.
# 3) Run this block (With VS code, click anywhere here and hit ALT+Enter)
#
# Nota Bene: all you need for building the package is actually
# the 'push' line and the 'using' line.
# You can safely delete the rest once
# you have identified the 'srcDir' to be used in the push command.

begin
juliaCodeDir= homedir()*"\\Documents\\Documenti\\Code\\julia\\"
projectName = "FourierAnalysis"
srcDir = juliaCodeDir*projectName*"\\src\\"
docsDir = juliaCodeDir*projectName*"\\docs\\"

push!(LOAD_PATH, srcDir)
using LinearAlgebra, Statistics, AbstractFFTs, FFTW,
DSP, Revise, FourierAnalysis

# for compiling the documentation
cd(docsDir)
clipboard("""include("make.jl")""")
@info("\nhit CTRL+V+ENTER on the REPL for building the documentation.");

push!(LOAD_PATH, abspath(@__DIR__, ".."))
using FourierAnalysis
end

2 changes: 1 addition & 1 deletion src/filters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function filterbank(x :: Vector{T},
df, dm, ff, Bp=digitalfilter, filtkind, filtfilt, Bandpass # aliases for DSP.jl stuff
fb=_ffilterbank(sr, bandwidth; fmin=fmin, fmax=fmax) # get limits for band-passes
nf=length(fb)-2 # eliminate last frequency, which may be the Nyquist frequency
flt=[df(Bp(fb[f], fb[f+2]; fs=sr), dm) for f=1:nf] # f band-pass filters
flt=[df(Bp(fb[f], fb[f+2]), dm; fs=sr) for f=1:nf] # f band-pass filters
x_=[zeros(T, sr); x; zeros(T, sr)] # Before filtering, `x` is padded with `sr` zeros at both sides in order to symmetrize the distortion of DSP.jl butterworth filters.
Y=Matrix{T}(undef, length(x_), nf)
_thread(⏩, nf) ? (@threads for f=1:nf Y[:, f]=ff(flt[f], x_) end) :
Expand Down