-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Test | ||
using LegendDSP | ||
using RadiationDetectorDSP | ||
using RadiationDetectorSignals | ||
using Unitful | ||
|
||
@testset "Test ModifiedSincFilter" begin | ||
n = 600 | ||
noise = 1. | ||
t = range(0u"μs", 20u"μs", 2*n) | ||
signal = vcat(zeros(n), 10*ones(n)) + (noise*rand(2*n) .- noise/2) | ||
wf = RDWaveform(t, signal) | ||
|
||
# define filter parameters and filter | ||
flt = ModifiedSincFilter(d=4, m=1u"μs") | ||
|
||
# apply filter to signal | ||
@test_nowarn wf_new = flt(wf) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Test | ||
using LegendDSP | ||
using RadiationDetectorDSP | ||
using RadiationDetectorSignals | ||
using Unitful | ||
|
||
@testset "Test WeightedSavitzkyGolayFilter" begin | ||
n = 600 | ||
noise = 1. | ||
t = range(0u"μs", 20u"μs", 2*n) | ||
signal = vcat(zeros(n), 10*ones(n)) + (noise*rand(2*n) .- noise/2) | ||
wf = RDWaveform(t, signal) | ||
|
||
# define filter parameters and filter | ||
flt = WeightedSavitzkyGolayFilter(length=1u"μs", degree=3, weightType=2) | ||
|
||
# apply filter to signal | ||
@test_nowarn wf_new = flt(wf) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Test | ||
using LegendDSP | ||
using RadiationDetectorDSP | ||
using RadiationDetectorSignals | ||
using Unitful | ||
|
||
@testset "Test WhittakerHendersonFilter" begin | ||
n = 600 | ||
noise = 1. | ||
t = range(0u"μs", 20u"μs", 2*n) | ||
signal = vcat(zeros(n), 10*ones(n)) + (noise*rand(2*n) .- noise/2) | ||
wf = RDWaveform(t, signal) | ||
|
||
# define filter parameters and filter | ||
flt = WhittakerHendersonFilter(p=3, λ=4) | ||
|
||
# apply filter to signal | ||
@test_nowarn wf_new = flt(wf) | ||
end |