astropy icon indicating copy to clipboard operation
astropy copied to clipboard

Adding foe as a unit to astropy.units

Open johntkappel opened this issue 3 years ago • 2 comments

Description

The foe is an uncommon unit of energy used in astrophysics, which is equivalent to 10**51 ergs (Fifty-One Ergs - FOE). It is equivalent to the energy released by a supernova, and so is occasionally used. It is also referred to as a Bethe, though this is less common.

Example of implementation would be: def_unit(['Foe', 'foe','Bethe','bethe'], cgs.erg ** 51, namespace=_ns, prefixes=True)

Additional context

Either units.cgs or units.misc would be the appropriate place to implement this feature.

The term was originally proposed by Hans Bethe. Examples of using foe and bethe as units: https://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-UR-97-2534-14 https://www.sciencedirect.com/science/article/pii/0375947496002345 https://iopscience.iop.org/article/10.3847/1538-4357/abf82e/meta

johntkappel avatar Jul 15 '22 16:07 johntkappel

Welcome to Astropy 👋 and thank you for your first issue!

A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.

GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.

If you feel that this issue has not been responded to in a timely manner, please leave a comment mentioning our software support engineer @embray, or send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].

github-actions[bot] avatar Jul 15 '22 16:07 github-actions[bot]

Yes, I think that would be fine to add. Probably best in astrophys,py. PR welcome, but note that the definition is not quite right: should be 1e51 * erg. Also, at least for foe, there should be no prefixes; I think this would be best for Bethe too. And I would not include "Foe" with a capital - I've only seen it in all lower case.

mhvk avatar Jul 16 '22 12:07 mhvk