-
Notifications
You must be signed in to change notification settings - Fork 63
Add taper support and refactor array-factor calculation #2726
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
base: develop
Are you sure you want to change the base?
Conversation
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.
4 files reviewed, 7 comments
dfe0cbd
to
ceb2158
Compare
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
tidy3d/plugins/microwave/array_factor.py
|
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.
Great start! Still not sure about at
, sll
, nbar
, etc vs attenuation
, side_lobe_level
, num_constant_sidelobes
, etc. @yaugenst what's our policy on using pydantic alias feature on frontend?
ceb2158
to
782bea8
Compare
… calculation - Implemented taper integration to allow amplitude weighting in antenna arrays - Refactored array factor computation for improved clarity and efficiency - Updated relevant tests and documentation accordingly
782bea8
to
d152e33
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.
Very nice work!
discriminator=TYPE_TAG_STR, | ||
title="Antenna Array Taper", | ||
description="Amplitude weighting of array elements to control main lobe width and suppress side lobes.", | ||
# discriminator= |
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.
to be removed?
Parameters: | ||
---------- | ||
Parameters | ||
--------- |
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.
one missing "-"?
class ChebWindow(AbstractWindow): | ||
"""Standard Chebyshev window for tapering with configurable sidelobe attenuation.""" | ||
|
||
at: pd.PositiveFloat = pd.Field( |
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.
more informative to name the field "attenuation", unless "at" is widely used in the field.
|
||
# validate that at least one window is provided | ||
@classmethod | ||
def all_dims(cls, window: RectangularWindowType) -> RectangularTaper: |
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.
maybe isotropic_window
for clarity?
else np.ones(effective_size[1]), | ||
self.window_z.get_weights(effective_size[2]) | ||
if self.window_z is not None | ||
else np.ones(effective_size[2]), |
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.
avoid repetition with a for loop, e.g.
amps = (window.get_weights(effective_size[ind]) if window is not None
else np.ones(effective_size[ind]) for ind, window in enumerate([self.windows_x, self.windows_y, self.windows_z]))
..., title="Window Object", description="Window type used to taper array antenna." | ||
) | ||
|
||
# Change TaylorWindow mode to call _TaylorRadial |
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 think we should raise an error if TaylorWindow's mode is not radial, rather than changing it silently.
Add taper support to
RectangularAntennaArrayCalculator
; refactor array factor computation for clarity and efficiency.