astropy / astropy/astropy

Add support for offset coordinates

Open
#8,363 2 comments 1 reaction 0 assignees View on GitHub
Effort-low Feature Request Package-expert visualization.wcsaxes
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 19h
Merged PRs (30d)
75

Description

I am reopening astrofrog/wcsaxes#8
I tried the `SkyOffsetFrame` solution, but the result is not satisfactory, considering this example :

```
import numpy as np
import matplotlib.pyplot as plt
from astropy.wcs import WCS
from astropy.coordinates import SkyCoord

header = {'CRVAL1': 15., 'CRVAL2': 20.,
'CUNIT1': 'deg', 'CUNIT2': 'deg',
'CRPIX1': 16, 'CRPIX2': 16,
'CTYPE1': 'RA---TAN', 'CTYPE2': 'DEC--TAN' }
wcs = WCS(header)
coord = SkyCoord(header['CRVAL1'], header['CRVAL2'], unit="deg")

ax = plt.subplot(projection=wcs)
ax.imshow(np.zeros((32, 32)))
overlay = ax.get_coords_overlay(coord.skyoffset_frame())
```

the overlay axes looks good for the latitude but is an angle module 360° for the longitude.

![test](https://user-images.githubusercontent.com/3973209/51453139-00cb1d80-1d3e-11e9-8065-169777e357cc.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied WCS, SkyCoord, and get_coords_overlay example and inspect how the overlay handles SkyOffsetFrame longitude. Compare the longitude and latitude axis behavior, then define completion as offset coordinates displaying correctly without the longitude wrapping through 360 degrees.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.