-
Notifications
You must be signed in to change notification settings - Fork 44
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
Improve passivity enforcement near high-Q poles in FastDispersionFitter #1894
Conversation
5b6f9b4
to
3c45fe0
Compare
1367bb8
to
b2cbedc
Compare
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.
Looks good if it passes this test! Not sure how the fixes you made exactly work but it looks reasonable :)
I’m still checking over some things. This may discard too many models if
the criterion is just based on high Q.
…On Thu, Aug 8, 2024 at 3:34 PM flex-Alec ***@***.***> wrote:
***@***.**** approved this pull request.
Looks good if it passes this test! Not sure how the fixes you made exactly
work but it looks reasonable :)
—
Reply to this email directly, view it on GitHub
<#1894 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3KLECIFINIOJWTX7DL7YCTZQN6XNAVCNFSM6AAAAABMGLHGF6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMRYGA3TONRXGU>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
b2cbedc
to
57540b7
Compare
57540b7
to
8a63111
Compare
OK, I'm happy with this now. I fixed the formula and am no longer rejecting models on the basis of being high-Q. This PR just adds one or two extra samples around each pole, except for marginally-stable poles, the handling of which is not changed. It might be worth checking some of the material_library fits to see if anything changed (indicating that previously the fit wasn't actually passive) |
ah, this is a good point. Nice work @caseyflex! |
thanks for finding the issue! |
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.
Nice work! When I tried Alec's medium, the original extrema finder is able to find the frequency that violates the passivity. Is the fix to sample more frequency points around this region?
Also I wonder if it's better to merge to pre/2.8 to avoid resolving lots of conflicts?
So originally, I tried using logic as in Regarding pre/2.8 or develop: technically this is a bug fix, so typically it would go in develop. I think either way I'll be the one resolving the conflicts, and since I did both the fitter separation PR and this one, I should be able to do it without much difficulty either way. |
What a smart fitter!
Sounds good. |
I checked against most of the material_library. It didn't seem to change most of the fits at all; it changed the following fits in a very small / insignificant way:
so it's possible that the fitter was previously returning mediums that slightly violated passivity at some frequencies for these materials; but anyway it's ok, we aren't using the fitter result in the material library. And this confirms that the fitter still works well with this change, so we should be OK to merge this. |
The passivity enforcement including
imag_ep_extrema
andomega_range
was not sufficient when the fitPoleResidue
model contained high-Q poles. This PR adds extra samples around each pole in order to improve the passivity enforcement. Specifically, the samples are computed using an explicit formula for extrema around a single pole.The fit for the example data in the issue remains poor -- this is to be expected, since the data exhibits dispersion but has no loss.