Skip to content

Conversation

@momchil-flex
Copy link
Collaborator

@momchil-flex momchil-flex commented Dec 4, 2025

  • Introduces drop_modes boolean, if True, just drop modes that don't make the filtering threshold. The caveat here is that the number of modes might depend on the frequency. The choice that was made was to do the dropping after the tracking, and then just do the intersection and keep the smallest number of modes that meet the filtering criterion at every frequency.
  • Introduces fill_fraction_box as a filtering key which then requires a bounding_box to be passed to the sort_spec. Also a fill_fraction(box) method to the mode solver data, as well as a property fill_fraction_box that uses the box defined in the stored mode_spec.sort_spec.

@momchil-flex momchil-flex force-pushed the momchil/drop_filtered_modes branch from 87f4819 to 636f5c9 Compare December 4, 2025 14:34
@caseyflex
Copy link
Contributor

@momchil-flex thanks for this!

I think in terms of API, I would prefer a field keep_num_modes or something, so that after the filtering and sorting is applied we can just keep the top keep_num_modes. Instead of drop_modes. The default can be None to keep all modes.

If you want I can take over this PR and make the change

@momchil-flex
Copy link
Collaborator Author

momchil-flex commented Dec 8, 2025

I like the suggestion in that the mode spec would still always produce a deterministic number of modes.

But in terms of functionality, doesn't it sound not adequate e.g. for the EME filtering? Like if you strictly want to drop modes that don't meet a given criterion, this is not going to achieve that, or would achieve in some cases by chance?

Maybe you're imagining having a separate filtering done in EME, which I think could make sense.

@caseyflex
Copy link
Contributor

I like the suggestion in that the mode spec would still always produce a deterministic number of modes.

But in terms of functionality, doesn't it sound not adequate e.g. for the EME filtering? Like if you strictly want to drop modes that don't meet a given criterion, this is not going to achieve that, or would achieve in some cases by chance?

Maybe you're imagining having a separate filtering done in EME, which I think could make sense.

It’s the closest you can easily get to deterministic number of modes, although not perfect. The sim coeffs can tell you how many modes were actually kept; if it’s fewer than the number requested, then you may need to increase num_modes for the computation, or loosen the filter

@momchil-flex
Copy link
Collaborator Author

Ok yea go for it.

@caseyflex
Copy link
Contributor

Ok yea go for it.

Maybe a field “keep_modes” which can be “all”, “filtered”, or an integer

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