Skip to content

Computing separation fails (sometimes) if one object has distance #11388

@duckrojo

Description

@duckrojo

Description

Hello,

I found that c1.separation(c2) is different than c2.separation(c1) when c1 is CGRS with distance and c2 is ICRS.

Thanks!

Expected behavior

c1.separation(c2) is the correct value

Steps to Reproduce

import astropy.units as u
import astropy.coordinates as apc
c1=apc.SkyCoord("3h", "16d",frame="gcrs",  distance=4e5*u.km)
c2=apc.SkyCoord("7h", "7d")
c1.separation(c2)
c2.separation(c1)

System Details

Windows-10-10.0.19041-SP0
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
Numpy 1.18.4
astropy 4.2
Scipy 1.4.1
Matplotlib 3.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions