Skip to content

Fix surface tension physical type mapping #20681 - #20682

Closed
sanikasharma07 wants to merge 1 commit into
astropy:mainfrom
sanikasharma07:fix-surface-tension-20681
Closed

sanikasharma07 wants to merge 1 commit into
astropy:mainfrom
sanikasharma07:fix-surface-tension-20681

Conversation

@sanikasharma07

Copy link
Copy Markdown

Description

This pull request fixes the physical type mapping for surface tension by associating it with units dimensionally equivalent to N / m, including Jy. It removes the incorrect mapping for W m² Hz⁻¹ and adds tests for the affected units.

Fixes #20681

Summary

  • Map Jy to both spectral flux density and surface tension.
  • Remove the incorrect physical type mapping for W m² Hz⁻¹.
  • Add tests covering surface tension units and the incorrect dimensional mapping.

Testing

  • git diff --check passed.
  • The focused pytest suite could not be run locally because of Python environment and compiled-extension issues.

AI Disclosure

ChatGPT (OpenAI, GPT-6) was used to help understand the issue, discuss the proposed code changes and tests, troubleshoot the local testing environment, and navigate the Git and GitHub contribution workflow. I reviewed the changes and take responsibility for the submitted contribution.

  • I certify that I am human and that I take full responsibility for this pull request including all interactions with reviewers.

Merge method

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button.

@giles

giles Bot commented Oct 23, 2026

Copy link
Copy Markdown

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:

  1. Add a comment here to explain why you need the changes here to be considered, as in how the bug or missing feature affects your work, or whether this is an issue you have encountered but does not affect you.

  2. Join the astropy slack using this invite link and head over to the #new-contributor-requests channel to introduce yourself and let us know about this pull request

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 maintainers

If 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:

Last 24 hours Last 7 days
Pull requests opened 1 1
Issues opened 0 0

@github-actions github-actions Bot added the units label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@sanikasharma07

Copy link
Copy Markdown
Author

hello
I am a student new to open source contribution. I was trying to understand the codebase and solve issues i could understand. I came across this issue and i could understand it clearly hence i choose to solve this.
What was wrong-
In pysical.py , it maps various units with physical types .
Surface tension ahs units N/m which is also J/m2
Old entry had W * m
2 * Hz**-1 represnts jy( Jansky) which is spectral flux density .
Actually jy is W * m**-2 * Hz**-1 which can be also written as (dimensionally equal to ) J * m**-2 which is actually surface tension. But in old mapping : W * m2 * Hz-1 gives jy and hence gives surface tension unit as J* m**2 (dimensionally equal ) which is wrong . I corrected the mapping and added tests for the correct and incorrect units.

@pllim pllim added this to the v8.1.0 milestone Oct 23, 2026
@pllim

pllim commented Oct 23, 2026

Copy link
Copy Markdown
Member

First of all, we need to check if this is a regression or a misunderstanding. Keeping PR closed for now.

@sanikasharma07

Copy link
Copy Markdown
Author

Understood, thank you for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"surface tension" physical type is registered as J m^2 instead of J / m^2

2 participants