-
Notifications
You must be signed in to change notification settings - Fork 6
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
tidy: Step Scale Sanity chekc et. al. #253
Conversation
…ggested on based on literautre
Hi @KSkwarczynski, thank you for contributing to MaCh3! Please wait for MaCh3 developers to review your PR. If no one answers within a week, please message people from this list: https://github.com/orgs/mach3-software/teams/mach3admin . While waiting, please enjoy this Use this action on your projects. Use jokes on issues instead. |
MACH3LOG_ERROR("You are trying so set StepScale to 0 this will not work"); | ||
throw MaCh3Exception(__FILE__ , __LINE__ ); | ||
} | ||
MACH3LOG_INFO("{} setStepScale() = {}", getName(), scale); | ||
const double SuggestedScale = 2.38*2.38/_fNumPar; | ||
if(std::fabs(scale - SuggestedScale)/SuggestedScale > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't warn you if you go too small right? ie scale=0 won't throw an error. Maybe make it >0.8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Case scale = 0 is handle separately just above this check. Atlhough we don't have any checks for negative so will update it
Pull request description
We often use defined step scale. However we know based on literature what it should be. Now simply throw warning if step scale is very different. This should help spot mistakes.
Changes or fixes
Examples