-
Notifications
You must be signed in to change notification settings - Fork 116
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
Raise a meaningful error in import3d_gui.hoc for invalide soma #2609
Conversation
Kudos, SonarCloud Quality Gate passed! |
The reasoning is that in the next line we do:
to build a system of reference with two directions: |
✔️ 1ed07bd -> Azure artifacts URL |
Yes. This approximates the (2-d) contour (sometimes a shape like a potato or a banana) by an ellipse with a major and minor axis. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2609 +/- ##
=======================================
Coverage 66.19% 66.19%
=======================================
Files 559 559
Lines 108937 108939 +2
=======================================
+ Hits 72109 72112 +3
+ Misses 36828 36827 -1 ☔ View full report in Codecov by Sentry. |
With ratios and relative errors the problem is often that the reference could be zero, e.g. in this case if
If it's impossible to give a value for As for |
We never added the proposed changes. Hence what's currently merged is the check:
@nrnhines we're unsure if this is an oversight. Would you like us to create a new PR to check:
|
My mistake, I thought that had been added. But
is better. I guess this mistake is best corrected with a new PR. |
Improves the floating point comparison with zero. The strategy is to use a relative tolerance for the ratio `minor.mag/major.mag`. The softening constant `1e-100` is chosen such that: 1. If `minor.mag == 0.0` then the ratio is always `0.0` and no division by zero occurs. 2. The value of `major.mag + 1e-100 == major.mag` for all biophysically sensible values of `major.mag`. If both `minor.mag` and `major.mag` are zero as floating point number, then check may fail to raise a exception.
Improves the floating point comparison with zero. The strategy is to use a relative tolerance for the ratio `minor.mag/major.mag`. The softening constant `1e-100` is chosen such that: 1. If `minor.mag == 0.0` then the ratio is always `0.0` and no division by zero occurs. 2. The value of `major.mag + 1e-100 == major.mag` for all biophysically sensible values of `major.mag`. If both `minor.mag` and `major.mag` are zero as floating point number, then check may fail to raise a exception.
Improves the floating point comparison with zero. The strategy is to use a relative tolerance for the ratio `minor.mag/major.mag`. The softening constant `1e-100` is chosen such that: 1. If `minor.mag == 0.0` then the ratio is always `0.0` and no division by zero occurs. 2. The value of `major.mag + 1e-100 == major.mag` for all biophysically sensible values of `major.mag`. If both `minor.mag` and `major.mag` are zero as floating point number, then check may fail to raise a exception.
Improves the floating point comparison with zero. The strategy is to use a relative tolerance for the ratio `minor.mag/major.mag`. The softening constant `1e-100` is chosen such that: 1. If `minor.mag == 0.0` then the ratio is always `0.0` and no division by zero occurs. 2. The value of `major.mag + 1e-100 == major.mag` for all biophysically sensible values of `major.mag`. If both `minor.mag` and `major.mag` are zero as floating point number, then check may fail to raise a exception.
Requested by users from the Blue Brain Project.
Fix #2602