-
Notifications
You must be signed in to change notification settings - Fork 61
Average profile #313
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
Average profile #313
Conversation
… into averageProfile updateing from remote
|
The errors above are pretty easy to fix. the qt5 pro file was never edited (that causes the qt5 errors). The main pro file seems to have an error in the pro file. I might just do the fixes myself but try building myself later today. |
Co-authored-by: Julien Staub <atsju2@yahoo.fr>
Co-authored-by: Julien Staub <atsju2@yahoo.fr>
Co-authored-by: Julien Staub <atsju2@yahoo.fr>
Cpp-Linter Report
|
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.
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.
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.
|
🚀 New build available for commit |
|
🚀 New build available for commit |
|
🚀 New build available for commit |
|
Even if this is old code, I suggest we get rid of the Would be easier to read, less bugprone and cleaner. Do you agree or do I leave it alone ? |
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.
| for (double rad = -1.; rad < 1.; rad += steps){ | ||
| int dx, dy; | ||
| // Main Sampling Loop | ||
| for (double rad = -1.0; rad < 1.0; rad += steps) { |
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.
clang-tidy diagnostic
profileplot.cpp:431:5: warning: [clang-analyzer-security.FloatLoopCounter]
Variable 'rad' with floating point type 'double' should not be used as a loop counter
431 | for (double rad = -1.0; rad < 1.0; rad += steps) {
| ^ ~~~ ~~~
profileplot.cpp:431:5: note: Variable 'rad' with floating point type 'double' should not be used as a loop counter
431 | for (double rad = -1.0; rad < 1.0; rad += steps) {
| ^ ~~~ ~~~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.
I think it's fine as is. I don't think the outer radius (wf->m_outside.m_radius) is specified in an integral number of pixels anyway - that's a float that can be for example 300.5 (it can be integral or on the halves).
Yes you could have a fp summation rounding error and get one too few in the profile plot. At the end of the plot. At this time I don't think it's a problem (I don't think you can get one too many as there is also code to see if we go beyond the outer radius).
What I don't love is that we aren't grabbing the nearest wavefront point under the line but rounded down to the nearest integer: wf->workData(dy, dx). Dy could be 100.9 and we get the point from dy position 100.
Ideally do a weighted average of the nearest 4 points, weighted by the distance to each point. And handle edge cases where some of the 4 points are outside the mask. We do all that when we rotate wavefronts if I remember right.
But really it's all fine as is.
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.
yes 0.5 pixels. This makes it more difficult to "fix" than first reading.
OK for me.
|
🚀 New build available for commit |
|
I just played with this PR and I love the new way of doing surface error. I think we should go ahead and merge. I'm hoping we can do a release today as well. I promise to test this version a lot more than usual. I have a QA list now that I go through. It's not 100% comprehensive but will hopefully catch everything important. I'll go add this feature to the revisionHistory PR... |
|
Thanks all guys. I notice that sometimes not all when more than one wave is selected and you select show all 3D surface it displals them twice. I don't know the trigger. But it happens most when a new wave front has been added to the list. I putting that here just to see if you see it and to test that. |
|
Yes two windows sometime. Usually the first time and sometime then again. |
|
Well it's not a serious problem for the user. I guess somehow I double clicked on the button? I mean I tried to double click on purpose and it didn't do it. I'll keep my eye out to simplify duplicating the issue. |
|
As far as I can tell I don't double click the button yet it happens. Sometimes for many times in a row. But, yes it is not too much of a problem. Eventually when we can figure out a cause then write up an issue. |
|
The double in the for loop is not going to cause any problem. It gives a much better idea as to what the loop is doing than if you tried something else. It could be an issue if you were comparing to equal but not with a less than or greater than. |

Fixed the highlight slope error bug.
close #312