Skip to content

Conversation

@caseyflex
Copy link
Contributor

No description provided.

Copy link
Contributor Author

@caseyflex caseyflex left a 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:
Copy link
Contributor Author

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)
Copy link
Contributor Author

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(
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@dbochkov-flexcompute dbochkov-flexcompute force-pushed the daniil/FXC-3351-Downsample-frequencies-in-mode-monitors branch 4 times, most recently from d58af9b to 07415ba Compare November 4, 2025 17:23
@caseyflex
Copy link
Contributor Author

Closed in favor of #2973

@caseyflex caseyflex closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants