-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
This may be a bug, or it may work-as-designed in which case I have a feature request.
When you have a SkyCoord, there is no interface defined to make another SkyCoord with the same frame attributes. In particular, the frame= argument copies some attributes, such as equinox, but not others, such as obstime.
co1 = SkyCoord(10, 20, unit=u.deg, frame=FK5, equinox='B1950', obstime=Time('2017-01-01T00:00'))
co2 = SkyCoord(15, 20, unit=u.deg, frame=co1.frame)
print(co1, co2,sep='\n')
print("obstime: co1:{}, co2:{}".format(co1.obstime, co2.obstime))
giving:
<SkyCoord (FK5: equinox=B1950.000): (ra, dec) in deg ( 10., 20.)>
<SkyCoord (FK5: equinox=B1950.000): (ra, dec) in deg ( 15., 20.)>
obstime: co1:2017-01-01T00:00:00.000, co2:None
So if this is a bug, then this Issue is a bug report. If this is not a bug, then I request an argument flag that tells the __init__ to copy all the frame attributes, instead of an undocumented subset of them. (This was touched upon in the discussion of #5702)