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

Masking Hot Pixels - Update #2325

Merged
merged 2 commits into from Nov 9, 2017
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions examples/masking_hot_pixels.py
Expand Up @@ -26,8 +26,8 @@
# Now we create a new custom aia with our new mask and
# plot the result using our modified colormap

max_indices = np.unravel_index(aia.data.argmax(), aia.data.shape) * u.pixel
hpc_max = aia.pixel_to_data(max_indices[1], max_indices[0])
max_indices = np.argwhere(aia.data == aia.data.max())*u.pixel
hpc_max = aia.pixel_to_data(max_indices[:, 1], max_indices[:, 0])
r = np.sqrt(hpc_max.Tx ** 2 + hpc_max.Ty ** 2) / aia.rsun_obs
mask = ma.masked_greater_equal(r, 1)
scaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask.mask)
Expand Down