Skip to content

Slicing a frame with velocity data changes the differential class #6327

@adrn

Description

@adrn

Minimal bug example:

>>> c = coord.ICRS(ra=[1,2]*u.degree, dec=[1,2]*u.degree,
...           distance=[1,2]*u.pc,
...           pm_ra_cosdec=[1,2]*u.mas/u.yr,
...           pm_dec=[1,2]*u.mas/u.yr,
...           radial_velocity=[1,2]*u.km/u.s)
>>> c
<ICRS Coordinate: (ra, dec, distance) in (deg, deg, pc)
    [( 1.,  1.,  1.), ( 2.,  2.,  2.)]
 (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km / s)
    [( 1.,  1.,  1.), ( 2.,  2.,  2.)]> 
>>> c[0]
<ICRS Coordinate: (ra, dec, distance) in (deg, deg, pc)
    ( 1.,  1.,  1.)
 (pm_ra, pm_dec, radial_velocity) in (mas / yr, mas / yr, km / s)
    ( 1.00015233,  1.,  1.)>

That is: it displays with a SphericalDifferential instead?!

cc @eteq

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔥CriticalAffects-devPRs and issues that do not impact an existing Astropy releaseBugcoordinates

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions