Skip to content

feature: allow noise to depend on simulation - #151

Merged
jschepers merged 9 commits into
mainfrom
noise_add_simulation
Nov 13, 2025
Merged

feature: allow noise to depend on simulation#151
jschepers merged 9 commits into
mainfrom
noise_add_simulation

Conversation

@behinger

Copy link
Copy Markdown
Member

No description provided.

Comment thread test/noise.jl Outdated
Comment thread src/noise.jl
Comment thread src/noise.jl Outdated
end

simulate_noise(rng::AbstractRNG, t::AbstractNoise, signal, Simulation::Simulation) =
simulate_noise(rng, t, prod(signal))

@jschepers jschepers Nov 11, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@behinger Warum kommt hier prod(signal) vor? Wenn ich die Dokumentation von prod richtig verstanden habe, dann multipliziert prod alle elemente einer collection.
Aber warum multipliziert man alle Elemente aus signal?

Comment thread src/noise.jl Outdated
Comment thread src/noise.jl Outdated
jschepers and others added 2 commits November 12, 2025 12:40
Co-authored-by: Benedikt Ehinger <benedikt.ehinger@vis.uni-stuttgart.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment thread test/noise.jl
Comment on lines +41 to +47
# ExponentialNoise: returns correct length and differs for different seeds
e1 = simulate_noise(deepcopy(rng), ExponentialNoise(noiselevel = 1, ν = 1.2), n)
e2 =
simulate_noise(deepcopy(StableRNG(2)), ExponentialNoise(noiselevel = 1, ν = 1.2), n)
@test size(e1) == (n,)
@test size(e2) == (n,)
@test !(all(isapprox.(e1, e2; atol = 0, rtol = 1e-12)))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@behinger I assume this will fail for the new ExponentialNoise implementation.

@jschepers
jschepers merged commit bc764fe into main Nov 13, 2025
4 checks passed
@jschepers
jschepers deleted the noise_add_simulation branch November 13, 2025 10:07
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.

2 participants