Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Deus1704 committed Aug 14, 2024
1 parent bfd9f70 commit 5bfec01
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sunkit_image/coalignment/tests/test_coalignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def test_coalignment(is_test_map):
date_start = "2014-01-08T09:57:27"
date_end = "2014-01-08T10:00:00"
aia193_test_map = sunpy.map.Map(Fido.fetch(Fido.search(a.Time(start=date_start, end=date_end), a.Instrument('aia'), a.Wavelength(193 * u.angstrom))))
nx = (aia193_test_map.scale.axis1 * aia193_test_map.dimensions.x) / is_test_map.scale.axis1
ny = (aia193_test_map.scale.axis2 * aia193_test_map.dimensions.y) / is_test_map.scale.axis2
eis_map = is_test_map
nx = (aia193_test_map.scale.axis1 * aia193_test_map.dimensions.x) / eis_map.scale[0]
ny = (aia193_test_map.scale.axis2 * aia193_test_map.dimensions.y) / eis_map.scale[1]
aia193_test_downsampled_map = aia193_test_map.resample(u.Quantity([nx, ny]))
coaligned_is_map = coalign(aia193_test_downsampled_map, is_test_map, "match_template")
assert coaligned_is_map.data.shape == is_test_map.data.shape
coaligned_is_map = coalign(aia193_test_downsampled_map, eis_map, "match_template")
assert coaligned_is_map.data.shape == eis_map.data.shape
assert coaligned_is_map.wcs.wcs.crval[0] == aia193_test_downsampled_map.wcs.wcs.crval[0]
assert coaligned_is_map.wcs.wcs.crval[1] == aia193_test_downsampled_map.wcs.wcs.crval[1]

Expand Down

0 comments on commit 5bfec01

Please sign in to comment.