Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resample multi-channel signals #42

Merged
merged 5 commits into from
Aug 28, 2023
Merged

Conversation

ymtoo
Copy link
Contributor

@ymtoo ymtoo commented Aug 24, 2023

This PR enables resampling on multi-channel signals.

Before:

julia> x = cw(7kHz, 1s, 44.1kHz)
julia> sresample([x x], 3//2)
ERROR: UndefKeywordError: keyword argument `dims` not assigned

After:

julia> sresample([x x], 3//2)
SampledSignal @ 66150.0 Hz, 66150×2 Matrix{ComplexF64}:

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (359412c) 78.38% compared to head (3d38983) 78.38%.

❗ Current head 3d38983 differs from pull request most recent head 6f04847. Consider uploading reports for the commit 6f04847 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #42   +/-   ##
=======================================
  Coverage   78.38%   78.38%           
=======================================
  Files          10       10           
  Lines         828      828           
=======================================
  Hits          649      649           
  Misses        179      179           
Files Changed Coverage Δ
src/dsp.jl 97.19% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mchitre mchitre self-requested a review August 24, 2023 17:40
src/dsp.jl Outdated Show resolved Hide resolved
test/runtests.jl Show resolved Hide resolved
@ymtoo ymtoo requested a review from mchitre August 25, 2023 06:29
test/runtests.jl Outdated
x1 = resample(x, 3//2)
@test framerate(x1) == 3 * framerate(x) / 2
x1 = resample([x x], 3//2; dims=1)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
x1 = resample([x x], 3//2; dims=1)
x1 = resample([x x], 3//2)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dims=1 is removed.

test/runtests.jl Outdated Show resolved Hide resolved
@ymtoo ymtoo requested a review from mchitre August 28, 2023 05:20
@mchitre mchitre merged commit d9509a4 into org-arl:master Aug 28, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants