Skip to content

Improve frame comparison #3182

@astrofrog

Description

@astrofrog

At the moment, one cannot compare whether frames are equivalent:

In [1]: from astropy.coordinates import FK5

In [2]: FK5(equinox='J2000') == FK5(equinox='J2010')
Out[2]: False

In [3]: FK5(equinox='J2000') == FK5(equinox='J2000')
Out[3]: False

It would be nice to have a way to check that all frame attributes are the same. Now == may be ambiguous because for frames with data this is not as well defined (are we comparing the frame attributes or the data? what if the data is a vector?).

Maybe the solution is to disable straight-off comparisons like the ones above but to instead have a method or function to check if two frames are the same (excluding data)?

cc @eteq @taldcroft

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