-
-
Notifications
You must be signed in to change notification settings - Fork 37
Blog post for Artemis 2 Eclipse Photo #489
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
832fd55
Initial stub of a blog post
Cadair 025c591
More blog post updates
Cadair 24bee51
lint
Cadair eb1b36f
More blog
Cadair bd15a59
remove numpy pin
Cadair a9d8a4b
English innit
Cadair 08f5888
More fixes
Cadair 962ab79
Figure tweaks
Cadair 129b3f5
more words
Cadair c4cc910
Apply suggestions from code review
Cadair d2dac0f
Finally, intersphinx
Cadair 9dd9139
more intersphinx
Cadair d2c5587
Apply suggestions from code review
Cadair bbf07ad
pre-commit
Cadair 2b5e74d
Use svg for the trajectory plot
Cadair 1545779
Significant edits
ayshih f815f4a
Merge pull request #3 from ayshih/artemis2_blog_pr
Cadair 2d1e95a
Update posts/2026/artemis_2_eclipse.md
Cadair 6754395
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| --- | ||
| blogpost: true | ||
| date: Apr 9 2026 | ||
| author: Stuart Mumford, Shane Maloney, Albert Y. Shih, Laura Hayes | ||
| category: Tutorial | ||
| tags: eclipse | ||
| --- | ||
|
|
||
| # Artemis II Solar Eclipse | ||
|
|
||
| The Artemis II mission launched on the 1st April 2026; this launch date allowed the crew to observe a solar eclipse on the 6th April (EDT) / 7th April (UTC) after transiting the far side of the Moon. | ||
|
|
||
| ```{figure} ./artemis2_images/art2_eclipse_ship.jpg | ||
| :width: 100% | ||
| :alt: Artemis 2 Solar Eclipse with Capsule | ||
|
|
||
| Image credit NASA | ||
| ``` | ||
|
|
||
| We on the SunPy blog {ref}`rarely miss the opportunity <2024-04-03-eclipse>` to talk [about a solar eclipse](https://github.com/sunpy/solar-eclipse/). | ||
| So when we saw the stunning photos taken by the astronauts during the Artemis II mission, we wanted to use SunPy to compare them to other photos of the solar corona. | ||
| We highly recommend watching the recording of the eclipse <a href="https://youtu.be/dS9qqzSF3mI?si=NFfli3b7f0tYoVDP&t=1683">on YouTube</a>; the reactions and descriptions of the astronauts are worth it. | ||
|
|
||
| Amongst the many amazing photos downlinked during the mission was this image of the solar eclipse: | ||
|
|
||
| ```{figure} ./artemis2_images/art002e009301~large.jpg | ||
| :width: 100% | ||
| :alt: Artemis 2 Solar Eclipse, showing the moon lit by Earthshine, multiple planets and a star field. | ||
|
|
||
| Image credit NASA | ||
| ``` | ||
|
|
||
| This image is particularly well suited to comparison with other solar observations because the limb of the Moon is clearly visible, and there are stars and planets in the image we can use as references. | ||
| These features allow us to determine where the camera was pointing and its roll angle. | ||
| At the end of the post you will be able to see how we can overlay on this photo images taken by solar observing satellites. | ||
|
|
||
| ## Fitting Coordinate Information | ||
|
|
||
| To be able to compare this image with other observations of the Sun, we need to identify where the camera was pointed and how it was rotated. | ||
| To do this we perform the following steps: | ||
|
|
||
| 1. Extract the time information from the metadata stored in the image. | ||
| 1. Use the time information to lookup the exact position of Artemis II. | ||
| 1. Fit the edge of the moon to identify the center of the Moon, and the size of the Moon in the image. | ||
| 1. Use the three planets visible in the lower right of the image to identify the rotation angle. | ||
| 1. Use the planets to fit the distortion of the lens. | ||
|
|
||
| All the code for this example is in [the sunpy example gallery](inv:sunpy:std:doc#generated/gallery/showcase/artemis-ii-eclipse). | ||
|
|
||
| ### Finding the position of Artemis II | ||
|
|
||
| The first step is to know the time the image is taken; we can extract this from the [EXIF metadata](https://en.wikipedia.org/wiki/Exif). | ||
| Once we have this we query [JPL Horizons](https://ssd.jpl.nasa.gov/horizons/) for the position of Artemis II. | ||
|
|
||
| ```python | ||
| from sunpy.coordinates import get_horizons_coord | ||
|
|
||
| artemis2_naif_id = "-1024" | ||
| artemis2_coord = get_horizons_coord(artemis2_naif_id , "2026-04-07 01:06:19") | ||
| ``` | ||
|
|
||
| We can also use the positions returned by JPL Horizons and the coordinates packages in sunpy and astropy to visualize what part of the Artemis II trajectory was in eclipse. | ||
| To see the details of how this was done see [this example in the SunPy gallery](inv:sunpy:std:doc#generated/gallery/showcase/artemis-ii-trajectory). | ||
|
|
||
| ```{figure} ./artemis2-corot-traj.png | ||
| :width: 100% | ||
| :alt: Artemis 2 trajectory showing when the solar eclipse occurred. | ||
|
|
||
| Visualization of the Artemis II trajectory with the eclipse highlighted. | ||
| ``` | ||
|
|
||
| ### Moon Limb Fitting | ||
|
|
||
| The next step is to find a known location in the image, a reference point. | ||
| The easiest one for us to use is the center of the moon, which we find by doing edge detection and Hough filtering, using [scikit-image](https://scikit-image.org/). | ||
|
|
||
| ```python | ||
| import numpy as np | ||
|
|
||
| from skimage.feature import canny, peak_local_max | ||
| from skimage.transform import hough_circle, hough_circle_peaks | ||
|
|
||
| edges = canny(eclipse_image, sigma=2) | ||
|
|
||
| h, w = eclipse_image.shape | ||
| radii = np.arange(0.25*h, 0.4*h, 10) | ||
|
|
||
| hough_res = hough_circle(edges, radii) | ||
| accums, cx, cy, rad = hough_circle_peaks(hough_res, radii, total_num_peaks=1) | ||
| ``` | ||
|
|
||
| ```{figure} ./artemis2_images/figure_2.svg | ||
| :width: 100% | ||
| :alt: A cropped image of the moon showing edge detection and Hough filtering in three panes. | ||
|
|
||
| A cropped view of the Moon, showing the results of the canny edge detection algorithm and the Hough filter. | ||
| ``` | ||
|
|
||
| ### Calculating Image Scale | ||
|
|
||
| Based on the determined center of the Moon and its radius in the image we can construct a coordinate system for the image. | ||
|
|
||
| ```python | ||
| from astropy.coordinates import SkyCoord | ||
| import astropy.units as u | ||
|
|
||
| moon = SkyCoord(coords["moon"], observer=coords["artemis_ii"]) | ||
| R_moon = 0.2725076 * u.R_earth # IAU mean radius | ||
| dist_moon = SkyCoord(coords["artemis_ii"]).separation_3d(moon) | ||
|
|
||
| moon_angular_width = np.arcsin(R_moon / dist_moon).to(u.arcsec) | ||
| im_radius = rad * u.pix | ||
| plate_scale = moon_angular_width / im_radius | ||
| ``` | ||
|
|
||
| Using this information, we can build a sunpy map (see the [gallery example](inv:sunpy:std:doc#generated/gallery/showcase/artemis-ii-eclipse) for details). | ||
| Plotting this alongside the locations of the planets results in: | ||
|
|
||
| ```{figure} ./artemis2_images/figure_4.svg | ||
| :width: 100% | ||
| :alt: Initial coordinate system fit, showing the lunar center, limb and expected locations of Mercury, Mars and Saturn, which are offset from their positions in the picture. | ||
|
|
||
| Initial coordinate system fit to image, notice that the locations of the highlighted planets are incorrect. | ||
| ``` | ||
|
|
||
| ### Fitting Roll Angle | ||
|
|
||
| It's clear from the previous image that the image is rotated around the center of the Moon. | ||
| We can solve for this rotation by using a peak finding algorithm to locate the planets in the image and comparing these positions to the planets coordinates extracted from JPL Horizons. | ||
| Doing this gives a {math}`-21.2^\circ` roll angle which we can add to our `Map` metadata. | ||
|
|
||
| ```{figure} ./artemis2_images/figure_5.svg | ||
| :width: 100% | ||
| :alt: Image showing the expected positions of the planets and the detected (peaks) positions of the planets. | ||
|
|
||
| Image showing the expected positions of the planets and the detected (peaks) positions of the planets, from which the roll angle is calculated. | ||
| ``` | ||
|
|
||
| ### Fitting Lens Distortion | ||
|
|
||
| The final correction to apply to our fitted coordinate system is the distortion of the camera lens (a Nikkor AF 135mm f/2D DC). | ||
| This makes objects distant from the center of the image appear even more distant than they should. | ||
| We can quantify exactly how much the image has been distorted by comparing the expected versus actual positions of Mars and Mercury (not Saturn as it is too close to the center of the image). | ||
| We add this distortion to our coordinate system and our planets now appear in the correct place. | ||
|
|
||
| ```{figure} ./artemis2_images/figure_7.svg | ||
| :width: 100% | ||
| :alt: Coordinate system fit with additional correction for lens distortion, the expected positions of the planets now match the image. | ||
|
|
||
| Coordinate system fit with additional correction for lens distortion. | ||
| ``` | ||
|
|
||
| ## Overplotting Coronagraph Images | ||
|
|
||
| Now that we have fit a coordinate system to the eclipse photo we can compare this observation of the corona to other data. | ||
| To do this we are going to use the coronagraph on the [Solar and Heliospheric Observatory (SOHO)](https://soho.nascom.nasa.gov/) which is located around the Sun-Earth L1 point. | ||
| We reproject (or re-grid) these images to the fitted coordinate system of the Artemis II image to compensate for differences in satellite location and point of view, and then crop them to the limb of the moon. | ||
|
|
||
| ```{figure} ./artemis2_images/figure_9.svg | ||
| :width: 100% | ||
| :alt: The Artemis II solar eclipse photo with the positions of Mercury, Mars and Saturn highlighted, and coronagraph images from SOHO's LASCO instrument plotted over the disc of the moon. | ||
|
|
||
| The Artemis II solar eclipse photo with the positions of Mercury, Mars and Saturn highlighted, and coronagraph images from SOHO's LASCO instrument plotted over the disc of the Moon. | ||
| ``` | ||
|
|
||
|
Cadair marked this conversation as resolved.
|
||
| Although this image does not reveal any dramatic new coronal structure, it is a striking demonstration of what `sunpy` makes possible. | ||
| By combining image metadata, spacecraft ephemerides, and coordinate-aware reprojection, we can place the astronauts’ eclipse photo and SOHO/LASCO coronagraph data into the same physical frame and compare views of the same corona from two very different vantage points. | ||
|
|
||
| We hope you have found this post interesting. | ||
| The full code for this post can be found in the [](inv:sunpy:std:doc#generated/gallery/showcase/artemis-ii-eclipse) example in the sunpy gallery. | ||
|
alasdairwilson marked this conversation as resolved.
Outdated
|
||
| Remember, that if you are lucky enough to observe the total solar eclipse which will be visible from parts of Europe on 12th August 2026 and you take a photo, you can try this type of analysis with your own photos, by following our {ref}`previous blog post <2024-04-03-eclipse>`! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,6 @@ astropy | |
| exifread | ||
| ipywidgets | ||
| matplotlib | ||
| numpy<2.3.0 | ||
| numpy | ||
| scikit-image | ||
| sunpy[map,net] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.