Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate GenericMap to inherit from NDCube #7547

Draft
wants to merge 71 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
c772dff
Move all map metadata properties onto a Mixin class
Cadair Apr 3, 2024
b94ec09
Actually use ndcube
Cadair Apr 22, 2024
8d38b9f
Add back MapMetaMixin
Cadair Apr 23, 2024
52e083d
NDCube.__init__ accesses .wcs and chaos unfolds
Cadair Apr 23, 2024
d5442b9
fix unit tests part 1
nabobalis Apr 23, 2024
ce881d4
fix unit tests part 2
nabobalis Apr 23, 2024
9cdbcab
disable cache
nabobalis Apr 23, 2024
3e142dd
mod test
nabobalis Apr 23, 2024
a337caf
improve tests
nabobalis Apr 23, 2024
cb73092
make ruff happy
nabobalis Apr 23, 2024
8d38c0b
remove old p2w and w2p functions
nabobalis Apr 23, 2024
ec1e596
modify all places we used to call old functions
nabobalis Apr 23, 2024
f1e1d30
Fix more tests
nabobalis Apr 23, 2024
d18b56b
install ndcube from github (#7589)
wtbarnes Apr 24, 2024
c338e54
add unit test
nabobalis Apr 24, 2024
d76d3ee
Add wcs setter and test with SlicedLowLevelWCS
Cadair Apr 24, 2024
b030118
Add back MapMetaMixin
Cadair Apr 23, 2024
4e0edea
Removes vim mistake
CyclingNinja Apr 23, 2024
3b0f474
Make the drop dimension error message smart
Cadair Apr 24, 2024
f5da1e1
Aligns mapbase init with ndcube init
CyclingNinja Apr 24, 2024
d2f5ed1
Propagates the header -> meta case
CyclingNinja Apr 24, 2024
703d124
Corrects dunders in source classes
CyclingNinja Apr 24, 2024
92a6100
Fixes kcor oberver coord test
CyclingNinja Apr 24, 2024
1f07488
hash file
nabobalis Apr 25, 2024
f2c280a
Merge remote-tracking branch 'upstream/main' into yolo
nabobalis Apr 25, 2024
d92d36b
Fix other issues
nabobalis Apr 25, 2024
391a0a2
Fix more bugs with wcs setter / gettitem
Cadair Apr 25, 2024
d670622
doc build
nabobalis Apr 25, 2024
96400b8
Merge branch 'map_ndcube_migration' into yolo
Cadair Apr 25, 2024
98e0b0a
Merge pull request #7595 from nabobalis/yolo
Cadair Apr 25, 2024
1c96e17
remove arithmetic methods
wtbarnes Apr 23, 2024
826a4a8
catch divide by zero warning
wtbarnes Apr 24, 2024
7a8530f
changelog
wtbarnes Apr 24, 2024
1773e86
fix unit handling
wtbarnes Apr 25, 2024
04f294f
set plot_settings
wtbarnes Apr 25, 2024
c2f878e
refactor how new instances are handled
wtbarnes Apr 25, 2024
c92b7a0
do not need arithmetic decorator
wtbarnes Apr 25, 2024
5238271
set wcs=None in _new_instance
wtbarnes Apr 26, 2024
06b47c6
move viz things from mapbase to plotter
wtbarnes Apr 22, 2024
6e2709a
move _get_cmap_name back to mapbase
wtbarnes Apr 22, 2024
3508050
move vmin/vmax setting to plotter
wtbarnes Apr 23, 2024
bbb2a10
fixing plotter and renaming
hayesla Apr 24, 2024
6db2e50
Fix tests hopefully
nabobalis Apr 26, 2024
7868712
Fixed more stuff
nabobalis Apr 26, 2024
4ef80b6
hack
nabobalis Apr 26, 2024
ae20750
changelog fix
nabobalis Apr 26, 2024
ab67f4f
test fix
nabobalis Apr 26, 2024
6fa2139
deprecate the plot_settings
wtbarnes Apr 26, 2024
de35978
no deprecation; remove abc
wtbarnes Apr 26, 2024
b6c55d5
fixes from code review
wtbarnes Apr 26, 2024
ac4a7da
Take the easy way out
Cadair Apr 25, 2024
4c238f7
moving data methods into mixin
hayesla Apr 24, 2024
961064d
getting it from the right places
hayesla Apr 24, 2024
faceb30
adding deprecation warnings
hayesla Apr 24, 2024
0d6bfd9
adding deprecate messages
hayesla Apr 24, 2024
7d5d73e
fixing spelling
hayesla Apr 24, 2024
b518c11
adding changelog
hayesla Apr 25, 2024
1b8ce4c
changing dimensions to shape and fixing tests
hayesla Apr 25, 2024
cd85b01
updating tests
hayesla Apr 25, 2024
1fc1342
fixing test
hayesla Apr 25, 2024
24926f3
fixing test
hayesla Apr 25, 2024
a08a340
still test_rotate failing
hayesla Apr 25, 2024
2a6f36f
no dtype for you!
Cadair Apr 25, 2024
ed9232c
wibble
Cadair Apr 25, 2024
8a53803
Removes further references to `Map.mean()`
CyclingNinja Apr 26, 2024
3140e37
fix the rotate test
Cadair Apr 25, 2024
45b7f7e
fixing dtype to .data.dtype on plotter
hayesla Apr 26, 2024
fa61199
fix bad rebase that i did
nabobalis Apr 26, 2024
6c37fbd
[map branch] Fix setter again (#7616)
Cadair May 8, 2024
d98e169
[map_branch] Merge in main and fix file conflict. (#7645)
nabobalis May 26, 2024
472147f
[map_branch] ??? (#7647)
nabobalis May 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions .codespellrc

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/changelog_bot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ skip =
default_section = THIRDPARTY
include_trailing_comma = true
known_astropy = astropy, asdf
known_first_party = sunpy
known_first_party = sunpy, ndcube
length_sort = false
length_sort_sections = stdlib
line_length = 110
Expand Down
18 changes: 6 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
exclude: "\\.asdf$"
exclude: ".*(.csv|.fits|.fts|.fit|.header|.txt|tca.*|.json|.asdf)$|^CITATION.rst|tools\/|sunpy\/extern\/|sunpy\/io\/src\/ana\/"
repos:
# This should be before any formatting hooks like isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.7"
rev: "v0.4.5"
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|sunpy/extern)$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: trailing-whitespace
exclude: ".*(.fits|.fts|.fit|.header|.txt)$"
- id: check-yaml
- id: debug-statements
- id: check-added-large-files
args: ["--enforce-all", "--maxkb=1054"]
exclude: ""
- id: end-of-file-fixer
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|.json)$|^CITATION.rst$"
- id: mixed-line-ending
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*)$"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
- repo: https://github.com/crate-ci/typos
rev: v1.21.0
hooks:
- id: codespell
additional_dependencies:
- tomli
args: ["--write-changes"]
- id: typos
- repo: local
hooks:
- id: generate-sunpy-net-hek-attrs
Expand Down
4 changes: 2 additions & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ extend-ignore = [
"PT023", # Always use () on pytest decorators
]

[flake8-tidy-imports]
[flake8-tidy-imports.banned-api]
[lint.flake8-tidy-imports]
[lint.flake8-tidy-imports.banned-api]
"warnings.warn".msg = "Use sunpy specific warning helpers warn_* from sunpy.utils.exceptions"

[lint.per-file-ignores]
Expand Down
32 changes: 16 additions & 16 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ New Features
- Adds two tutorials that demonstrate how to use LASCO data in overlaying maps (:ref:`sphx_glr_generated_gallery_plotting_lasco_overlay.py`) and how to create a custom mask for a LASCO C2 image (:ref:`sphx_glr_generated_gallery_map_lasco_mask.py`). (`#6576 <https://github.com/sunpy/sunpy/pull/6576>`__)
- Able to run the ``sunpy`` tests doing ``python -m sunpy.tests.self_test``. (`#6600 <https://github.com/sunpy/sunpy/pull/6600>`__)
- Able to detect gzip-compressed FITS files even if they don't have the ``.gz`` extension in the filename.
`~sunpy.io.detect_filetype` now looks for the right file signature while checking
``sunpy.io.detect_filetype`` now looks for the right file signature while checking
for gzipped FITS files. (`#6693 <https://github.com/sunpy/sunpy/pull/6693>`__)
- Added ``AttrAnd`` and ``AttrOr`` to the namespace in ``sunpy.net.attrs``.
This allows users to to avoid ``|`` or ``&`` when creating a query a larger query. (`#6708 <https://github.com/sunpy/sunpy/pull/6708>`__)
Expand Down Expand Up @@ -188,7 +188,7 @@ Documentation
-------------

- Added an example of how to search for multiple wavelengths attributes for AIA data using `sunpy.net.attrs.AttrOr`. (`#6501 <https://github.com/sunpy/sunpy/pull/6501>`__)
- Added `sunpy.map.PixelPair` to the reference documentation. (`#6620 <https://github.com/sunpy/sunpy/pull/6620>`__)
- Added ``sunpy.map.PixelPair`` to the reference documentation. (`#6620 <https://github.com/sunpy/sunpy/pull/6620>`__)
- Split the installation docs into a new Installation tutorial, and an installation guide. (`#6639 <https://github.com/sunpy/sunpy/pull/6639>`__)
- Added an example (:ref:`sphx_glr_generated_gallery_time_series_goes_xrs_nrt_data.py`) to download GOES NRT data and load it into `~sunpy.timeseries.TimeSeries`. (`#6744 <https://github.com/sunpy/sunpy/pull/6744>`__)
- Added an example gallery (:ref:`sphx_glr_generated_gallery_acquiring_data_querying_and_loading_SHARP_data.py`) for querying SHARP data and loading it into a `~sunpy.map.Map`. (`#6757 <https://github.com/sunpy/sunpy/pull/6757>`__)
Expand Down Expand Up @@ -257,7 +257,7 @@ Deprecations
- ``sunpy.data.download_sample_data()`` is now deprecated.
Use :func:`sunpy.data.sample.download_all` instead. (`#6426 <https://github.com/sunpy/sunpy/pull/6426>`__)
- The sunpy.database module is no longer actively maintained and has a number of outstanding issues.
It is anticiapted that sunpy.database will be formally deprecated in sunpy 5.0 and removed in sunpy 6.0.
It is anticipated that sunpy.database will be formally deprecated in sunpy 5.0 and removed in sunpy 6.0.
If you are using sunpy.database and would like to see a replacement, please join the discussion thread at https://community.openastronomy.org/t/deprecating-sunpy-database/495. (`#6498 <https://github.com/sunpy/sunpy/pull/6498>`__)


Expand Down Expand Up @@ -713,8 +713,8 @@ Removals
attributes are set on a `~astropy.wcs.WCS`. (`#5348 <https://github.com/sunpy/sunpy/pull/5348>`__)
- Support for passing non-unit levels to :meth:`sunpy.map.GenericMap.draw_contours`
when map data has units set has been removed, and with now raise an error. (`#5352 <https://github.com/sunpy/sunpy/pull/5352>`__)
- The ``origin`` argument to :meth:`sunpy.map.GenericMap.world_to_pixel` and
:meth:`sunpy.map.GenericMap.pixel_to_world` has been removed. (`#5353 <https://github.com/sunpy/sunpy/pull/5353>`__)
- The ``origin`` argument to ``sunpy.map.GenericMap.world_to_pixel`` and
``sunpy.map.GenericMap.pixel_to_world`` has been removed. (`#5353 <https://github.com/sunpy/sunpy/pull/5353>`__)
- Support for plotting or contouring `~sunpy.map.GenericMap` on axes that are not
`~astropy.visualization.wcsaxes.WCSAxes` has been removed. To create a
``WCSAxes``, use the ``projection`` argument when the axes is created, e.g.
Expand Down Expand Up @@ -850,7 +850,7 @@ Bug Fixes
location was a fully specified Stonyhurst heliographic coordinate. (`#5584 <https://github.com/sunpy/sunpy/pull/5584>`__)
- `~sunpy.map.sources.XRTMap` uppercases the ``TIMESYS`` key before checking if the
key needs to be fixed. (`#5592 <https://github.com/sunpy/sunpy/pull/5592>`__)
- Fixed passing a URL to :func:`sunpy.io.read_file` on windows. (`#5601 <https://github.com/sunpy/sunpy/pull/5601>`__)
- Fixed passing a URL to ``sunpy.io.read_file`` on windows. (`#5601 <https://github.com/sunpy/sunpy/pull/5601>`__)
- Fixed a bug where the ``date`` property on `~sunpy.map.sources.HMISynopticMap` returned ``None``
if the ``DATE-OBS`` key was present. (`#5648 <https://github.com/sunpy/sunpy/pull/5648>`__)

Expand Down Expand Up @@ -1187,7 +1187,7 @@ Backwards Incompatible Changes
For results from the VSO the keys are no longer separated with ``.``, and are
based on the displayed column names. For results from the ``dataretriever``
clients the only main change is that the keys are now lower case, where they
were capitilized before. You can use the ``.sunpy.net.fido_factory.UnifiedResponse.path_format_keys``
were capitalized before. You can use the ``.sunpy.net.fido_factory.UnifiedResponse.path_format_keys``
method to see all the possible keys for a particular search. (`#4798 <https://github.com/sunpy/sunpy/pull/4798>`__)
- The time returned from :func:`~sunpy.coordinates.sun.carrington_rotation_number`
has been changed from the TT scale to the more common UTC scale. To undo this change,
Expand Down Expand Up @@ -1239,8 +1239,8 @@ Deprecations
- Support for :func:`sunpy.coordinates.wcs_utils.solar_wcs_frame_mapping` to
use the ``.heliographic_observer`` and ``.rsun`` attributes on a
`~astropy.wcs.WCS` is deprecated. (`#4620 <https://github.com/sunpy/sunpy/pull/4620>`__)
- The ``origin`` argument to `sunpy.map.GenericMap.pixel_to_world` and
`sunpy.map.GenericMap.world_to_pixel` is deprecated.
- The ``origin`` argument to ``sunpy.map.GenericMap.pixel_to_world`` and
``sunpy.map.GenericMap.world_to_pixel`` is deprecated.

- If passing ``0``, not using the ``origin`` argument will have the same effect.
- If passing ``1``, manually subtract 1 pixel from the input to ``pixel_to_world``,
Expand Down Expand Up @@ -1286,7 +1286,7 @@ Features
- Refactoring of `~sunpy.net.dataretriever` which adds these capabilities to `~sunpy.net.dataretriever.QueryResponse`:

- Any ``attr`` shall not be defaulted to a hard-coded value in all subclasses of `~sunpy.net.dataretriever.GenericClient`; thus records for all possible ``attrs`` shall be returned if it is not specified in the query.
- `~sunpy.net.dataretriever.QueryResponse` can now show more columns; thus all metadata extractable from matching file URLs shall be shown and for a client, non-spported ``attrs`` shall not be shown in the response tables. (`#4321 <https://github.com/sunpy/sunpy/pull/4321>`__)
- `~sunpy.net.dataretriever.QueryResponse` can now show more columns; thus all metadata extractable from matching file URLs shall be shown and for a client, non-supported ``attrs`` shall not be shown in the response tables. (`#4321 <https://github.com/sunpy/sunpy/pull/4321>`__)
- New class attributes added to `~sunpy.net.dataretriever.GenericClient`:

- ``baseurl`` and ``pattern`` which are required to define a new simple client.
Expand Down Expand Up @@ -1426,7 +1426,7 @@ Bug Fixes
- ``sunpy.io.fits.header_to_fits`` now excludes any keys that have associated NaN
values, as these are not valid in a FITS header, and throws a warning if this
happens. (`#4676 <https://github.com/sunpy/sunpy/pull/4676>`__)
- Fixed an assumption in `sunpy.map.GenericMap.pixel_to_world` that the first
- Fixed an assumption in ``sunpy.map.GenericMap.pixel_to_world`` that the first
data axis is longitude, and the second is latitude. This will affect you if
you are using data where the x/y axes are latitude/longitude, and now returns
correct values in methods and properties that call ``pixel_to_world``,
Expand Down Expand Up @@ -1703,7 +1703,7 @@ Improved Documentation
- Removed obsolete Astropy Helpers submodule section in :file:`CONTRIBUTING.rst`;
Also removed mentions of astropy_helpers in all files of the project. (`#3676 <https://github.com/sunpy/sunpy/pull/3676>`__)
- Corrected misleading `~sunpy.timeseries.metadata.TimeSeriesMetaData` documentation about optional parameters. (`#3680 <https://github.com/sunpy/sunpy/pull/3680>`__)
- Added an example for `~sunpy.map.GenericMap.world_to_pixel` function in the Units & Coordinates guide. (`#3776 <https://github.com/sunpy/sunpy/pull/3776>`__)
- Added an example for ``sunpy.map.GenericMap.world_to_pixel`` function in the Units & Coordinates guide. (`#3776 <https://github.com/sunpy/sunpy/pull/3776>`__)
- Added a :ref:`page <sunpy-topic-guide-coordinates-carrington>` describing how SunPy calculates Carrington longitudes. (`#3782 <https://github.com/sunpy/sunpy/pull/3782>`__)
- Changed padding value of an example in the example gallery to fix the overlap of titles and x-label axes. (`#3835 <https://github.com/sunpy/sunpy/pull/3835>`__)
- More information and links about how to create changelogs. (`#3856 <https://github.com/sunpy/sunpy/pull/3856>`__)
Expand All @@ -1718,7 +1718,7 @@ Improved Documentation
The page :ref:`sunpy-topic-guide-coordinates-rotatedsunframe` has an example of a mini-gallery at the bottom. (`#4124 <https://github.com/sunpy/sunpy/pull/4124>`__)
- Added `sunpy.visualization.colormaps.color_tables` to the docs. (`#4182 <https://github.com/sunpy/sunpy/pull/4182>`__)
- Made minor improvements to the map histogramming example. (`#4205 <https://github.com/sunpy/sunpy/pull/4205>`__)
- Add a warning to `sunpy.io` docs to recommend not using it for FITS (`#4208 <https://github.com/sunpy/sunpy/pull/4208>`__)
- Add a warning to ``sunpy.io`` docs to recommend not using it for FITS (`#4208 <https://github.com/sunpy/sunpy/pull/4208>`__)


Trivial/Internal Changes
Expand Down Expand Up @@ -1824,7 +1824,7 @@ Features
objects. (`#3408 <https://github.com/sunpy/sunpy/pull/3408>`__)
- `~sunpy.map.GenericMap` objects now have a ``.cmap`` attribute, which returns the full `~matplotlib.colors.Colormap`.
object. (`#3412 <https://github.com/sunpy/sunpy/pull/3412>`__)
- `sunpy.io.write_file()` now accepts `~pathlib.Path` objects as filename inputs. (`#3469 <https://github.com/sunpy/sunpy/pull/3469>`__)
- ``sunpy.io.write_file`` now accepts `~pathlib.Path` objects as filename inputs. (`#3469 <https://github.com/sunpy/sunpy/pull/3469>`__)
- :func:`sunpy.map.header_helper.make_fitswcs_header` now accepts a `tuple` representing the shape of an array as well as the actual array as the ``data`` argument. (`#3483 <https://github.com/sunpy/sunpy/pull/3483>`__)
- Made a couple of module imports lazy to reduce the import time of sunpy.map by
~40%. (`#3495 <https://github.com/sunpy/sunpy/pull/3495>`__)
Expand Down Expand Up @@ -2017,7 +2017,7 @@ Deprecations and Removals
- Removed ``MapCube`` in favour of `~sunpy.map.MapSequence` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``solar_north`` in favour of ``get_sun_P`` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``database.download`` in favour of ``sunpy.database.Database.fetch`` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``sunpy.map.GenericMap.pixel_to_data`` in favour of `sunpy.map.GenericMap.pixel_to_world` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``sunpy.map.GenericMap.pixel_to_data`` in favour of ``sunpy.map.GenericMap.pixel_to_world`` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``GenericClient.get`` in favour of `sunpy.net.dataretriever.GenericClient.fetch`. This changes applies to the other clients as well. (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``Map.xrange`` and ``Map.yrange`` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
- Removed ``sunpy.net.attrs.Wave`` in favour of ``sunpy.net.vso.attrs.Wavelength`` (`#2830 <https://github.com/sunpy/sunpy/pull/2830>`__)
Expand Down Expand Up @@ -2083,7 +2083,7 @@ Bug Fixes
- Fix the bug that prevented VSO queries for HMI data from downloading file
without specifying ``a.Physobs``. (`#2621 <https://github.com/sunpy/sunpy/pull/2621>`__)
- Fix ``sunpy.map.mapcube.MapCube.plot``. The code had not been updated to support the changes to the wcsaxes helper functions. (`#2627 <https://github.com/sunpy/sunpy/pull/2627>`__)
- Replace all use of the deprecated ``sunpy.cm.get_cmap`` with `matplotlib.cm.get_cmap` to prevent deprecation warnings being raised. (`#2635 <https://github.com/sunpy/sunpy/pull/2635>`__)
- Replace all use of the deprecated ``sunpy.cm.get_cmap`` with ``matplotlib.cm.get_cmap`` to prevent deprecation warnings being raised. (`#2635 <https://github.com/sunpy/sunpy/pull/2635>`__)
- Fix generation of the coordinate transformation graph with Astropy 3.1.dev (`#2636 <https://github.com/sunpy/sunpy/pull/2636>`__)
- Prevent helioviewer from erroring when downloading file to a directory that
does not exist. It will now create the directory when required. (`#2642 <https://github.com/sunpy/sunpy/pull/2642>`__)
Expand Down
25 changes: 25 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
default.extend-ignore-identifiers-re = [
"NDCube",
"ANDed", # ANDed
"arange",
"iy1",
"iy2",
"EIS",
"eis",
"EIT",
"eit",
"HAE",
"hsi",
"Hsi",
"nd",
"NDData",
"alog",
"alog10",
"FOVs",
"FOV",
# HEK
"OT",
"ot",
# Coords,
"pn",
]
2 changes: 1 addition & 1 deletion changelog/6736.feature.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
:func:`sunpy.io.read_file` will now try to detect the filetype based on the content and then fallback to using the file extension.
``sunpy.io.read_file`` will now try to detect the filetype based on the content and then fallback to using the file extension.
2 changes: 2 additions & 0 deletions changelog/7537.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
``sunpy.io.read_file`` and ``sunpy.io.write_file`` are deprecated and will be removed in the future.
These were intended to be private functions and should not be used.
1 change: 1 addition & 0 deletions changelog/7580.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved all `sunpy.map.GenericMap` plotting functionality to ``sunpy.map.Map.plotter``.
1 change: 1 addition & 0 deletions changelog/7582.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the arithmetic operators on `~sunpy.map.GenericMap` in favor of using those on `~ndcube.NDCube`.
1 change: 1 addition & 0 deletions changelog/7592.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecated several data methods on map in favour of ``sunpy.map.GenericMap.data.<method_name>``.
1 change: 1 addition & 0 deletions changelog/7594.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug that interfered with :func:`astropy.wcs.utils.celestial_frame_to_wcs` when working with a custom subclass of :class:`~sunpy.coordinates.frames.SunPyBaseCoordinateFrame`.
1 change: 1 addition & 0 deletions changelog/7627.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed bug where conversion of results from the HEKClient to Astropy Time failed when some values where empty or missing for the values of event_strattime, event_endtime or event_peaktime
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

from matplotlib import MatplotlibDeprecationWarning
from ruamel.yaml import YAML
from sphinx_gallery.sorting import ExampleTitleSortKey, ExplicitOrder
from sphinx_gallery.sorting import ExplicitOrder
from sunpy_sphinx_theme import PNG_ICON

from astropy.utils.exceptions import AstropyDeprecationWarning
Expand Down Expand Up @@ -196,6 +196,7 @@
"hvpy": ("https://hvpy.readthedocs.io/en/latest/", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"mpl_animators": ("https://docs.sunpy.org/projects/mpl-animators/en/stable/", None),
"ndcube" : ("https://docs.sunpy.org/projects/ndcube/en/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"parfive": ("https://parfive.readthedocs.io/en/stable/", None),
"reproject": ("https://reproject.readthedocs.io/en/stable/", None),
Expand Down Expand Up @@ -282,7 +283,7 @@
'../examples/computer_vision_techniques',
'../examples/showcase',
]),
'within_subsection_order': ExampleTitleSortKey,
'within_subsection_order': "ExampleTitleSortKey",
'gallery_dirs': os.path.join('generated', 'gallery'),
'matplotlib_animations': True,
# Comes from the theme.
Expand Down
15 changes: 15 additions & 0 deletions docs/dev_guide/contents/internal_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _sunpy-dev-guide-internal-api:

**************************
Internal API Documentation
**************************

This page contains the documentation for the internal API of `sunpy`.

.. automodapi:: sunpy.io._file_tools

.. automodapi:: sunpy.io._header

.. automodapi:: sunpy.io._fits

.. automodapi:: sunpy.io._jp2