<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://sunpy.org/</id>
  <title>Blog - Posts by Shane Maloney</title>
  <updated>2026-04-16T16:25:22.290665+00:00</updated>
  <link href="https://sunpy.org/"/>
  <link href="https://sunpy.org/blog/author/shane-maloney/atom.xml" rel="self"/>
  <generator uri="https://ablog.readthedocs.io/" version="0.11.13">ABlog</generator>
  <entry>
    <id>https://sunpy.org/posts/2026/artemis_2_eclipse/</id>
    <title>Artemis II Solar Eclipse</title>
    <updated>2026-04-09T00:00:00+00:00</updated>
    <author>
      <name>Albert Y. Shih</name>
    </author>
    <content type="html">&lt;section id="artemis-ii-solar-eclipse"&gt;

&lt;p&gt;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.&lt;/p&gt;
&lt;figure class="align-default" id="id1"&gt;
&lt;img alt="Artemis 2 Solar Eclipse with Capsule" src="https://sunpy.org/_images/art2_eclipse_ship.jpg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;Image credit NASA&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We on the SunPy blog &lt;a class="reference internal" href="../../../posts/2024/2024-04-03-eclipse/#2024-04-03-eclipse"&gt;&lt;span class="std std-ref"&gt;rarely miss the opportunity&lt;/span&gt;&lt;/a&gt; to talk &lt;a class="reference external" href="https://github.com/sunpy/solar-eclipse/"&gt;about a solar eclipse&lt;/a&gt;.
So when we saw the stunning photos taken by the astronauts on Artemis II, we wanted to use SunPy to compare them to other photos of the solar corona.
I do highly recommend watching the recording of the eclipse &lt;a href="https://youtu.be/dS9qqzSF3mI?si=NFfli3b7f0tYoVDP&amp;t=1683"&gt;on YouTube&lt;/a&gt;; the reactions and descriptions of the astronauts are worth it.&lt;/p&gt;
&lt;p&gt;Amongst the many amazing photos downlinked during the mission was this image of the solar eclipse:&lt;/p&gt;
&lt;figure class="align-default" id="id2"&gt;
&lt;img alt="Artemis 2 Solar Eclipse, showing the moon lit by Earthshine, multiple planets and a star field." src="https://sunpy.org/_images/art002e009301~large.jpg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;Image credit NASA&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This image is particularly good for comparing to other solar data 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 will allow us to determine exactly where and at what angle the camera was pointing.
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.&lt;/p&gt;
&lt;section id="fitting-coordinate-information"&gt;
&lt;h2&gt;Fitting Coordinate Information&lt;/h2&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Extract the time information from the metadata stored in the image.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the time information to lookup the exact position of Artemis II.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fit the edge of the moon to identify the location of the center of the moon, and the size of the moon in the image.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the three planets visible in the lower right of the image to identify the rotation angle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the planets to fit the distortion of the lens.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All the code for this example is in &lt;span class="xref std std-ref"&gt;The sunpy Gallery&lt;/span&gt;.&lt;/p&gt;
&lt;section id="finding-the-position-of-artemis-ii"&gt;
&lt;h3&gt;Finding the position of Artemis II&lt;/h3&gt;
&lt;p&gt;The first step is to know the time the image is taken; we can extract this from the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Exif"&gt;EXIF metadata&lt;/a&gt;.
Once we have this we query &lt;a class="reference external" href="https://ssd.jpl.nasa.gov/horizons/"&gt;JPL Horizons&lt;/a&gt; for the position of Artemis II.&lt;/p&gt;
&lt;div class="highlight-python notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;sunpy.coordinates&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;get_horizons_coord&lt;/span&gt;

&lt;span class="n"&gt;artemis2_naif_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;-1024&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;artemis2_coord&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_horizons_coord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;artemis2_naif_id&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;2026-04-07 01:06:19&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;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 &lt;a class="reference external" href="https://sunpy--8574.org.readthedocs.build/en/8574/generated/gallery/showcase/artemis-ii-trajectory.html"&gt;this example in the SunPy gallery&lt;/a&gt;.&lt;/p&gt;
&lt;figure class="align-default" id="id3"&gt;
&lt;img alt="Artemis 2 trajectory showing when the solar eclipse occurred." src="https://sunpy.org/_images/artemis2-corot-traj.png" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;Visualization of the Artemis II trajectory with the eclipse highlighted.&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="moon-limb-fitting"&gt;
&lt;h3&gt;Moon Limb Fitting&lt;/h3&gt;
&lt;p&gt;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 &lt;a class="reference external" href="https://scikit-image.org/"&gt;scikit-image&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight-python notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;numpy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;np&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;skimage.feature&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;canny&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;peak_local_max&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;skimage.transform&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;hough_circle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hough_circle_peaks&lt;/span&gt;

&lt;span class="n"&gt;edges&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canny&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eclipse_image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sigma&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;eclipse_image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;
&lt;span class="n"&gt;radii&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.4&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;hough_res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hough_circle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;radii&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;accums&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hough_circle_peaks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hough_res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;radii&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total_num_peaks&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;figure class="align-default" id="id4"&gt;
&lt;img alt="A cropped image of the moon showing edge detection and Hough filtering in three panes." src="https://sunpy.org/_images/figure_2.svg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;A cropped view of the Moon, showing the results of the canny edge detection algorithm and the Hough filter.&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="calculating-image-scale"&gt;
&lt;h3&gt;Calculating Image Scale&lt;/h3&gt;
&lt;p&gt;Based on the determined center of the moon is and its radius in the image we can construct a coordinate system for the image.&lt;/p&gt;
&lt;div class="highlight-python notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;astropy.coordinates&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SkyCoord&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;astropy.units&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;u&lt;/span&gt;

&lt;span class="n"&gt;moon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SkyCoord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;moon&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;observer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;artemis_ii&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;R_moon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.2725076&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;  &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;R_earth&lt;/span&gt;  &lt;span class="c1"&gt;# IAU mean radius&lt;/span&gt;
&lt;span class="n"&gt;dist_moon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SkyCoord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;artemis_ii&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;separation_3d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;moon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;moon_angular_width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arcsin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;R_moon&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;dist_moon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arcsec&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;im_radius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rad&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pix&lt;/span&gt;
&lt;span class="n"&gt;plate_scale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;moon_angular_width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;im_radius&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Using this information we can build a sunpy map (see the gallery example for details).
Plotting this alongside the locations of the planets results in:&lt;/p&gt;
&lt;figure class="align-default" id="id5"&gt;
&lt;img 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." src="https://sunpy.org/_images/figure_4.svg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;Initial coordinate system fit to image, notice that the locations of the highlighted planets are incorrect.&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="fitting-roll-angle"&gt;
&lt;h3&gt;Fitting Roll Angle&lt;/h3&gt;
&lt;p&gt;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 results in a &lt;span class="math notranslate nohighlight"&gt;\(-21.2^\circ\)&lt;/span&gt; roll angle which we can add to our Maps metadata.&lt;/p&gt;
&lt;figure class="align-default" id="id6"&gt;
&lt;img alt="Image showing the expected positions of the planets and the detected (peaks) positions of the planets." src="https://sunpy.org/_images/figure_5.svg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;Image showing the expected positions of the planets and the detected (peaks) positions of the planets, from which the roll angle is calculated.&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id="fitting-lens-distortion"&gt;
&lt;h3&gt;Fitting Lens Distortion&lt;/h3&gt;
&lt;p&gt;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 centre of the image appear even more distant than they should.
We can quantify exactly how much the image has been distorted through comparing the expected vs 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.&lt;/p&gt;
&lt;figure class="align-default" id="id7"&gt;
&lt;img alt="Coordinate system fit with additional correction for lens distortion, the expected positions of the planets now match the image." src="https://sunpy.org/_images/figure_7.svg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;Coordinate system fit to with additional correction for lens distortion.&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="overplotting-coronagraph-images"&gt;
&lt;h2&gt;Overplotting Coronagraph Images&lt;/h2&gt;
&lt;p&gt;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 &lt;a class="reference external" href="https://soho.nascom.nasa.gov/"&gt;Solar and Heliospheric Observatory (SOHO)&lt;/a&gt; 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.&lt;/p&gt;
&lt;figure class="align-default" id="id8"&gt;
&lt;img 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." src="https://sunpy.org/_images/figure_9.svg" style="width: 100%;" /&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;span class="caption-text"&gt;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.&lt;/span&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We hope you have found this post interesting.
The full code for this post can be found in &lt;span class="xref std std-ref"&gt;The sunpy Gallery&lt;/span&gt;.
Remember, that if you are lucky enough to observe the total solar eclipse which will be visible from parts of Europe in August 2026 and you take a photo, you can try this type of analysis with your own photos, by following our &lt;a class="reference internal" href="../../../posts/2024/2024-04-03-eclipse/#2024-04-03-eclipse"&gt;&lt;span class="std std-ref"&gt;previous blog post&lt;/span&gt;&lt;/a&gt;!&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2026/artemis_2_eclipse/"/>
    <summary>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.</summary>
    <category term="eclipse" label="eclipse"/>
    <published>2026-04-09T00:00:00+00:00</published>
  </entry>
</feed>
