flex_rf.tidy3d.ModeSortSpec
Type: class │ Base(s): Tidy3dBaseModel
Description
Section titled “Description”Specification for filtering and sorting modes within each frequency.
First, an optional filtering step splits the modes into two groups based on a threshold
applied to filter_key: modes “over” or “under” filter_reference are placed first,
with the remaining modes placed next. Second, an optional sorting step orders modes within
each group according to sort_key, optionally with respect to sort_reference and in
the specified sort_order. If keep_modes is set to “filtered”, the modes that do
not meet the filter criterion are removed instead of being appended as a second group. If
keep_modes is set to an integer, that is the number of modes that will be kept.
Parameters
Section titled “Parameters”filter_key [MODE_DATA_KEYS | None] = None |
|
Quantity used to filter modes into two groups before sorting. |
filter_reference [float] = 0.0 |
|
Reference value used in the filtering stage. |
filter_order [Literal['over', 'under']] = 'over' |
|
Select whether the first group contains values over or under the reference. |
bounding_box [Box | None] = None |
|
Regular 3D tidy3d |
keep_modes [Literal['all'] | Literal['filtered'] | PositiveInt] = 'all' |
|
If |
sort_key [MODE_DATA_KEYS] = 'n_eff' |
|
Quantity used to sort modes within each filtered group. |
sort_reference [float | None] = None |
|
If provided, sorting is based on the absolute difference to this reference value. |
sort_order [Literal['ascending', 'descending'] | None] = None |
|
_build_sort_order_description() |
track_freq [TrackFreq | None] = 'central' |
|
If provided, enables cross-frequency mode tracking. Can be ‘lowest’, ‘central’, or ‘highest’, which refers to the frequency index in the list of frequencies. The mode sorting would then be exact at the specified frequency, while at other frequencies it can change depending on the mode tracking. |
Attributes
Section titled “Attributes”has_custom_sort_or_filter [bool] |
|
Whether this sort spec has custom sorting/filtering beyond the default. |