Skip to content

Commit

Permalink
Internal functions for coordinate transformations are now private API (
Browse files Browse the repository at this point in the history
…sunpy#7113)

Co-authored-by: Stuart Mumford <[email protected]>
Co-authored-by: Will Barnes <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 87db750 commit f06372a
Show file tree
Hide file tree
Showing 12 changed files with 1,236 additions and 1,220 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ Bug Fixes
a line with a masked array with the whole of the initial line masked out the
axes limits for the x axis were not correctly set. (`#4001 <https://github.com/sunpy/sunpy/pull/4001>`__)
- Fixed passing in a list of URLs into `sunpy.map.GenericMap`, before it caused an error due to the wrong type being returned. (`#4007 <https://github.com/sunpy/sunpy/pull/4007>`__)
- Fixed a bug with :func:`~sunpy.coordinates.transformations.transform_with_sun_center` where the global variable was sometimes restored incorrectly.
- Fixed a bug with :func:`~sunpy.coordinates.transform_with_sun_center` where the global variable was sometimes restored incorrectly.
This bug was most likely encountered if there was a nested use of this context manager. (`#4015 <https://github.com/sunpy/sunpy/pull/4015>`__)
- Fixes a bug in fido_factory to allow path="./" in fido.fetch(). (`#4058 <https://github.com/sunpy/sunpy/pull/4058>`__)
- Prevented ``sunpy.io.fits.header_to_fits`` modifying the passed header in-place. (`#4067 <https://github.com/sunpy/sunpy/pull/4067>`__)
Expand Down
2 changes: 2 additions & 0 deletions changelog/7113.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The ``sunpy.coordinates.transformations`` module is now slated for removal from the public API as it consists of internal functions used by coordinate transformations.
The context managers :func:`sunpy.coordinates.transform_with_sun_center` and :func:`sunpy.coordinates.propagate_with_solar_surface` should be accessed under `sunpy.coordinates`.
2 changes: 0 additions & 2 deletions docs/reference/coordinates/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ The parts of the following modules that are useful to a typical user are already

.. automodapi:: sunpy.coordinates.metaframes

.. automodapi:: sunpy.coordinates.transformations

.. automodapi:: sunpy.coordinates.wcs_utils


Expand Down
2 changes: 1 addition & 1 deletion docs/topic_guide/coordinates/rotatedsunframe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Note that equator rotates slightly faster than the Carrington rotation rate (its

Be aware that transformations with a change in ``obstime`` will also contend with a translation of the center of the Sun.
Note that the ``radius`` component above is no longer precisely on the surface of the Sun.
For precise transformations of solar features, one should also use the context manager :func:`~sunpy.coordinates.transformations.transform_with_sun_center` to account for the translational motion of the Sun.
For precise transformations of solar features, one should also use the context manager :func:`~sunpy.coordinates.transform_with_sun_center` to account for the translational motion of the Sun.
Using the context manager, the ``radius`` component stays as the solar radius as desired:


Expand Down
2 changes: 1 addition & 1 deletion sunpy/coordinates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"""

from . import sun
from ._transformations import _make_sunpy_graph, propagate_with_solar_surface, transform_with_sun_center
from .ephemeris import *
from .frames import *
from .metaframes import *
from .transformations import _make_sunpy_graph, propagate_with_solar_surface, transform_with_sun_center
from .wcs_utils import *

__doc__ += _make_sunpy_graph()
Loading

0 comments on commit f06372a

Please sign in to comment.