-
Notifications
You must be signed in to change notification settings - Fork 65
Add interpolation to EME #2936
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
Add interpolation to EME #2936
Conversation
caseyflex
left a comment
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.
@dbochkov-flexcompute @momchil-flex
still a work in progress, just wanted to show what I'm thinking and some of the benefits of not interpolating until last minute in the interpolation PR. Feel free to comment at this point. Still need to add group index / GVD option, and other changes as per my comments
| if val: | ||
| mode_data_freqs = values["monitor"].freqs | ||
| interp_spec = values["monitor"].mode_spec.interp_spec | ||
| if interp_spec is not None: |
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 should change this to check that it matches the sampling_points
| modes2 = port_modes2 | ||
| f1 = list(modes1.field_components.values())[0].f.values | ||
| f2 = list(modes2.field_components.values())[0].f.values | ||
| f1 = list(modes1.monitor.freqs) |
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.
the monitor freqs are the full frequencies, even though the data is only stored at the sampling_points
| overlaps1 = overlaps1.expand_dims(dim={"mode_index_0": mode_index_1}, axis=1) | ||
| interp_spec1 = modes1.monitor.mode_spec.interp_spec | ||
| if interp_spec1 is not None: | ||
| overlaps1 = modes1._interp_dataarray( |
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.
interpolating the overlaps is more efficient than interpolating the modes, but it can only be done if the frequencies agree. If the sampling_points don't agree, then the modes have to be interpolated first
|
|
||
| # Get data at reduced frequencies | ||
| data_reduced = mode_solver_reduced.data_raw | ||
| return data_reduced |
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.
@dbochkov-flexcompute in this version, the data is not interpolated when it is computed -- it can be interpolated as-needed later
d58af9b to
07415ba
Compare
|
Closed in favor of #2973 |
No description provided.