Added an additional alt keyword only parameter to transformations to longitude/latitude coordinates, which allows the altitude of the target's surface to be specified. For example, you can now specify the altitude with methods like:
This is a continuation of the work in #365, and means that all PlanetMapper conversions to and from lonlat coordinates can now have the altitude customised. In addition to coordinate conversion methods (e.g. radec2lonlat, lonlat2radec, ...), wireframe plotting methods and backplanes can now also produce altitude dependent outputs.
Internally, this is implemented using a context manager (and associated decorator) to modify SPICE kernel variables and instance attributes defining the target's radii. Within the _AdjustedSurfaceAltitude context, all relevant methods will use these adjusted radii values. On exit of the context manager, the original kernel variables and instance attributes will be restored. This is a relatively complex change, so I've added some significant new tests to help ensure that the state is changed appropriately.
Closes #350
Pull request checklist
[x] Add a clear description of the change
[x] Add any new tests needed
[x] Run spell check on new text visible to user (documentation, GUI etc.)
[x] Check any changes to requirements.txt are reflected in setup.py and conda-forge feedstock
[x] Check code passes CI checks (run run_ci.sh or check GitHub Actions)
Added an additional
alt
keyword only parameter to transformations to longitude/latitude coordinates, which allows the altitude of the target's surface to be specified. For example, you can now specify the altitude with methods like:This is a continuation of the work in #365, and means that all PlanetMapper conversions to and from
lonlat
coordinates can now have the altitude customised. In addition to coordinate conversion methods (e.g.radec2lonlat
,lonlat2radec
, ...), wireframe plotting methods and backplanes can now also produce altitude dependent outputs.Internally, this is implemented using a context manager (and associated decorator) to modify SPICE kernel variables and instance attributes defining the target's radii. Within the
_AdjustedSurfaceAltitude
context, all relevant methods will use these adjusted radii values. On exit of the context manager, the original kernel variables and instance attributes will be restored. This is a relatively complex change, so I've added some significant new tests to help ensure that the state is changed appropriately.Closes #350
Pull request checklist
requirements.txt
are reflected insetup.py
and conda-forge feedstockrun_ci.sh
or check GitHub Actions)See CONTRIBUTING.md for more details.