-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add prolate spheroidal coordinates #220
base: main
Are you sure you want to change the base?
Conversation
Tests are failing for two reasons that might be related:
One approach could be to allow a default |
That's a good question! We don't have a mechanism for that. This is complicated, essentially each value of
So writing this out, (2) might be technically / mathematically better, but (1) seems best to do now. Order of events: 😓
|
remove Delta from repr and add docstring entry add some batchable types add transforms to/from cylindrical simplify lax.cond and add self transforms working on tests for prolsph
@nstarman I think this is ready for a look! Tests are failing with a gnarly recursion error in |
OK it turns out the recursion error was because one of the tests was calling the fallback |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
+ Coverage 96.98% 97.03% +0.04%
==========================================
Files 113 114 +1
Lines 3455 3605 +150
==========================================
+ Hits 3351 3498 +147
- Misses 104 107 +3 ☔ View full report in Codecov by Sentry. |
@nstarman OK tests are passing, so take a look at how I handled |
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.
Looks really good. Small comments only. Then should be ready 🚀
max_val: AbstractQuantity, | ||
/, | ||
name: str = "", | ||
comparison_name: str = "the specified maximum value", |
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.
Can this be more concise while retaining clarity?
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.
ChatGPT suggests:
• ref_name (short for “reference name”)
• limit_name (indicating the name of the limiting value)
• max_name (if it’s always describing the maximum)
• comp_name (short for “comparison name”)
Which do you prefer / have another suggestion?
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.
🤷 - is it worth it for a few characters on an internal function? I can, but personally don't think it's worth it!
Co-authored-by: Nathaniel Starkman <[email protected]> Signed-off-by: Adrian Price-Whelan <[email protected]>
Hm, not sure about the failing test. Adding the converter to @eqx.filter_jit
def func(q):
return q.represent_as(cx.ProlateSpheroidalPos, Delta=Quantity(1.0, "kpc"))
q = cx.CartesianPos3D.from_([1, 2, 3], "kpc")
func(q) |
Can you try removing the parametrization in the converter? Maybe just |
But also Happy Thanksgiving 🦃! For after the holidays :) |
I'm gearing up to add the Staeckel Fudge to Galax, so it would be useful to have a representation of prolate spheroidal coordinates. Transformations to this coordinate system need to specify a focal length parameter,
Delta
, so it's a bit different from other d3 representations. Thoughts on this approach?