astropy / astroplan

Observation planning package for astronomers – maintainer @bmorris3
https://astroplan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
198 stars 109 forks source link

elevation, longitude, latitude parameters missing from `Observer` class, contrary to docs. #521

Closed emirkmo closed 1 year ago

emirkmo commented 2 years ago

According to the docs, https://astroplan.readthedocs.io/en/latest/api/astroplan.Observer.html#astroplan.Observer Observer has parameters of elevation, longitude, and latitude as attributes, but this is not true. There is of course an implicit elevation instance in the repr and inside the location attribute.

https://github.com/astropy/astroplan/blob/b3cf55340c50ccf69ec363889c1fe8ff2f93cada/astroplan/observer.py#L187-L193

The location is of type EarthLocation and is added here, but while the other parameters are instantiated, longitude, latitude, and elevation are not. Now since they are based on the location attribute which can presumably change, it would be best if these instances reported the correct and human readable value as astropy.quantity.Quantity instances, even after a change of state.

The linked PR #522 shows my proposed fixes.