question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we allow arithmetic between STmag and ABmag?

See original GitHub issue

As a follow-up of https://github.com/astropy/astropy/pull/13158#discussion_r858962549 and spacetelescope/synphot_refactor#327 , should this be allowed? It is currently possible (at the time of posting).

>>> import astropy
>>> astropy.__version__
'5.2.dev64+g6ed769d58'
>>> from astropy import units as u
>>> (5 * u.STmag - 2.5 * u.ABmag)
<Magnitude 2.5 mag(ST / AB)>

Might be related: #12472

cc @mhvk @olebole

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
pllimcommented, Oct 10, 2022

@aaryapatil , do you want to scar those poor students with magnitudes so early in their careers? 😆

1reaction
aaryapatilcommented, Oct 12, 2022

Haha, I already did 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arithmetic operation on dimensionless mag units · Issue #12472
I would expect that u.mag works equivalently to f.e. u.ABmag when it comes to conversion: >>> import astropy.units as u >>> m =...
Read more >
Magnitudes and Other Logarithmic Units — Astropy v5.2
Magnitudes and logarithmic units such as dex and dB are used as the logarithm of values relative to some reference value. Quantities with...
Read more >
Magnitudes and other Logarithmic Units - Read the Docs
Arithmetic. only ST [H+95] and AB [OG83] magnitudes are implemented at present, as these are defined in terms of flux densities, i.e., do...
Read more >
5.1 Photometry - HST User Documentation - HDox
The commonly used photometric systems ABMAG (Oke, J. B. 1964) and STMAG (Koorneef, ... Aperture corrections for the SBC are reported in Table...
Read more >
Astronomical Magnitude Systems
Conversion from AB magnitudes to Johnson magnitudes; Photon Flux; Filter Transformations; Night Sky Brightnesses. This page assumes you understand the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found