From 4646d10021025f75a4c44b265d09c7e0ed9fcbd5 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:23:18 +0000 Subject: [PATCH 01/14] updatign scikit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c5908a5..4daba8d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "numpy>=1.26.0", "matplotlib>=3.8.0", "scipy>=1.12.0", - "scikit-image>=0.20.0", + "scikit-image>=0.24.0", "sunpy[map]>=7.0.0", ] From b03ccb2e182a696888c485e21fed2eb886a49a6b Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:28:22 +0000 Subject: [PATCH 02/14] removing scimage --- sunkit_image/stara.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sunkit_image/stara.py b/sunkit_image/stara.py index 80a0dcce..8898950d 100644 --- a/sunkit_image/stara.py +++ b/sunkit_image/stara.py @@ -1,5 +1,4 @@ import numpy as np -import skimage from skimage.filters import median from skimage.morphology import disk, white_tophat from skimage.util import invert @@ -8,11 +7,6 @@ import sunpy.map -if skimage.__version__ < "0.25.0": - # Need to account for https://github.com/scikit-image/scikit-image/pull/7566/files - from skimage.morphology import square -else: - from skimage.morphology import footprint_rectangle __all__ = ["stara"] @@ -73,12 +67,9 @@ def stara( # Median filter to remove detections based on hot pixels m_pix = int((median_box / smap.scale[0]).to_value(u.pix)) - if skimage.__version__ < "0.25.0": - function = square(m_pix) - else: - function = footprint_rectangle((m_pix, m_pix)) - - med = median(data, function, behavior="ndimage") + + footprint = np.ones((m_pix, m_pix), dtype=np.uint8) + med = median(data, footprint, behavior="ndimage") # Construct the pixel structuring element c_pix = int((circle_radius / smap.scale[0]).to_value(u.pix)) From 28c6a36ff24f9a49f5509a6ea2aad32b7388a888 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:33:07 +0000 Subject: [PATCH 03/14] updating dims to shape --- examples/aligning_aia_with_eis_maps.py | 4 ++-- sunkit_image/coalignment/tests/test_coalignment.py | 4 ++-- sunkit_image/radial.py | 2 +- sunkit_image/utils/tests/test_utils.py | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/aligning_aia_with_eis_maps.py b/examples/aligning_aia_with_eis_maps.py index 0cb778c1..41968f51 100644 --- a/examples/aligning_aia_with_eis_maps.py +++ b/examples/aligning_aia_with_eis_maps.py @@ -40,8 +40,8 @@ # Before coaligning the images, we first resample the AIA image to the same plate # scale as the EIS image. This will ensure better results from our coalignment. -nx = (aia_map.scale.axis1 * aia_map.dimensions.x) / eis_map.scale.axis1 -ny = (aia_map.scale.axis2 * aia_map.dimensions.y) / eis_map.scale.axis2 +nx = (aia_map.scale.axis1 * aia_map.data.shape[1] * u.pix) / eis_map.scale.axis1 +ny = (aia_map.scale.axis2 * aia_map.data.shape[0] * u.pix) / eis_map.scale.axis2 aia_downsampled = aia_map.resample(u.Quantity([nx, ny])) diff --git a/sunkit_image/coalignment/tests/test_coalignment.py b/sunkit_image/coalignment/tests/test_coalignment.py index 065fba13..39c3a669 100644 --- a/sunkit_image/coalignment/tests/test_coalignment.py +++ b/sunkit_image/coalignment/tests/test_coalignment.py @@ -71,8 +71,8 @@ def incorrect_pointing_cutout_map_and_shift(request, cutout_map): @pytest.mark.remote_data() def test_coalignment_eis_aia(eis_test_map, aia193_test_map): - nx = (aia193_test_map.scale.axis1 * aia193_test_map.dimensions.x) / eis_test_map.scale[0] - ny = (aia193_test_map.scale.axis2 * aia193_test_map.dimensions.y) / eis_test_map.scale[1] + nx = (aia193_test_map.scale.axis1 * aia193_test_map.data.shape[1] * u.pix) / eis_test_map.scale[0] + ny = (aia193_test_map.scale.axis2 * aia193_test_map.data.shape[0] * u.pix) / eis_test_map.scale[1] aia193_test_downsampled_map = aia193_test_map.resample(u.Quantity([nx, ny])) coaligned_eis_map = coalign_map(eis_test_map, aia193_test_downsampled_map, method="match_template") # Check that correction is as expected based on known pointing offset diff --git a/sunkit_image/radial.py b/sunkit_image/radial.py index b7abaad4..28dd024e 100644 --- a/sunkit_image/radial.py +++ b/sunkit_image/radial.py @@ -523,7 +523,7 @@ def fnrgf( radial_bin_edges, map_r = find_radial_bin_edges(smap, radial_bin_edges) # Get the Helioprojective coordinates of each pixel - x, y = np.meshgrid(*[np.arange(v.value) for v in smap.dimensions]) * u.pix + x, y = np.meshgrid(*[np.arange(v.value) for v in smap.shape[::-1]]) * u.pix coords = smap.pixel_to_world(x, y).transform_to(frames.Helioprojective) # Get angles associated with every pixel diff --git a/sunkit_image/utils/tests/test_utils.py b/sunkit_image/utils/tests/test_utils.py index 2b2b65e3..ddc5d8c5 100644 --- a/sunkit_image/utils/tests/test_utils.py +++ b/sunkit_image/utils/tests/test_utils.py @@ -84,8 +84,7 @@ def test_find_pixel_radii(aia_171): # Calculate the pixel radii pixel_radii = utils.find_pixel_radii(aia_171) # The shape of the pixel radii is the same as the input map - assert pixel_radii.shape[0] == int(aia_171.dimensions[0].value) - assert pixel_radii.shape[1] == int(aia_171.dimensions[1].value) + assert pixel_radii.shape == aia_171.data.shape # Make sure the unit is solar radii assert pixel_radii.unit == u.R_sun # Make sure the maximum From 15a7dc3d9a883c199662166969d8f71246429f32 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:46:01 +0000 Subject: [PATCH 04/14] fixing .data.shape --- sunkit_image/radial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sunkit_image/radial.py b/sunkit_image/radial.py index 28dd024e..0ae809dd 100644 --- a/sunkit_image/radial.py +++ b/sunkit_image/radial.py @@ -523,7 +523,7 @@ def fnrgf( radial_bin_edges, map_r = find_radial_bin_edges(smap, radial_bin_edges) # Get the Helioprojective coordinates of each pixel - x, y = np.meshgrid(*[np.arange(v.value) for v in smap.shape[::-1]]) * u.pix + x, y = np.meshgrid(*[np.arange(v.value) for v in smap.data.shape[::-1]]) * u.pix coords = smap.pixel_to_world(x, y).transform_to(frames.Helioprojective) # Get angles associated with every pixel From 62e0f153f0ab3977ab012d09ff3d66007b4111b6 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:48:33 +0000 Subject: [PATCH 05/14] updating precommit --- sunkit_image/stara.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sunkit_image/stara.py b/sunkit_image/stara.py index 8898950d..0a0d0d68 100644 --- a/sunkit_image/stara.py +++ b/sunkit_image/stara.py @@ -7,7 +7,6 @@ import sunpy.map - __all__ = ["stara"] @@ -67,7 +66,7 @@ def stara( # Median filter to remove detections based on hot pixels m_pix = int((median_box / smap.scale[0]).to_value(u.pix)) - + footprint = np.ones((m_pix, m_pix), dtype=np.uint8) med = median(data, footprint, behavior="ndimage") From 4afb1c9c70552ea2bff3679ac0cb25c102f7ec7f Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:54:51 +0000 Subject: [PATCH 06/14] adding changelog --- changelog/348.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/348.breaking.rst diff --git a/changelog/348.breaking.rst b/changelog/348.breaking.rst new file mode 100644 index 00000000..060e2cf9 --- /dev/null +++ b/changelog/348.breaking.rst @@ -0,0 +1 @@ +Increased the minimum required version of ``scikit-image`` to 0.24.0, and replaced usage of the deprecated ``sunpy.map.GenericMap.dimensions`` property with ``sunpy.map.GenericMap.data.shape``, and removed use of ``skimage.morphology.footprint_rectangle``. \ No newline at end of file From 2ff1d9d24c623886d9824b5a7dfd7ea9ef6f2ecb Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 11:57:36 +0000 Subject: [PATCH 07/14] fixing things --- sunkit_image/radial.py | 2 +- sunkit_image/stara.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sunkit_image/radial.py b/sunkit_image/radial.py index 0ae809dd..3cdd1f33 100644 --- a/sunkit_image/radial.py +++ b/sunkit_image/radial.py @@ -523,7 +523,7 @@ def fnrgf( radial_bin_edges, map_r = find_radial_bin_edges(smap, radial_bin_edges) # Get the Helioprojective coordinates of each pixel - x, y = np.meshgrid(*[np.arange(v.value) for v in smap.data.shape[::-1]]) * u.pix + x, y = np.meshgrid(*[np.arange(n) for n in smap.data.shape[::-1]]) * u.pix coords = smap.pixel_to_world(x, y).transform_to(frames.Helioprojective) # Get angles associated with every pixel diff --git a/sunkit_image/stara.py b/sunkit_image/stara.py index 0a0d0d68..dcf8af4d 100644 --- a/sunkit_image/stara.py +++ b/sunkit_image/stara.py @@ -66,7 +66,6 @@ def stara( # Median filter to remove detections based on hot pixels m_pix = int((median_box / smap.scale[0]).to_value(u.pix)) - footprint = np.ones((m_pix, m_pix), dtype=np.uint8) med = median(data, footprint, behavior="ndimage") From 58b5a51eec3c140b50ffa1e553f6179c13a087dd Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 12:01:53 +0000 Subject: [PATCH 08/14] fixing precommit --- changelog/348.breaking.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/348.breaking.rst b/changelog/348.breaking.rst index 060e2cf9..011a5522 100644 --- a/changelog/348.breaking.rst +++ b/changelog/348.breaking.rst @@ -1 +1 @@ -Increased the minimum required version of ``scikit-image`` to 0.24.0, and replaced usage of the deprecated ``sunpy.map.GenericMap.dimensions`` property with ``sunpy.map.GenericMap.data.shape``, and removed use of ``skimage.morphology.footprint_rectangle``. \ No newline at end of file +Increased the minimum required version of ``scikit-image`` to 0.24.0, and replaced usage of the deprecated ``sunpy.map.GenericMap.dimensions`` property with ``sunpy.map.GenericMap.data.shape``, and removed use of ``skimage.morphology.footprint_rectangle``. From 9fbe4d72b1967e7adc57b09eee239024cad6abf0 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 12:18:13 +0000 Subject: [PATCH 09/14] fixing updated shape and pixel to world --- sunkit_image/radial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sunkit_image/radial.py b/sunkit_image/radial.py index 3cdd1f33..d2ff0436 100644 --- a/sunkit_image/radial.py +++ b/sunkit_image/radial.py @@ -523,8 +523,8 @@ def fnrgf( radial_bin_edges, map_r = find_radial_bin_edges(smap, radial_bin_edges) # Get the Helioprojective coordinates of each pixel - x, y = np.meshgrid(*[np.arange(n) for n in smap.data.shape[::-1]]) * u.pix - coords = smap.pixel_to_world(x, y).transform_to(frames.Helioprojective) + x, y = np.meshgrid(*[np.arange(n) for n in smap.data.shape[::-1]]) + coords = smap.wcs.pixel_to_world(x, y).transform_to(frames.Helioprojective) # Get angles associated with every pixel angles = np.arctan2(coords.Ty.value, coords.Tx.value) From 1408b9fcc378a1a7a07407b87b3ad915ad6c9d88 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 12:20:24 +0000 Subject: [PATCH 10/14] apparently this is needed to --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index 8db7cdb2..86bd626c 100644 --- a/pytest.ini +++ b/pytest.ini @@ -54,3 +54,5 @@ filterwarnings = ignore:leap-second auto-update failed:astropy.utils.exceptions.AstropyWarning ignore:.*deprecated - use.*:pyparsing.warnings.PyparsingDeprecationWarning ignore:.*argument is deprecated, use.*:pyparsing.warnings.PyparsingDeprecationWarning + # scikit-image 0.27 warns on every call to functions that will change in skimage2 + ignore:`skimage\..*` is deprecated in favor of:PendingDeprecationWarning \ No newline at end of file From c15de02c1353098d3cd491ceb7adb6de156ad6d7 Mon Sep 17 00:00:00 2001 From: Laura Hayes Date: Wed, 28 Oct 2026 16:34:44 +0000 Subject: [PATCH 11/14] Update pyproject.toml Co-authored-by: Stuart Mumford --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4daba8d1..2dc8109c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Physics", ] dependencies = [ - "astropy>=6.1.0", + "astropy>=7.0.0", "numpy>=1.26.0", "matplotlib>=3.8.0", "scipy>=1.12.0", From ba4debebe1a12a51802ee46671a4cae6f3d50336 Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 16:47:28 +0000 Subject: [PATCH 12/14] attempt to fix fig tests --- sunkit_image/radial.py | 2 +- ...=> figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename sunkit_image/tests/{figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_720.json => figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json} (100%) diff --git a/sunkit_image/radial.py b/sunkit_image/radial.py index d2ff0436..26cc2cc7 100644 --- a/sunkit_image/radial.py +++ b/sunkit_image/radial.py @@ -523,7 +523,7 @@ def fnrgf( radial_bin_edges, map_r = find_radial_bin_edges(smap, radial_bin_edges) # Get the Helioprojective coordinates of each pixel - x, y = np.meshgrid(*[np.arange(n) for n in smap.data.shape[::-1]]) + x, y = np.meshgrid(*[np.arange(n) for n in smap.data.shape[::-1]]) coords = smap.wcs.pixel_to_world(x, y).transform_to(frames.Helioprojective) # Get angles associated with every pixel diff --git a/sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_720.json b/sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json similarity index 100% rename from sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_720.json rename to sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json From 4c20db9ff5ad6a645f9b2d043d9e3736d4fd3abb Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 17:01:36 +0000 Subject: [PATCH 13/14] savings good --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2d6e91c7..68d23a95 100644 --- a/tox.ini +++ b/tox.ini @@ -50,7 +50,7 @@ deps = # Handle minimum dependencies via minimum_dependencies oldestdeps: minimum_dependencies # Figure tests need a tightly controlled environment - figure-!devdeps: astropy==7.2.0 + figure-!devdeps: astropy==7.2.3 figure-!devdeps: matplotlib==3.10.8 figure-!devdeps: sunpy==7.1.0 # The following indicates which extras_require will be installed From f06e9c69c6d41085e99af9bc40338a77f9baa7ef Mon Sep 17 00:00:00 2001 From: hayesla Date: Wed, 28 Oct 2026 17:14:53 +0000 Subject: [PATCH 14/14] updating figure hashes --- ...shes_mpl_3108_ft_261_sunpy_710_astropy_723.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json b/sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json index 15f5b35f..2ee1aa51 100644 --- a/sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json +++ b/sunkit_image/tests/figure_hashes_mpl_3108_ft_261_sunpy_710_astropy_723.json @@ -1,7 +1,7 @@ { - "sunkit_image.coalignment.tests.test_coalignment.test_coalignment_figure[incorrect_pointing_cutout_map_and_shift0]": "ce40f5667e62443a8a48f7fac2ea320d159f6026572e7c879d7746da800ae17e", - "sunkit_image.coalignment.tests.test_coalignment.test_coalignment_figure[incorrect_pointing_cutout_map_and_shift1]": "2b8134d3d32cc38f0855b4aca96e8a04219bd4205def9af0e87877232029f634", - "sunkit_image.coalignment.tests.test_coalignment.test_coalignment_figure[incorrect_pointing_cutout_map_and_shift2]": "f2c3574c80d36e0e0cd8c365aae037c5e5ef5fe74a4232663d1b8bc8db705f81", + "sunkit_image.coalignment.tests.test_coalignment.test_coalignment_figure[incorrect_pointing_cutout_map_and_shift0]": "cd14b11bb25e54f6b3d2f568cb183fdd057b339204f34141f311e4ef871a9561", + "sunkit_image.coalignment.tests.test_coalignment.test_coalignment_figure[incorrect_pointing_cutout_map_and_shift1]": "6214e4d20869c2239d24ecf2a24ed5a31954a15de431a6deb26134227d54e291", + "sunkit_image.coalignment.tests.test_coalignment.test_coalignment_figure[incorrect_pointing_cutout_map_and_shift2]": "b620292ff1f42c6ea60a6651d4c9d41923d709ef246ee7676c9371e67b5a34e0", "sunkit_image.tests.test_enhance.test_mgn[array]": "d3ed034e34d03288aad08c06447fde42a8eb5c7ce4c0543a2090bb04c75fad1a", "sunkit_image.tests.test_enhance.test_mgn[map]": "50bb490a6cc2408befe13c7f2a54f7433df80c2473dd21b619ace35de7e8f250", "sunkit_image.tests.test_enhance.test_mgn_submap": "cf3948d3ffa8ed4eacc500bee170db68bb1a96d2cec1c92e48f74c01827dc397", @@ -13,9 +13,9 @@ "sunkit_image.tests.test_radial.test_fig_nrgf": "57b79f69ba537ff2ee37a879048f7d1232173567cc8c7b2e46988cb8b11a5575", "sunkit_image.tests.test_radial.test_fig_fnrgf": "42044b0b483cd9623c59530c93f4e71b817df335050a71bb9c026cbf429cd7bd", "sunkit_image.tests.test_radial.test_fig_rhef": "1c97e4b501d6f614b8777ef36c97a1d17645287020d2979c206f84d51cce6db6", - "sunkit_image.tests.test_radial.test_multifig_rhef": "090d0416549db66274e1cfd8cd8a12cbaa2ed7062b641894977d5a75fd89c784", + "sunkit_image.tests.test_radial.test_multifig_rhef": "738021ce97cd5f7debfe4d693fa04c8ab7ba0043219cf9c8f3929d51ea1a1195", "sunkit_image.tests.test_stara.test_stara_plot": "5aac9b08827c4e7ae77919d8cf123f4c0852e6da17c9e436408aff64cc6132e5", - "sunkit_image.tests.test_trace.test_occult2_fig[array]": "e59f4c476b6b27788ab8dc397cb0d2f34f8d6032eced289fd2eabeb324b39558", - "sunkit_image.tests.test_trace.test_occult2_fig[map]": "e59f4c476b6b27788ab8dc397cb0d2f34f8d6032eced289fd2eabeb324b39558", - "sunkit_image.tests.test_trace.test_occult2_cutout": "1b18459111342c3bab4a2c8fb08b012eef4a69767e08753d8918fe4987fa165d" + "sunkit_image.tests.test_trace.test_occult2_fig[array]": "37734310f9079bb2d0778f4bb9c525647307a2c30b8f493044afce034c3b86d5", + "sunkit_image.tests.test_trace.test_occult2_fig[map]": "37734310f9079bb2d0778f4bb9c525647307a2c30b8f493044afce034c3b86d5", + "sunkit_image.tests.test_trace.test_occult2_cutout": "63c8fddf4e4533ca52a4564f7f75fd8304b0b39275da98011539382058b94d53" } \ No newline at end of file