-
Notifications
You must be signed in to change notification settings - Fork 14
feature/geometry_hot_fix #274
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,9 +105,9 @@ def _cartesian_grid_via_radial_from( | |
| The circular radius of each coordinate from the profile center. | ||
| """ | ||
| grid_angles = xp.arctan2(grid.array[:, 0], grid.array[:, 1]) | ||
| cos_theta, sin_theta = self.angle_to_profile_grid_from( | ||
| grid_angles=grid_angles, xp=xp | ||
| ) | ||
|
|
||
| cos_theta = xp.cos(grid_angles) | ||
| sin_theta = xp.sin(grid_angles) | ||
|
|
||
| return xp.multiply(radius[:, None], xp.vstack((sin_theta, cos_theta)).T) | ||
|
Comment on lines
107
to
112
|
||
|
|
||
|
|
||
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.
_cartesian_grid_via_radial_frompreviously delegated toself.angle_to_profile_grid_from(...), which is overridden byEllProfileto account for the profile’s position angle. Replacing it withxp.cos/sin(grid_angles)bypasses that override and changes behavior for any subclass with a non-zeroanglethat calls this helper. Consider restoring the call toself.angle_to_profile_grid_from(...), or (if the intent is to always ignore the profile angle because the grid is already in the profile reference frame) add an explicit comment and/or use a clearly-named helper to avoid silently breaking polymorphism.