You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SkyCoord using frames not in the transform graph #5882
As noted by @eteq, in principle it should be possible to use SkyCoord with frames not in the transform graph, and still have access to their frame attributes, i.e., the following tests should pass:
def test_transformless_frame():
"""
Checks the behavior of SkyCoord's with a frame that isn't in the transform
graph
"""
class TestFrame(BaseCoordinateFrame):
fattr = FrameAttribute()
default_representation = SphericalRepresentation
tf = TestFrame(1*u.deg, 2*u.deg, fattr='sillywalks')
sc = SkyCoord(tf)
assert tf.fattr == sc.fattr
sc2 = SkyCoord(3*u.deg, 4*u.deg, fattr='sillywalks2', frame=TestFrame)
assert sc2.frame.fattr == sc2.fattr
Activity
eteq commentedon Mar 18, 2017
(FYI, commit 3688d56 at https://github.com/eteq/astropy/tree/skycoord-attributes has the test for this, and it should be easily cherry-pick-able if desired)
adrn commentedon Dec 3, 2018
This actually does seem to work now. Not sure where it was fixed, but...reopen if you disagree!