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

[GaussianNoiseModel] Crash if initialized with zero bias standard deviation #395

Closed
oysstu opened this issue Oct 13, 2023 · 0 comments · Fixed by #420
Closed

[GaussianNoiseModel] Crash if initialized with zero bias standard deviation #395

oysstu opened this issue Oct 13, 2023 · 0 comments · Fixed by #420

Comments

@oysstu
Copy link
Contributor

oysstu commented Oct 13, 2023

The bias state is sampled when loading sdf::Noise. If the bias standard deviation is set to zero, the program exits. I can see legitimate use for a deterministic bias state (or disabling the bias state altogether).

biasMean = _sdf.BiasMean();
biasStdDev = _sdf.BiasStdDev();
this->dataPtr->bias = math::Rand::DblNormal(biasMean, biasStdDev);

The program also crashes when sampling the distribution if the state standard deviation is zero. Usually that would indicate wrong parameters being passed, but I suppose a legitimate use case could be to disable noise altogether.

double whiteNoise = math::Rand::DblNormal(
this->dataPtr->mean, this->dataPtr->stdDev);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant