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.

"per square arcsecond" units render wrong in latex/notebook

See original GitHub issue

This bug appears most clearly in the following clip from a Jupyter notebook:

image

And the underlying cause is apparent from looking at what the latex being rendered is:

>>> (u.arcsec**-1)._repr_latex_()
'$\\mathrm{\\frac{1}{{}^{\\prime\\prime}}}$'
>>> (u.arcsec**-2)._repr_latex_()
'$\\mathrm{\\frac{1}{{}^{\\prime\\prime}^{2}}}$'

The problem is that arcseconds are rendered as nothing to a power, so when you put that to a power, things go wrong.

The question is: what is the right answer? should it render as the arcsecond symbol with a 2 next to it? Or do we think it’s wrong that the symbol is in superscript in the first place? (I.e., instead of {}^{\\prime\\prime} it could be {\\prime\\prime}…)

(This may seem obscure, but actually it comes up surprisingly often when working with surface brightnesses, since they are traditionally something-per-square-arcsec)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mhvkcommented, Sep 25, 2019

I guess the question here is whether we should catch 1/" as well - looking back at #9218, I see that we discussed it but decided to punt on it, for now only removing double superscripts.

0reactions
astropy-bot[bot]commented, Nov 5, 2019

I’m going to close this issue as per my previous message, but if you feel that this issue should stay open, then feel free to re-open and remove the Close? label.

If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here

Read more comments on GitHub >

github_iconTop Results From Across the Web

bugs - Inline TeX Input renders wrong characters / symbols
I'm running Mathematica 12.2 on Windows and get the same, incorrect characters. I also noticed the \langle and \rangle are not rendering ......
Read more >
Image Analysis — CASAdocs documentation - Read the Docs
CASA Images¶. CASA images are stored as tables and can be accessed with CASA tasks and tools. Image metadata can be listed and...
Read more >
2D Plotting - 2D Graphics - SageMath Documentation
The underlying rendering is done using the matplotlib Python library. ... The aspect ratio describes the apparently height/width ratio of a unit square....
Read more >
STILTS - Starlink Tables Infrastructure Library Tool Set
Sends all error output from the run to the given file. By default this goes to the standard error stream. Supplying an empty...
Read more >
Gaia Data Release 2 - Using Gaia parallaxes
Some further examples of how error propagation should be handled can be found in, ... angular resolution, the resolution limit of Gaia DR2...
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