You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found an issue when a spike coordinate lies near the edge of a submap.
For example:
e.g.
>>>res=Fido.search(a.Time('2011-06-07T06:52:00', '2011-06-07T06:52:10'),
a.Instrument("AIA"), a.Wavelength(171*u.angstrom))
>>>f=Fido.fetch(res)
>>>my_map=sunpy.map.Map(f)
>>>bottom_left=SkyCoord(500*u.arcsec, -600*u.arcsec, frame=my_map.coordinate_frame)
>>>top_right=SkyCoord(1000*u.arcsec, -100*u.arcsec, frame=my_map.coordinate_frame)
>>>my_submap=my_map.submap(bottom_left, top_right=top_right)
>>>spikes=aiapy.calibrate.fetch_spikes(my_submap)
>>>spike_coords, _=aiapy.calibrate.fetch_spikes(my_submap, as_coords=True)
>>>respike_smap=aiapy.calibrate.respike(my_submap, spikes=spikes)
~/sunpy_dev/aiapy/aiapy/calibrate/spikes.pyinrespike(smap, spikes)
99# transformation may be very slightly off their integer values and100# casting them as int will sometimes result in an off-by-one error-->101new_data[coords.y.value.round().astype(int),
102coords.x.value.round().astype(int)] =values103# Update metadataIndexError: index836isoutofboundsforaxis1withsize836
if we inspect this - looking at the spike_coords one of the coordinates returned is outside of map range (see 1000.37''):
It's only an issue near the border - for example if you change the top_right coordinate to be 1001*u.arcsec it works fine. I guess its an issue of edge cases and finding closest pixel.
The text was updated successfully, but these errors were encountered:
In GitLab by @hayesla on Nov 12, 2020, 10:54
I have found an issue when a spike coordinate lies near the edge of a submap.
For example:
e.g.
if we inspect this - looking at the
spike_coords
one of the coordinates returned is outside of map range (see 1000.37''):It's only an issue near the border - for example if you change the
top_right
coordinate to be1001*u.arcsec
it works fine. I guess its an issue of edge cases and finding closest pixel.The text was updated successfully, but these errors were encountered: