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

Calculating scales with nOctUp != 0 causes issues #67

Closed
JN-Jones opened this issue May 17, 2018 · 3 comments
Closed

Calculating scales with nOctUp != 0 causes issues #67

JN-Jones opened this issue May 17, 2018 · 3 comments
Labels

Comments

@JN-Jones
Copy link

Similar to #62: If nOctUp is not 0 the scaling doesn't work. This is caused by double s = std::pow(2.0, -double(i) / double(nPerOct + nOctUp)); which adds nOctUp to nPerOct before the division while the matlab code does scales = 2.^(-(0:nScales-1)/nPerOct+nOctUp); which adds it after the divion. Simple fix would be to cast both variables seperatly: double s = std::pow(2.0, -double(i) / double(nPerOct) + double(nOctUp));

@headupinclouds
Copy link
Contributor

Thanks again. I'll send a fix shortly.

headupinclouds added a commit that referenced this issue May 17, 2018
Fix provided by @JN-Jones as described in #67
@headupinclouds
Copy link
Contributor

Applied in #68 (testing) and updated contributors

headupinclouds added a commit that referenced this issue May 17, 2018
* fix nOctup arithmetic

Fix provided by @JN-Jones as described in #67

* remove logging message

* #!/bin/bash -e

don’t ignore errors during setup in hunter_env.sh
@headupinclouds
Copy link
Contributor

Merged.

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

No branches or pull requests

2 participants