Repository navigation
Conversation
The "surface tension" physical type was registered as W m^2 Hz^-1 (i.e. J m^2), but surface tension is N / m = J / m^2, which has the same dimensions as the jansky. Add "surface tension" to the names for the Jy physical type and remove the incorrect entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
Hi 👋 and thank you for your contribution! 🙏 This pull request is being closed automatically - but don't worry, this is not the end, and we may re-open it. For some background, we have recently started seeing a rapid increase in the number of pull requests opened. Some of these are from good-faith humans, but some of which are from autonomous LLM agents or humans using LLMs who do not have a genuine understanding of, or interest in, the project. We are therefore auto-closing pull requests from new contributors, but if you are a good-faith human, we want to make sure your pull request gets considered! So if you would like us to re-open your pull request so that it gets reviewed, you need to do two things:
The second step is important, as we may otherwise miss notifications about this pull request. To be clear, our AI policy does allow the use of LLMs as part of contributions, but we need to see authentic engagement and understanding from humans making the contribution. Notes for maintainersIf you know this is a genuine user and the PR is is compliance with the AI policy, you may re-open this straight away. After two successful merged pull requests, the user will be added to the allowlist and future PRs will no longer be closed automatically. This user has not made any pull requests to this repository prior to this one. In addition, here are some statistics on the user's activity on GitHub:
|
| (u.astrophys.Jy, "spectral flux density"), | ||
| (u.N / u.m, "surface tension"), | ||
| (u.J / u.m**2, "surface tension"), | ||
| (u.J * u.m**2, "unknown"), |
There was a problem hiding this comment.
| (u.J * u.m**2, "unknown"), |
Given that the set of physical types with unknown dimensionality is infinite, my inclination would be to remove this particular test.
In the long term, I'm wondering if it would be useful to create a test to make sure that no physical type names are duplicated, though that is outside the scope of this PR. 🤔
namurphy
left a comment
There was a problem hiding this comment.
Thank you for submitting this! It looks good to me!
Description
This pull request is to address the "surface tension" physical type being registered with the wrong unit.
It was defined as
W m**2 Hz**-1, which isJ m**2. Surface tension isN / m=J / m**2= kg s⁻², which has the same dimensions as the jansky. As a result:The fix adds "surface tension" to the names of the
Jyphysical type, the same wayJcarries{"energy", "work", "torque"}, and removes the incorrect entry. After the change:u.Jy.physical_type == "spectral flux density"is stillTrue; only the repr/str of that physical type gains the extra name.Tests: three cases added to
unit_physical_type_pairs(N/mandJ/m**2→ "surface tension",J m**2→ "unknown"). They fail onmainand pass with the fix; the fullastropy/unitstest suite passes locally.The same change was proposed in #20682, which was auto-closed.
Fixes #20681
AI Disclosure
Claude Opus 5.5 (via Claude Code) found this bug while auditing
astropyfor math and unit errors, wrote the code change, tests and changelog entry, and ran the test suite. I reviewed the change before submitting.Merge method
🤖 Generated with Claude Code