<?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 in Update</title>
  <updated>2026-04-16T16:25:22.788442+00:00</updated>
  <link href="https://sunpy.org/"/>
  <link href="https://sunpy.org/blog/category/update/atom.xml" rel="self"/>
  <generator uri="https://ablog.readthedocs.io/" version="0.11.13">ABlog</generator>
  <entry>
    <id>https://sunpy.org/posts/2024/2024-06-19-groupaward/</id>
    <title>SunPy Development Team wins a NASA Group Achievement Award!</title>
    <updated>2024-06-19T00:00:00+00:00</updated>
    <author>
      <name>Laura Hayes</name>
    </author>
    <content type="html">&lt;section id="sunpy-development-team-wins-a-nasa-group-achievement-award"&gt;

&lt;p&gt;We are delighted to announce that the SunPy development team has been awarded with a NASA Group Achievement Award!&lt;/p&gt;
&lt;p&gt;The award was given to our team for “developing and continually improving free and reliable open-source software that supports NASA missions and the analysis of NASA’s vast archives of solar physics data”.&lt;/p&gt;
&lt;p&gt;This award is a collective achievement, and we share it with everyone who has contributed to SunPy!
We look forward to continuing our mission of supporting solar physics research and making impactful contributions to the scientific community.&lt;/p&gt;
&lt;p&gt;&lt;img alt="SunPy Award" src="https://sunpy.org/_images/sunpy_award.jpg" /&gt;&lt;/p&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2024/2024-06-19-groupaward/"/>
    <summary>We are delighted to announce that the SunPy development team has been awarded with a NASA Group Achievement Award!</summary>
    <published>2024-06-19T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2024/2024-01-24-pyopensci/</id>
    <title>pyOpenSci and sunpy</title>
    <updated>2024-01-24T00:00:00+00:00</updated>
    <author>
      <name>Nabil Freij</name>
    </author>
    <content type="html">&lt;section id="pyopensci-and-sunpy"&gt;

&lt;p&gt;&lt;img alt="pyOpenSci logo" src="https://avatars.githubusercontent.com/u/28938222?s=200&amp;amp;v=4" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://www.pyopensci.org/"&gt;pyOpenSci&lt;/a&gt; is a “diverse community of people interested in building a community of practice around scientific software written in Python”.
They are an exciting community working on improving the information around the packaging and tooling used by the scientific Python community as well to provide support for package maintainers.
There is a review process to become a pyOpenSci accepted package which comes with two reviews from independent members of the wider community.&lt;/p&gt;
&lt;p&gt;With this in mind, the SunPy Project decided to submit the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; package to pyOpenSci to ensure that it is aligned with the community that pyOpenSci is building, and increase visibility of SunPy.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/pyOpenSci/software-submission/issues/147"&gt;The review&lt;/a&gt; was started on the &lt;a class="reference external" href="https://github.com/pyOpenSci/software-submission"&gt;pyOpenSci software-submission repository&lt;/a&gt;.
The entire review process is open, with one editor and two reviewers and the entire exchange between the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; maintainers and the reviewers are on that issue.
This process was incredibly helpful as it highlighted areas of our documentation which could be improved and some technical choices that were made several years ago but now were redundant or not best practice.&lt;/p&gt;
&lt;p&gt;After these issues were fixed, &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; was accepted into pyOpenSci and we added the badge to the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; readme.
The plan in future is to submit more SunPy Project packages as well as integrate more closely with pyOpenSci to replace our own affiliated package system.
Our hope is that by aligning with pyOpenSci we can help to contribute back to the wider community.&lt;/p&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2024/2024-01-24-pyopensci/"/>
    <summary>pyOpenSci logo</summary>
    <published>2024-01-24T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2022/2022-01-06-aiapy-demo/</id>
    <title>aiapy: A SunPy affiliated package for analyzing data from the Atmospheric Imaging Assembly</title>
    <updated>2022-01-06T00:00:00+00:00</updated>
    <author>
      <name>Mark Cheung"</name>
    </author>
    <content type="html">&lt;div class="admonition note"&gt;
&lt;p&gt;This blog post was written in a &lt;a class="reference external" href="https://github.com/sunpy/sunpy.org/blob/main/posts/2022/2022-01-06-aiapy-demo.ipynb"&gt;Jupyter notebook&lt;/a&gt;.
Click here for an interactive version:
&lt;span class="raw-html"&gt;&lt;a href="https://mybinder.org/v2/gh/sunpy/sunpy.org/main?filepath=posts/2022/2022-01-06-aiapy-demo.ipynb"&gt;&lt;img alt="Binder badge" src="https://mybinder.org/badge.svg" style="vertical-align:text-bottom"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;section id="aiapy:-A-SunPy-affiliated-package-for-analyzing-data-from-the-Atmospheric-Imaging-Assembly"&gt;

&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[1]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 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;aiapy&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&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.time&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;matplotlib&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;mpl&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;matplotlib.pyplot&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;plt&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;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;sunpy&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;sunpy.map&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;aiapy.calibrate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;correct_degradation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;degradation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;estimate_error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;fetch_spikes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;respike&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;update_pointing&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&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;aiapy.calibrate.util&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_correction_table&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;get_error_table&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;get_pointing_table&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;aiapy.psf&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;deconvolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;psf&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;aiapy.response&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;Channel&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;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;astropy.visualization&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;ImageNormalize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;LogStretch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time_support&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.net&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;Fido&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.net&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;attrs&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;a&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.time&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;parse_time&lt;/span&gt;

&lt;span class="c1"&gt;# Increases the figure size in this notebook.&lt;/span&gt;
&lt;span class="n"&gt;mpl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rcParams&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;savefig.dpi&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;
&lt;span class="n"&gt;mpl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rcParams&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;figure.dpi&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The Atmospheric Imaging Assembly (AIA) instrument onboard the NASA Solar Dynamics Observatory (SDO) spacecraft has observed the full- disk of the Sun, nearly continuously, for the last ten years. It is one of three instruments on SDO, along with the Helioseismic and Magnetic Imager (HMI) and the Extreme Ultraviolet Variability Experiment (EVE). AIA is a narrowband imaging instrument comprised of four separate telescopes that collectively observe the full-disk of the Sun at ten different
wavelengths: seven extreme ultraviolet (EUV) wavelengths, two far UV wavelengths, and one visible wavelength.&lt;/p&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; is a SunPy-affiliated Python package for analyzing calibrated (level 1) imaging data from AIA. It includes capabilities for aligning images between channels, deconvolving images with the instrument point-spread function (PSF), computing channel sensitivity as a function of wavelength, and correcting images for telescope degradation, among others. These capabilities are divided between the three subpackages of &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.calibrate&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.psf&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.response&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this blog post, we will demonstrate the functions in each of these subpackages on a set of example level 1 AIA images.&lt;/p&gt;
&lt;p&gt;Before we begin, we make a note of what versions of &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;astropy&lt;/span&gt;&lt;/code&gt;, &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt;, and &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; were used in the writing of this blog post.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[2]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;astropy v&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;astropy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sunpy v&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;sunpy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;aiapy v&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;aiapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
astropy v7.0.1
sunpy v6.1.1
aiapy v0.10.1
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;section id="Obtaining-AIA-Data"&gt;
&lt;h2&gt;Obtaining AIA Data&lt;/h2&gt;
&lt;p&gt;First, we will use the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;Fido&lt;/span&gt;&lt;/code&gt; client to fetch two AIA images from the VSO: one from the 171 Å channel and one from the 211 Å channel.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[3]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;t_start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parse_time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;2017-09-10T20:00:00&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;search_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Fido&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t_start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t_start&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;12&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;s&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Instrument&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;aia&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Wavelength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;171&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;angstrom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Wavelength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;211&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;angstrom&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;search_results&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[3]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area rendered_html docutils container"&gt;
Results from 2 Providers:&lt;/br&gt;&lt;/br&gt;1 Results from the VSOClient:&lt;/br&gt;&lt;div&gt;&lt;i&gt;VSOQueryResponseTable length=1&lt;/i&gt;
&lt;table id="table123890739989328" class="table-striped table-bordered table-condensed"&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Start Time&lt;/th&gt;&lt;th&gt;End Time&lt;/th&gt;&lt;th&gt;Source&lt;/th&gt;&lt;th&gt;Instrument&lt;/th&gt;&lt;th&gt;Wavelength&lt;/th&gt;&lt;th&gt;Provider&lt;/th&gt;&lt;th&gt;Physobs&lt;/th&gt;&lt;th&gt;Wavetype&lt;/th&gt;&lt;th&gt;Extent Width&lt;/th&gt;&lt;th&gt;Extent Length&lt;/th&gt;&lt;th&gt;Extent Type&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Angstrom&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Mibyte&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Time&lt;/th&gt;&lt;th&gt;Time&lt;/th&gt;&lt;th&gt;str3&lt;/th&gt;&lt;th&gt;str3&lt;/th&gt;&lt;th&gt;float64[2]&lt;/th&gt;&lt;th&gt;str4&lt;/th&gt;&lt;th&gt;str9&lt;/th&gt;&lt;th&gt;str6&lt;/th&gt;&lt;th&gt;str4&lt;/th&gt;&lt;th&gt;str4&lt;/th&gt;&lt;th&gt;str8&lt;/th&gt;&lt;th&gt;float64&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr&gt;&lt;td&gt;2017-09-10 20:00:09.000&lt;/td&gt;&lt;td&gt;2017-09-10 20:00:10.000&lt;/td&gt;&lt;td&gt;SDO&lt;/td&gt;&lt;td&gt;AIA&lt;/td&gt;&lt;td&gt;171.0 .. 171.0&lt;/td&gt;&lt;td&gt;JSOC&lt;/td&gt;&lt;td&gt;intensity&lt;/td&gt;&lt;td&gt;NARROW&lt;/td&gt;&lt;td&gt;4096&lt;/td&gt;&lt;td&gt;4096&lt;/td&gt;&lt;td&gt;FULLDISK&lt;/td&gt;&lt;td&gt;64.64844&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;&lt;/br&gt;1 Results from the VSOClient:&lt;/br&gt;&lt;div&gt;&lt;i&gt;VSOQueryResponseTable length=1&lt;/i&gt;
&lt;table id="table123890739990096" class="table-striped table-bordered table-condensed"&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Start Time&lt;/th&gt;&lt;th&gt;End Time&lt;/th&gt;&lt;th&gt;Source&lt;/th&gt;&lt;th&gt;Instrument&lt;/th&gt;&lt;th&gt;Wavelength&lt;/th&gt;&lt;th&gt;Provider&lt;/th&gt;&lt;th&gt;Physobs&lt;/th&gt;&lt;th&gt;Wavetype&lt;/th&gt;&lt;th&gt;Extent Width&lt;/th&gt;&lt;th&gt;Extent Length&lt;/th&gt;&lt;th&gt;Extent Type&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Angstrom&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Mibyte&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Time&lt;/th&gt;&lt;th&gt;Time&lt;/th&gt;&lt;th&gt;str3&lt;/th&gt;&lt;th&gt;str3&lt;/th&gt;&lt;th&gt;float64[2]&lt;/th&gt;&lt;th&gt;str4&lt;/th&gt;&lt;th&gt;str9&lt;/th&gt;&lt;th&gt;str6&lt;/th&gt;&lt;th&gt;str4&lt;/th&gt;&lt;th&gt;str4&lt;/th&gt;&lt;th&gt;str8&lt;/th&gt;&lt;th&gt;float64&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr&gt;&lt;td&gt;2017-09-10 20:00:12.000&lt;/td&gt;&lt;td&gt;2017-09-10 20:00:13.000&lt;/td&gt;&lt;td&gt;SDO&lt;/td&gt;&lt;td&gt;AIA&lt;/td&gt;&lt;td&gt;211.0 .. 211.0&lt;/td&gt;&lt;td&gt;JSOC&lt;/td&gt;&lt;td&gt;intensity&lt;/td&gt;&lt;td&gt;NARROW&lt;/td&gt;&lt;td&gt;4096&lt;/td&gt;&lt;td&gt;4096&lt;/td&gt;&lt;td&gt;FULLDISK&lt;/td&gt;&lt;td&gt;64.64844&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;&lt;/br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[4]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Fido&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;search_results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;script type="application/vnd.jupyter.widget-view+json"&gt;{"model_id": "d8b6c39ce7f4421d96dec6d99c42e848", "version_major": 2, "version_minor": 0}&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then create &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy.map.Map&lt;/span&gt;&lt;/code&gt; objects from the downloaded files.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[5]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_211&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sunpy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[6]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;peek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vmin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;peek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vmin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_12_0.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_12_0.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_12_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_12_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that both the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; and &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; documentation pages include more detailed examples of how to obtain AIA data from the JSOC as well&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://docs.sunpy.org/en/stable/tutorial/acquiring_data/jsoc.html"&gt;sunpy: Querying and Downloading Data from JSOC&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://docs.sunpy.org/en/stable/generated/gallery/acquiring_data/downloading_cutouts.html"&gt;sunpy: Requesting cutouts of AIA images from the JSOC&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/generated/gallery/skip_download_specific_data.html"&gt;aiapy: Requesting specific AIA images from the JSOC&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More complex queries (e.g. searching by exposure time or quality keyword) can be constructed by searching the JSOC directly via the &lt;a class="reference external" href="https://docs.sunpy.org/projects/drms/en/stable/"&gt;drms&lt;/a&gt; package. See the last example listed above for an example of this.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="PSF-Deconvolution"&gt;
&lt;h2&gt;PSF Deconvolution&lt;/h2&gt;
&lt;p&gt;AIA images are subject to convolution with the instrument PSF due to effects introduced by the filter mesh of the telescope and the CCD, among others. This has the effect of “blurring” the image. The PSF diffraction pattern may also be particularly noticeable during the impulsive phase of a flare where the intensity enhancement is very localized. To remove these artifacts, the PSF must be deconvolved from the level 1 image. This is because the PSF itself is defined on the pixel grid of the CCD.&lt;/p&gt;
&lt;p&gt;We’ll calculate the PSF for the 171 Å channel using the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;psf&lt;/span&gt;&lt;/code&gt; function in the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.psf&lt;/span&gt;&lt;/code&gt; subpackage. The PSF model accounts for several different effects, including diffraction from the mesh grating of the filters, charge spreading, and jitter. This implementation of the PSF calculation follows &lt;a class="reference external" href="https://hesperia.gsfc.nasa.gov/ssw/sdo/aia/idl/psf/DOC/psfreport.pdf"&gt;Grigis et al (2012)&lt;/a&gt;. Further details on how the PSF is calculated can be found in that document. Currently, this only works
for &lt;span class="math notranslate nohighlight"&gt;\(4096\times4096\)&lt;/span&gt; full frame images.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The following cell will be &lt;em&gt;significantly&lt;/em&gt; slower (many minutes) if you do not have a NVIDIA GPU and the &lt;a class="reference external" href="https://docs.cupy.dev/en/stable/"&gt;cupy&lt;/a&gt; package installed. The GPU-enabled calculation has been benchmarked at ~5 s on an NVIDIA RTX 4090. Use of the GPU can be explicitly disabled by setting &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;use_gpu=False&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[7]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;psf_171&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;psf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then visualize the PSF. The diffraction “arms” extending from the center pixel can often be seen in flare observations due to the intense, small-scale brightening.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[8]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;imshow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;psf_171&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;origin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;lower&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;norm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ImageNormalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vmax&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1e-6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;LogStretch&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;colorbar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[8]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
&amp;lt;matplotlib.colorbar.Colorbar at 0x70adf80b3ed0&amp;gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_19_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_19_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then use the calculated PSF to deconvolve our 171 Å image using the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;deconvolve&lt;/span&gt;&lt;/code&gt; function in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.psf&lt;/span&gt;&lt;/code&gt;. This deconvolution algorithm is an implementation of the well-known &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Richardson%E2%80%93Lucy_deconvolution"&gt;Richardson-Lucy algorithm&lt;/a&gt;. If the PSF is not explicitly passed in, the PSF for that wavelength will be computed automatically. When deconvolving many images, it is highly recommend to precompute the PSF function for each desired wavelength.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The deconvolution of the image can also be optionally accelerated with a NVIDIA GPU and &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;cupy&lt;/span&gt;&lt;/code&gt;. On a Titan RTX, deconvolution of a full &lt;span class="math notranslate nohighlight"&gt;\(4096\times4096\)&lt;/span&gt; image has been benchmarked at &lt;span class="math notranslate nohighlight"&gt;\(\le1\)&lt;/span&gt; s. On a CPU, the equivalent operation should take ~25 s.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[9]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_deconvolved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;deconvolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;psf&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;psf_171&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area stderr docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
2025-03-03 14:31:50 - sunpy - INFO: Using a GPU via cupy
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
INFO: Using a GPU via cupy [aiapy.psf.deconvolve]
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can now zoom in on some loop structures that extend off the limb to examine the differences between our image before and after deconvolution.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[10]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;blc&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="mi"&gt;750&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;375&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;arcsec&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coordinate_frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;fov&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&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;arcsec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;height&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&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;arcsec&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;m_171_cutout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;submap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;fov&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m_171_deconvolved&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;submap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;fov&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[11]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;figure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;figsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171_cutout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Before Deconvolution&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;122&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;After Deconvolution&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_axislabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_24_0.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_24_0.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that comparing the images on the left and right, deconvolving with the PSF removes the appearance of the diffraction pattern near the bright looptop. This also brings out more detail in the strands of the post-flare arcade.&lt;/p&gt;
&lt;p&gt;We can see this more clearly by plotting the intensity of the original and deconvolved images across the top of the looptop.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[12]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;x&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;linspace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.55&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.59&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&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;ones&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;sl&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;s_&lt;/span&gt;&lt;span class="p"&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;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&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;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&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;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&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;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[13]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;figure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;figsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lw&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;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;122&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;Tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sunpy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;all_coordinates_from_map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_cutout&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="n"&gt;sl&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Tx&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Tx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;sl&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Original&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Tx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_deconvolved_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;sl&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Deconvolved&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Intensity [&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m_171_cutout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_xlabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Helioprojective Longitude [arcsec]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;upper center&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ncol&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;frameon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bbox_to_anchor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.15&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tight_layout&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_27_0.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_27_0.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="Respiking-Level-1-Images"&gt;
&lt;h2&gt;Respiking Level 1 Images&lt;/h2&gt;
&lt;p&gt;The &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.calibrate&lt;/span&gt;&lt;/code&gt; module contains a number of useful functions, including the ability to “respike” images through the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;respike&lt;/span&gt;&lt;/code&gt; function. AIA level 1 images have been corrected for hot-pixels (commonly referred to as “spikes”) using an automated correction algorithm which detects them, removes them, and replaces the “holes” left in the image via interpolation. However, for certain research topics, this automated hot-pixel removal process may result in unwanted removal of bright points
which may be physically meaningful. The &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;respike&lt;/span&gt;&lt;/code&gt; function allows you to revert this removal by putting back all the removed pixel values. This corresponds to the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aia_respike.pro&lt;/span&gt;&lt;/code&gt; IDL procedure as described in the &lt;a class="reference external" href="https://www.lmsal.com/sdodocs/doc/dcur/SDOD0060.zip/zip/entry/index.html"&gt;SDO Analysis Guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We will create a “respiked” version of our level 1 171 Å image. This function will query the JSOC for the relevant “spikes” file which contains the locations (in pixel coordinates) and associate intensities for each of the hot pixels. The hot pixel values are then replaced in the image at the appropriate locations.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[14]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_respiked&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;respike&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[15]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;figure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;figsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Despiked (Level &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;processing_level&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;.0f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;122&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171_respiked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171_respiked&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Respiked (Level &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m_171_respiked&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;processing_level&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_axislabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_32_0.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_32_0.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Looking at the two images, it is not obvious by visual inspection what the differences are between the despiked and respiked maps. We can use the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;fetch_spikes&lt;/span&gt;&lt;/code&gt; functions (which is called automatically by &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;respike&lt;/span&gt;&lt;/code&gt;) to find the intensity values and the associated pixel coordinates&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[16]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;pix_coords&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fetch_spikes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then use the pixel coordinates to find the “despiked” intensity values and plot the distributions of the “despiked” and “respiked” values.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[17]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;vals_despiked&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;pix_coords&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;pix_coords&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[18]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vals&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bins&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;scott&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;histtype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;step&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Respiked&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vals_despiked&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bins&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;scott&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;histtype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;step&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Despiked&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xlabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Intensity [&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Number of Pixels&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[18]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
Text(0, 0.5, &amp;#39;Number of Pixels&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_37_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_37_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Additionally, we can plot the coordinates of each of our hot pixels on our “respiked” map. We can convert the above pixel coordinates to world coordinates using the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;.pixel_to_world()&lt;/span&gt;&lt;/code&gt; method on our level 1 map. Note that we can also return the world coordinates from the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;fetch_spikes&lt;/span&gt;&lt;/code&gt; function automatically by passing in the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;as_coords=True&lt;/span&gt;&lt;/code&gt; keyword argument.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[19]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;spike_coords&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pixel_to_world&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pix_coords&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pix_coords&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[20]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;figure&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;111&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_171_respiked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_171_respiked&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot_coord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;spike_coords&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;.&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;markersize&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;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[20]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
[&amp;lt;matplotlib.lines.Line2D at 0x70ad8c28a0d0&amp;gt;]
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_40_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_40_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For a more detailed example of respiking level 1 images, see &lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/generated/gallery/replace_hot_pixels.html"&gt;the respiking example in the aiapy example gallery&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="Transforming-Level-1-Images-to-Level-1.5"&gt;
&lt;h2&gt;Transforming Level 1 Images to Level 1.5&lt;/h2&gt;
&lt;p&gt;One of the most common operations performed on level 1 AIA images is “aiaprep,” commonly performed with the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aia_prep.pro&lt;/span&gt;&lt;/code&gt; procedure in IDL. This prep process, which promotes level 1 images to level 1.5, is a combination of two steps:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;update pointing and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;image registration.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first step is accomplished through the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;update_pointing&lt;/span&gt;&lt;/code&gt; function in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.calibrate&lt;/span&gt;&lt;/code&gt;. This function queries the 3-hourly master pointing table stored at the JSOC to update relevant FITS keywords.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[21]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_pointing_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;JSOC&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time_range&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&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;day&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;day&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;m_171_up&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;update_pointing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pointing_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can verify this step by examining the reference pixel before and after the pointing update.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[22]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reference_pixel&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[22]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
PixelPair(x=&amp;lt;Quantity 2052.300049 pix&amp;gt;, y=&amp;lt;Quantity 2048.280029 pix&amp;gt;)
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[23]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_up&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reference_pixel&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[23]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
PixelPair(x=&amp;lt;Quantity 2052.33252 pix&amp;gt;, y=&amp;lt;Quantity 2048.275391 pix&amp;gt;)
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The second step is accomplished through &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;register&lt;/span&gt;&lt;/code&gt; function in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.calibrate&lt;/span&gt;&lt;/code&gt;. This function performs an affine transform on the level 1 pixel grid to remove the roll angle, scale the image to resolution of 0.6 arcseconds-per-pixel, and shift the center of the image to the center of the Sun. The original intensity values are then reinterpolated onto this transformed grid.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[24]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_l15&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_up&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can verify that the image has been transformed appropriately by comparing at the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;scale&lt;/span&gt;&lt;/code&gt; and &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;rotation_matrix&lt;/span&gt;&lt;/code&gt; attributes before and after registration. Note that the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;rotation_matrix&lt;/span&gt;&lt;/code&gt; is now diagonalized, meaning that the world and pixel grids are aligned.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[25]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_up&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_up&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rotation_matrix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
SpatialPair(axis1=&amp;lt;Quantity 0.599489 arcsec / pix&amp;gt;, axis2=&amp;lt;Quantity 0.599489 arcsec / pix&amp;gt;)
[[ 9.99999944e-01 -3.35522089e-04]
 [ 3.35522089e-04  9.99999944e-01]]
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[26]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rotation_matrix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
SpatialPair(axis1=&amp;lt;Quantity 0.6 arcsec / pix&amp;gt;, axis2=&amp;lt;Quantity 0.6 arcsec / pix&amp;gt;)
[[ 1.00000000e+00 -5.90601768e-20]
 [-2.18097419e-20  1.00000000e+00]]
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that we can also combine these two operations into a “prep” function to imitate &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiaprep.pro&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[27]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;prep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;smap&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;table&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_pointing_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;JSOC&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time_range&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;smap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&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;day&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;smap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;day&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;update_pointing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;smap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pointing_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[28]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_211_l15&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Applying this “prep” procedure means that our 171 Å and 211 Å images are now interpolated to the same pixel grid.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[29]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rotation_matrix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
SpatialPair(axis1=&amp;lt;Quantity 0.6 arcsec / pix&amp;gt;, axis2=&amp;lt;Quantity 0.6 arcsec / pix&amp;gt;)
[[1.00000000e+00 5.18338069e-20]
 [5.18338069e-20 1.00000000e+00]]
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Before performing any operations between two maps from different channels, one should always register each image such that the pixel grids of each image are aligned. For more information on transforming level 1 images to level 1.5, see the following example in the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; example gallery:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/generated/gallery/prepping_level_1_data.html"&gt;Registering and aligning level 1 data&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="Degradation-Correction"&gt;
&lt;h2&gt;Degradation Correction&lt;/h2&gt;
&lt;p&gt;The performance of the AIA telescope is unfortunately degrading over time, leading to the resulting images becoming increasingly dim. We can correct for this by modeling the degradation over time using the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;degradation&lt;/span&gt;&lt;/code&gt; function. This function calculates the degradation factor &lt;span class="math notranslate nohighlight"&gt;\(d(t)\)&lt;/span&gt; as,&lt;/p&gt;
&lt;div class="math notranslate nohighlight"&gt;
\[d(t) = \frac{A_{eff}(t_{e})}{A_{eff}(t_0)}(1 + p_1\delta t + p_2\delta t^2 + p_3\delta t^3),\]&lt;/div&gt;
&lt;p&gt;where the leading coefficient is the ratio between the effective area at some epoch time &lt;span class="math notranslate nohighlight"&gt;\(t_e\)&lt;/span&gt; and the initial time &lt;span class="math notranslate nohighlight"&gt;\(t_0\)&lt;/span&gt;. The term in the parentheses represents an interpolation from &lt;span class="math notranslate nohighlight"&gt;\(t_e\)&lt;/span&gt; to the selected time &lt;span class="math notranslate nohighlight"&gt;\(t\)&lt;/span&gt;, where &lt;span class="math notranslate nohighlight"&gt;\(\delta t=t-t_e\)&lt;/span&gt;. &lt;span class="math notranslate nohighlight"&gt;\(p_1,p_2,p_3\)&lt;/span&gt; as well as &lt;span class="math notranslate nohighlight"&gt;\(A_{eff}(t_e)\)&lt;/span&gt; and &lt;span class="math notranslate nohighlight"&gt;\(A_{eff}(t_0)\)&lt;/span&gt; are retrieved from the JSOC (by default) or a user-supplied table.&lt;/p&gt;
&lt;p&gt;We can use this function to calculate the degradation of the 211 Å channel from the start of the SDO mission to now.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[30]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;t_begin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parse_time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;2010-03-25T00:00:00&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;astropy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;time_window&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;t_begin&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="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t_begin&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;day&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&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;day&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;First, we’ll query the degradation calibration table from the JSOC. Doing this ahead of time avoids repeated network calls when we want to repeatedly calculate the degradation.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[31]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_correction_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;JSOC&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then calculate the 211 Å degradation using the above correction table.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[32]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;d_211&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;degradation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time_window&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that we can also use the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;.date&lt;/span&gt;&lt;/code&gt; attribute on our 211 Å map to compute the degradation at the time of that map&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[33]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;d_211_map&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;degradation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The degradation calibration is routinely updated (e.g. using data from sounding rocket flights), with new versions added to the table returned from the JSOC. We can look at older versions of the calibration to see how the predicted degradation has changed using the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;calibration_version&lt;/span&gt;&lt;/code&gt; keyword argument. Note that the default version in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt; &lt;span class="pre"&gt;v0.10.0&lt;/span&gt;&lt;/code&gt; is 10.&lt;/p&gt;
&lt;p&gt;And compare the two degradation curves as a function of time over the lifetime of the mission.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[34]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;time_support&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;jyear&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time_window&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_211&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;v10&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_211_map&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;linestyle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;o&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;C0&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;iso&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Degradation 211 Å&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[34]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
&amp;lt;matplotlib.legend.Legend at 0x70ad7e10a210&amp;gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_70_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_70_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Additionally, &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.calibrate&lt;/span&gt;&lt;/code&gt; also includes the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;correct_degradation&lt;/span&gt;&lt;/code&gt; function which accepts a &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy.map.Map&lt;/span&gt;&lt;/code&gt;, calculates the degradation factor, divides the image data by this degradation factor, and returns a new corrected map.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[35]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_211_corrected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;correct_degradation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[36]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;figure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;figsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vmin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vmax&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;2.5e3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Uncorrected&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_subplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;122&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;projection&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_211_corrected&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;m_211_corrected&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vmin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vmax&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;2.5e3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Corrected&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_axislabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_73_0.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_73_0.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="Computing-Uncertainties"&gt;
&lt;h2&gt;Computing Uncertainties&lt;/h2&gt;
&lt;p&gt;One of the newest additions to &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; is the function for computing uncertainties on AIA intensities. This is done through the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;estimate_error&lt;/span&gt;&lt;/code&gt; function in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.calibrate&lt;/span&gt;&lt;/code&gt;. &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;estimate_error&lt;/span&gt;&lt;/code&gt; is an exact port of the SSWIDL function &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aia_bp_estimate_error.pro&lt;/span&gt;&lt;/code&gt;. This calculation includes errors from the shot noise, read noise, quantization, and onboard compression. The calculation can also optionally include contributions from the photometric calibration and errors in the atomic data.&lt;/p&gt;
&lt;p&gt;We can pass in the (unitful) data array attached to our 171 Å map and compute the intensities.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[37]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;error_table&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_error_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;SSW&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;errors_171&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;estimate_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;quantity&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="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;error_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area stderr docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
/home/nabil/.micromamba/envs/solar/lib/python3.13/site-packages/astropy/units/quantity.py:658: RuntimeWarning: invalid value encountered in sqrt
  result = super().__array_ufunc__(function, method, *arrays, **kwargs)
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To easily visualize the spatial distribution of these uncertainties, we can create a new &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy.map.Map&lt;/span&gt;&lt;/code&gt; object from these errors.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[38]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_errors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sunpy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errors_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[39]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_errors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;peek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;norm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ImageNormalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vmax&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_80_0.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_80_0.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can also use the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;include_chianti&lt;/span&gt;&lt;/code&gt; flag to understand how the presence of atomic data errors from CHIANTI affect the uncertainty.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[40]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;errors_171_chianti&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;estimate_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;quantity&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="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include_chianti&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;error_table&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area stderr docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
/home/nabil/.micromamba/envs/solar/lib/python3.13/site-packages/astropy/units/quantity.py:658: RuntimeWarning: invalid value encountered in sqrt
  result = super().__array_ufunc__(function, method, *arrays, **kwargs)
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Similarly, we can look at how the photometric calibration, using the calibration from EVE, affects the uncertainties.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[41]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;errors_171_eve&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;estimate_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;quantity&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="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include_eve&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;error_table&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then look at the distribution of these uncertainties with these different combinations of keyword arguments to understand how these different options affect the resulting distribution of errors. Note that the inclusion of the atomic data results in the largest errors because there is an additional 25% (for 171 Å) uncertainty assumed on the input intensities.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[42]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;hist_params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;bins&amp;quot;&lt;/span&gt;&lt;span class="p"&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;logspace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;histtype&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;step&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;log&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errors_171&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;hist_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Nominal&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errors_171_chianti&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;hist_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;CHIANTI&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errors_171_eve&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;hist_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Photometric (EVE)&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xlabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Uncertainty [ct/pix]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Number of Pixels&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xscale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;log&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frameon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[42]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
&amp;lt;matplotlib.legend.Legend at 0x70ad8dd0f9d0&amp;gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_86_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_86_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="Exposure-Time-Normalization"&gt;
&lt;h2&gt;Exposure Time Normalization&lt;/h2&gt;
&lt;p&gt;For normalizing images by the exposure time:&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[43]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;m_171_norm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m_171_l15&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;m_171_l15&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exposure_time&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This option still properly accounts for the change in units but does &lt;strong&gt;not&lt;/strong&gt; reset the exposure time.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[44]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_norm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
DN / s
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[45]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_171_norm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exposure_time&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
2.000169 s
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="Wavelength-Response-Functions"&gt;
&lt;h2&gt;Wavelength Response Functions&lt;/h2&gt;
&lt;p&gt;Lastly, the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy.response&lt;/span&gt;&lt;/code&gt; subpackage includes the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;Channel&lt;/span&gt;&lt;/code&gt; object for computing the wavelength response function of each channel as well as providing various pieces of metadata for each channel.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[46]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Channel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[47]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;telescope_number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
211.0 Angstrom
2
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The wavelength response is a combination of the (wavelength-dependent) effective area and the gain of the telescope such that &lt;span class="math notranslate nohighlight"&gt;\(R(\lambda,t) = A_{eff}(\lambda)G(\lambda)\)&lt;/span&gt;. According to Section 2 of &lt;a class="reference external" href="https://ui.adsabs.harvard.edu/abs/2012SoPh..275...41B/abstract"&gt;Boerner et al. (2012)&lt;/a&gt;, the effective area is given by,&lt;/p&gt;
&lt;div class="math notranslate nohighlight"&gt;
\[A_{eff}(\lambda) = A_{geo}R_P(\lambda)R_S(\lambda)T_E(\lambda)T_F(\lambda)D(\lambda)Q(\lambda),\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="math notranslate nohighlight"&gt;\(A_{geo}\)&lt;/span&gt; is the geometrical collecting area, &lt;span class="math notranslate nohighlight"&gt;\(R_{P,S}\)&lt;/span&gt; are the reflectances of the primary and secondary mirrors, respectively, &lt;span class="math notranslate nohighlight"&gt;\(T_{E,F}\)&lt;/span&gt; are the transmission efficiency of the entrance and focal-plane filters, respectively, &lt;span class="math notranslate nohighlight"&gt;\(D\)&lt;/span&gt; is the contaminant transmittance of the optics and &lt;span class="math notranslate nohighlight"&gt;\(Q\)&lt;/span&gt; is the quantum efficiency of the CCD.&lt;/p&gt;
&lt;p&gt;We can compute the wavelength response for the 211 Å channel using the following method.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[48]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_correction_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;JSOC&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each of the individual components of the effective area are also available as properties on the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;Channel&lt;/span&gt;&lt;/code&gt; object.&lt;/p&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[49]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;geometrical_collecting_area&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;primary_reflectance&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;focal_plane_filter_efficiency&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contamination&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;quantum_efficiency&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
83.0 cm2
[1.0735452e-05 1.0784249e-05 1.0833047e-05 ... 2.8031474e-01 2.8032130e-01
 2.8032786e-01]
[5.95474e-01 5.93567e-01 5.91666e-01 ... 3.08021e-05 3.06914e-05
 3.05812e-05]
[0.96578515 0.96544755 0.9651096  ... 0.4387496  0.4387496  0.4387496 ]
[0.8513821  0.8509894  0.8506473  ... 0.09263941 0.09265867 0.09267791]
[7.42477    7.39518913 7.36584303 ... 0.20628946 0.20626652 0.20624361] DN / ph
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;.wavelength_response&lt;/span&gt;&lt;/code&gt; method also includes several keyword arguments for including the effects of degradation and EVE cross-calibration in the computation of the wavelength response function.&lt;/p&gt;
&lt;div class="nbinput nblast docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[ ]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;r_time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obstime&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;r_time_eve&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obstime&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;m_211&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include_eve_correction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correction_table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nbinput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[61]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_area highlight-ipython3 notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Uncorrected&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r_time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Degradation&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wavelength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r_time_eve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Degradation + EVE&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xlim&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;180&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;240&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylim&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.75&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xlabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$\lambda$ [Å]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;rf&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$R(\lambda)$ [&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;latex_inline&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&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;frameon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput docutils container"&gt;
&lt;div class="prompt highlight-none notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[61]:
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;
&amp;lt;matplotlib.legend.Legend at 0x70ad6e166c10&amp;gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="nboutput nblast docutils container"&gt;
&lt;div class="prompt empty docutils container"&gt;
&lt;/div&gt;
&lt;div class="output_area docutils container"&gt;
&lt;img alt="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_102_1.png" src="https://sunpy.org/_images/posts_2022_2022-01-06-aiapy-demo_102_1.png" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that these wavelength responses, when combined with atomic data (e.g. from CHIANTI), can be used to compute the temperature response functions of each AIA channel using Section 2.5 of Boerner et al. (2012). More information about this subpackage can be found in the &lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/generated/gallery/calculate_response_function.html#sphx-glr-generated-gallery-calculate-response-function-py"&gt;Computing wavelength response functions&lt;/a&gt; example in the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; example
gallery.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="Resources"&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;p&gt;In addition to this blog post, there are also a number of resources for learning more about &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://gitlab.com/LMSAL_HUB/aia_hub/aiapy"&gt;Source code on GitLab&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/"&gt;Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/generated/gallery/index.html"&gt;Example Gallery&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://joss.theoj.org/papers/10.21105/joss.02801"&gt;Paper in the Journal of Open Source Software (JOSS)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;aiapy&lt;/span&gt;&lt;/code&gt; is under active development and, just as with the core &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; package and all other affilitated packages, contributions from the community are always welcome. To report a bug, request a feature, or simply ask a question, feel free to open an issue on &lt;a class="reference external" href="https://gitlab.com/LMSAL_HUB/aia_hub/aiapy/-/issues"&gt;GitLab&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2022/2022-01-06-aiapy-demo/"/>
    <summary>aiapy is a SunPy affiliated package for analyzing EUV image data from the Atmospheric Imaging Assembly (AIA). It includes a number of of functions for calibrating images, correcting metadata, and analyzing the filter bandpasses. In this post, we show some examples of the different capabilities of version 0.6.3 of the aiapy package.</summary>
    <category term="affiliated-package" label="affiliated-package"/>
    <category term="instrument" label="instrument"/>
    <published>2022-01-06T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2021/2021-10-08_nasa_osftl_grant/</id>
    <title>SunPy Awarded NASA Grant</title>
    <updated>2021-11-03T00:00:00+00:00</updated>
    <author>
      <name>Stuart Mumford</name>
    </author>
    <content type="html">&lt;section id="sunpy-awarded-nasa-grant"&gt;

&lt;p&gt;&lt;strong&gt;As part of the NASA “Open Source Tools, Frameworks, and Libraries” program, the SunPy proposal “Strengthening the Foundations of the SunPy Ecosystem” has been funded for the next three years.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This proposal was submitted in January 2021, and sought funding for both the core &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/reference/sunpy.html#module-sunpy" title="(in sunpy v4.13.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; package and wider goals of the project.
After &lt;a class="reference external" href="https://github.com/sunpy/sunpy-project/issues/9"&gt;early community input was collected&lt;/a&gt;, Albert Shih led the proposal itself, with NASA GSFC as the primary institution.
&lt;a class="reference external" href="https://docs.google.com/document/d/1_gf1HM7iIUVqgHAdDUFQfCUHzHkrEFUTJZP8O3PEoqw"&gt;The proposed effort&lt;/a&gt; focuses on three main areas:&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Improving the technical infrastructure.&lt;/p&gt;
&lt;p&gt;This focuses on the tools that the wider project needs to scale up as we adopt more coordinated and affiliated packages.
To support multiple active projects with a common development workflow, more tooling and infrastructure is needed, both for maintainers of existing packages and developers new to writing affiliated packages.
As part of this work templates for setting up new packages will be improved, documentation will be written, and new automation and monitoring bots will be developed to ease the burden on the SunPy maintainers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Augmenting science-enabling functionality.&lt;/p&gt;
&lt;p&gt;This section aims to improve the tools provided by the core package to better support future challenges in solar physics data.
The two main components of this are supporting multi-point observations with improvements to the &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/reference/coordinates/index.html#module-sunpy.coordinates" title="(in sunpy v4.13.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy.coordinates&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; package, and improving the support for very large datasets in &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/reference/sunpy.html#module-sunpy" title="(in sunpy v4.13.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; and sponsored packages by leveraging the scaling and parallelism tools available from &lt;a class="reference external" href="https://dask.org"&gt;Dask&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Providing training and outreach&lt;/p&gt;
&lt;p&gt;This section will improve example galleries across both &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/reference/sunpy.html#module-sunpy" title="(in sunpy v4.13.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; core and affiliated packages, develop training materials for solar physics graduate students, and perform outreach activities with instrument teams and package developers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;section id="what-will-the-money-pay-for"&gt;
&lt;h2&gt;What will the money pay for?&lt;/h2&gt;
&lt;p&gt;The money awarded to this proposal will pay for:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Albert Shih will manage the project and augment parts of &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/reference/coordinates/index.html#module-sunpy.coordinates" title="(in sunpy v4.13.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy.coordinates&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stuart Mumford will work on infrastructure for all sponsored and affiliated packages as discussed in &lt;a class="reference external" href="https://github.com/sunpy/sunpy-project/issues/2"&gt;sunpy/sunpy-project#2&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Will Barnes will work on the training/outreach and large-dataset-support components of the project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="finally"&gt;
&lt;h2&gt;Finally&lt;/h2&gt;
&lt;p&gt;This is a major milestone for SunPy - it is the first significant amount of funding dedicated to directly working on the long term sustainability of the project.
This funding will help to significantly grow SunPy, both the core package and the ecosystem of associated packages.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2021/2021-10-08_nasa_osftl_grant/"/>
    <summary>As part of the NASA “Open Source Tools, Frameworks, and Libraries” program, the SunPy proposal “Strengthening the Foundations of the SunPy Ecosystem” has been funded for the next three years.</summary>
    <category term="sunpy" label="sunpy"/>
    <published>2021-11-03T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2021/2021-10-29_sunpy_31_ndcube_20/</id>
    <title>October Release Announcements</title>
    <updated>2021-10-29T00:00:00+00:00</updated>
    <author>
      <name>Stuart Mumford</name>
    </author>
    <content type="html">&lt;section id="october-release-announcements"&gt;

&lt;p&gt;Today we have a quadruple release announcement for you!
It’s been a very busy week in SunPy land getting both the core and ndcube releases over the line; I hope you enjoy them!&lt;/p&gt;
&lt;section id="sunpy-3-1"&gt;
&lt;h2&gt;sunpy 3.1&lt;/h2&gt;
&lt;p&gt;The next scheduled release of the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sunpy&lt;/span&gt;&lt;/code&gt; core package actually comes &lt;em&gt;a week&lt;/em&gt; early according to our &lt;a class="reference external" href="https://github.com/sunpy/sunpy/wiki/Release-Calendar"&gt;release calendar&lt;/a&gt;, but we couldn’t resist bringing you this end of month release party.&lt;/p&gt;
&lt;p&gt;The 3.1 release contains many new features and improvements, having merged 145 pull requests from 16 people including 8 new contributors.&lt;/p&gt;
&lt;p&gt;Some of the highlights from the &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/whatsnew/3.1.html#whatsnew-3-1" title="(in sunpy v4.13.0)"&gt;&lt;span&gt;What’s New in SunPy 3.1?&lt;/span&gt;&lt;/a&gt; page are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Increased in-situ data support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A new limb drawing function&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A new WISPR map source&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Propagating solar-surface coordinates in time&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Convenient reprojection of maps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSOC keyword filtering with Fido&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Arithmetic operations with maps&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My personal favourites being the new &lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;limb&lt;/span&gt; &lt;span class="pre"&gt;drawing&lt;/span&gt; &lt;span class="pre"&gt;function&lt;/span&gt;&lt;/code&gt;
and the &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/generated/api/sunpy.map.GenericMap.html#sunpy.map.GenericMap.reproject_to" title="(in sunpy v4.13.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;reproject_to&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; method on all maps.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="ndcube-2-0"&gt;
&lt;h2&gt;ndcube 2.0&lt;/h2&gt;
&lt;p&gt;Even more excitingly, for me personally, is the long awaited 2.0 release of ndcube.&lt;/p&gt;
&lt;p&gt;ndcube is the sunpy sponsored package for working with multi-dimensional data with an associated WCS object.
For an introduction to ndcube and motivation for the 2.0 rework see &lt;a class="reference external" href="https://docs.sunpy.org/projects/ndcube/en/stable/introduction.html#ndcube-introduction" title="(in ndcube v2.4.0)"&gt;&lt;span&gt;An introduction to ndcube&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We started working on ndcube 2.0 back in 2019 when we had Yash Sharma do the initial work of porting the code base to use the &lt;a class="reference external" href="https://zenodo.org/record/1188875"&gt;APE 14&lt;/a&gt; APIs as his &lt;a class="reference external" href="https://yashrsharma44.medium.com/google-summer-of-code-2019-final-report-openastronomy-ndcube-65068b8571d8"&gt;Google Summer of Code project&lt;/a&gt;.
Little did any of us think that it would take over two years from that point to hit the final release.&lt;/p&gt;
&lt;p&gt;The road to ndcube 2.0 has been long and arduous; all involved have put in a lot of work and what we have made is something that I am personally very proud of.
ndcube 2.0 would not have happened without Dan Ryan, who as the co-maintainer for ndcube has spent many hours on video calls with me designing APIs, and many more hours besides working out problems you would only encounter in one in a million WCS objects!
I would also be remiss if I didn’t specifically thank the DKIST data center who have, by paying for my time, funded a lot of the development work on ndcube 2.0, even when the scope increased beyond their direct requirements.&lt;/p&gt;
&lt;p&gt;I hope that many packages will start using ndcube 2.0 as the base for their code.
There are already many who have helped to shape the release such as the &lt;a class="reference external" href="https://github.com/DKISTDC/dkist"&gt;DKIST User Tools&lt;/a&gt;, &lt;a class="reference external" href="https://github.com/astropy/specutils"&gt;specutils&lt;/a&gt; and &lt;a class="reference external" href="https://github.com/sunpy/sunraster"&gt;sunraster&lt;/a&gt; as well as others I know are in the works.&lt;/p&gt;
&lt;p&gt;For all the gory details of the changes in ndcube 2.0 see &lt;a class="reference external" href="https://docs.sunpy.org/projects/ndcube/en/stable/whatsnew/changelog.html#id11"&gt;the changelog&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="pfsspy-1-0"&gt;
&lt;h2&gt;pfsspy 1.0&lt;/h2&gt;
&lt;p&gt;The SunPy-affiliated potential field source surface extrapolation package &lt;a class="reference external" href="https://pfsspy.readthedocs.io/"&gt;pfsspy&lt;/a&gt; maintained by &lt;a class="reference external" href="https://github.com/dstansby/"&gt;David Stansby&lt;/a&gt; has had a 1.0 release, which includes promises of API stability.
You can read about all the changes in &lt;a class="reference external" href="https://pfsspy.readthedocs.io/en/stable/changes.html"&gt;the changelog&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="aiapy-0-6"&gt;
&lt;h2&gt;aiapy 0.6&lt;/h2&gt;
&lt;p&gt;The SunPy-affiliated aiapy package, which provides tools for working with SDO/AIA data and is maintained by the AIA instrument team, has a new 0.6 release which includes support for sunpy core 3.1.
In addition to a number of bug fixes, v0.6 also includes the ability to calculate uncertainties on AIA images via the &lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/api/aiapy.calibrate.estimate_error.html#aiapy.calibrate.estimate_error" title="(in aiapy v0.12.0)"&gt;&lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;estimate_error&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; function.
A complete list of changes is available &lt;a class="reference external" href="https://aiapy.readthedocs.io/en/stable/whatsnew/changelog.html"&gt;in the changelog&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2021/2021-10-29_sunpy_31_ndcube_20/"/>
    <summary>Today we have a quadruple release announcement for you!
It’s been a very busy week in SunPy land getting both the core and ndcube releases over the line; I hope you enjoy them!</summary>
    <category term="sunpy" label="sunpy"/>
    <published>2021-10-29T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2020/2020-08-17_affiliated_packages/</id>
    <title>The What, Why, and How of SunPy Affiliated Packages</title>
    <updated>2020-08-18T00:00:00+00:00</updated>
    <author>
      <name>Laura Hayes</name>
    </author>
    <content type="html">&lt;section id="the-what-why-and-how-of-sunpy-affiliated-packages"&gt;

&lt;section id="what-are-sunpy-affiliated-packages"&gt;
&lt;h2&gt;What are SunPy affiliated packages?&lt;/h2&gt;
&lt;p&gt;SunPy affiliated packages are well-maintained, open-source software packages that build upon or extend the functionality of the SunPy core library.
The main idea behind affiliated packages is to provide additional tools and functionality to the solar physics community that is considered outside the scope of the SunPy core library, but builds upon it.
Affiliated packages are aimed to integrate well with the SunPy ecosystem and together with the core library offer a diverse software ecosystem for which to perform solar data analysis.
Affiliated packages are reviewed and registered with the SunPy project.&lt;/p&gt;
&lt;p&gt;There are two types of affiliated packages - &lt;em&gt;sponsored&lt;/em&gt; and &lt;em&gt;non-sponsored&lt;/em&gt;.
A sponsored affiliated package is an affiliated package that is maintained and overseen by the SunPy project, examples of these include &lt;a class="reference external" href="https://docs.sunpy.org/en/stable/"&gt;sunpy core&lt;/a&gt; and &lt;a class="reference external" href="https://docs.sunpy.org/projects/ndcube/en/stable/"&gt;ndcube&lt;/a&gt;.
Non-sponsored affiliated packages on the other hand remain under the control and maintenance of the original developers, but must meet a set of standards.
Examples of non-sponsored affiliated packages would be instrument-specific affiliated packages such as &lt;a class="reference external" href="https://pypi.org/project/aiapy/"&gt;AIApy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this blog post we want to outline our new streamline process for becoming an affiliated package and we want to encourage package developers, particularly instrument teams interested in developing a Python package, to submit their package for review for SunPy affiliate status!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="why-would-a-package-want-to-become-an-affiliated-package"&gt;
&lt;h2&gt;Why would a package want to become an affiliated package?&lt;/h2&gt;
&lt;p&gt;SunPy supports the development of affiliated packages through our community development efforts and by providing our package template.
The SunPy project will also ensure that affiliated packages are publicized to encourage community development.
For example, affiliated packages are listed on the SunPy website, and SunPy adverstises them at conferences and workshops.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="call-to-instrument-mission-teams"&gt;
&lt;h2&gt;Call to instrument/mission teams!&lt;/h2&gt;
&lt;p&gt;We invite instrument and mission teams that are interested in developing a Python package to become a SunPy affiliated package.
Integrating mission/instrument-specific software within the SunPy ecosystem will be of great benefit to the solar community and will allow for a simplified and unified process for users to perform solar data analysis.
For example, a package may consist of instrument-specific calibration routines which would be outside the scope of SunPy core package, but could build upon the functionality provided by core such as the data containers and file readers.
Developing a mission/instrument specific package as a SunPy affiliated package will allow the code to live and integrate within the SunPy ecosystem.&lt;/p&gt;
&lt;p&gt;Furthermore, for mission/instrument teams that would like to begin developing specific Python software, the SunPy project offers support through our package template and community resources for the package to be ‘incubated’ until it is at the level of affiliate status.
We would really like to encourage instrument/mission teams to reach out!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="package-template"&gt;
&lt;h2&gt;Package template&lt;/h2&gt;
&lt;aside class="system-message"&gt;
&lt;p class="system-message-title"&gt;System Message: INFO/1 (&lt;span class="docutils literal"&gt;/home/docs/checkouts/readthedocs.org/user_builds/sunpyorg/checkouts/489/posts/2020/2020-08-17_affiliated_packages.rst&lt;/span&gt;, line 7); &lt;em&gt;&lt;a href="#id1"&gt;backlink&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Duplicate implicit target name: “package template”.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;The SunPy project is currently developing a &lt;a class="reference external" href="https://github.com/sunpy/package-template"&gt;package template&lt;/a&gt; that is designed to help developers create new Python packages within the SunPy ecosystem.
The template is still in development, and we are working towards creating more documentation to make it accessible for developers to use.
The idea is that this template will provide a simplified way to standardized packaging, testing, and documentation using the same framework as the SunPy core package.
The SunPy package template will make it easier for package developers to meet the standards required by SunPy to become an affiliated package!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="how-does-a-package-become-an-affiliated-package"&gt;
&lt;h2&gt;How does a package become an affiliated package?&lt;/h2&gt;
&lt;p&gt;To become a SunPy affiliated package, a set of criteria need to be met to ensure that affiliated packages provide useful functionality to the community at a standard of quality similar to the core SunPy package.
We now have a new review process for becoming an affiliated package, aimed at being open, approachable and streamlined!&lt;/p&gt;
&lt;p&gt;The reviews are performed as an open process through GitHub issues on the &lt;code class="xref py py-obj docutils literal notranslate"&gt;&lt;span class="pre"&gt;https://github.com/sunpy/sunpy.org&lt;/span&gt;&lt;/code&gt; repository.
To submit a package for review to become an affiliated package, an issue should be opened on this repository.
We now have an &lt;a class="reference external" href="https://github.com/sunpy/sunpy.org/issues/new?assignees=Cadair&amp;amp;labels=Affiliated+Package+Review&amp;amp;template=new_affiliated_package.md"&gt;issue template&lt;/a&gt; for submitting a package for review to make it easier to provide all the required information and to start a dialogue about the process.&lt;/p&gt;
&lt;p&gt;Once an issue is open, the Affiliate Package Liaison will check that the package meets the baseline requirements of an affiliated package.
These include checking to see that it is compatible with the SunPy &lt;a class="reference external" href="https://sunpy.org/coc"&gt;Code of Conduct&lt;/a&gt;,  has an appropriate licence, provides a Python interface, is on PyPI, and is useful to the solar physics community.
Following this, a reviewer independent to the package is assigned and a review is undertaken based on the criteria listed below.&lt;/p&gt;
&lt;p&gt;The review criteria that are assessed are listed as follows with the associated gradings:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Functionality&lt;/strong&gt;  Does the package provide functionality that is useful and relevant to the solar physics community?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integration&lt;/strong&gt;  - Does that package integrate well within the SunPy ecosystem? for example does it make use of all appropriate features in the core library, including the applicable data structures and dependencies?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documentation&lt;/strong&gt;  - Does the package have satisfactory documentation that is up to the standard of the core sunpy library including a user guide and examples?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt; - Does the package use a testing suite to verify the code functionality within its codebase? Does it provide integration tests?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Duplication&lt;/strong&gt; - Does the package duplicate functionality within sunpy core or any of the other affiliated packages or other relevant packages?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Community&lt;/strong&gt;  - Is the package openly developed with active input and engagement from users within the community? Does the package have a code of conduct and does this reflect the same values as the SunPy project?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Development Status&lt;/strong&gt; - Is the package well maintained? Are contribution responded to by developers? Is the package still under development with large API changes?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These criteria are reviewed on a ‘traffic light’ system and ranked ‘green’, ‘orange’, or ‘red’ based on the submitted package.
For full details of how each of criteria are ranked please check out the &lt;a class="reference external" href="https://sunpy.org/affiliated#affiliated-package-review"&gt;Review Criteria&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For a submitted package to be accepted to affiliate package status, the package must be ‘green’ in &lt;strong&gt;Functionality&lt;/strong&gt;, and one other category.
It must also not list any ‘red’ scores.&lt;/p&gt;
&lt;p&gt;If the package in its current state does not pass the criteria, it can be listed as &lt;em&gt;Provisional&lt;/em&gt; once it does not list ‘red’ in the &lt;strong&gt;Functionality&lt;/strong&gt;, &lt;strong&gt;Duplication&lt;/strong&gt; or &lt;strong&gt;Community&lt;/strong&gt; criteria.
The idea is that the package can be listed as Provisional as it is working towards addressing the criteria for which it did not pass the review in.&lt;/p&gt;
&lt;p&gt;We would really like to encourage packages interested in becoming an affiliated SunPy package to please submit an issue and open up a review dialogue.
We will have an Affiliated Package Liaison that will help you through each step of this process :).
Even if you are unsure about whether you want to submit a package, please feel free to open an issue and informally discuss your package.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="reach-out"&gt;
&lt;h2&gt;Reach out!&lt;/h2&gt;
&lt;p&gt;If you are a developer of a package that you think fits nicely into the SunPy ecosystem and will of benefit to the solar physics community and want to chat to us about it please reach out!
This can be of course regardless of how far along the package is - from concept to maturity!
Join us our live chat &lt;a class="reference external" href="https://app.element.io/#/room/#sunpy:openastronomy.org"&gt;Matrix room&lt;/a&gt; or join in on the SunPy weekly community meetings which occur each Wednesday (see &lt;a class="reference external" href="https://calendar.google.com/calendar?cid=ZzljOWVha2c5OGI1Y2JvZ2Q3bTV0YTZoOHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ"&gt;our calendar&lt;/a&gt; for the time in your timezone) and are hosted on &lt;a class="reference external" href="https://sunpy.org/meeting"&gt;jitsi&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2020/2020-08-17_affiliated_packages/"/>
    <summary>SunPy affiliated packages are well-maintained, open-source software packages that build upon or extend the functionality of the SunPy core library.
The main idea behind affiliated packages is to provide additional tools and functionality to the solar physics community that is considered outside the scope of the SunPy core library, but builds upon it.
Affiliated packages are aimed to integrate well with the SunPy ecosystem and together with the core library offer a diverse software ecosystem for which to perform solar data analysis.
Affiliated packages are reviewed and registered with the SunPy project.</summary>
    <category term="sunpy" label="sunpy"/>
    <published>2020-08-18T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2020/2020-06-03_hdee_sunpy/</id>
    <title>SunPy awarded a NASA HDEE Grant</title>
    <updated>2020-06-05T00:00:00+00:00</updated>
    <author>
      <name>Jack Ireland</name>
    </author>
    <content type="html">&lt;section id="sunpy-awarded-a-nasa-hdee-grant"&gt;

&lt;p&gt;A NASA Heliophysics Data Environment Enhancement (HDEE) grant has been
awarded to a proposal submitted to support SunPy development. The
grant was awarded through NASA’s 2019 ROSES grant solicitation.&lt;/p&gt;
&lt;p&gt;The grant supports the following development goals:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Creation of a report on the state of the SunPy codebase by analyzing
output from code coverage and API inspection tools, etc, identifying
areas in the existing codebase that need more coverage, can be
consolidated or removed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provide the ability to read spectroscopic data into a spectral data
object, thereby enabling its later scientific analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement a number of heliophysical coordinate systems using the
existing SunPy and Astropy-based coordinate system framework.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create example code snippets that use SunPy and packages from the
Python in Heliophysics Community; these examples will be shared via
the Python in Heliophysics Community.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The PI of the grant is Jack Ireland, and the co-I of the grant is Andy
Terrel (NumFOCUS). The grant has a one year duration. The bulk of
the code development will be undertaken by a developer hired through
NuMFOCUS. We look forward to supporting the development of SunPy
through this grant.&lt;/p&gt;
&lt;p&gt;Jack&lt;/p&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2020/2020-06-03_hdee_sunpy/"/>
    <summary>A NASA Heliophysics Data Environment Enhancement (HDEE) grant has been
awarded to a proposal submitted to support SunPy development. The
grant was awarded through NASA’s 2019 ROSES grant solicitation.</summary>
    <category term="sunpy" label="sunpy"/>
    <published>2020-06-05T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2020/2020-04-27-SunPy_Survey/</id>
    <title>SunPy Survey</title>
    <updated>2020-04-27T00:00:00+00:00</updated>
    <author>
      <name>Monica Bobra</name>
    </author>
    <content type="html">&lt;section id="sunpy-survey"&gt;

&lt;p&gt;The SunPy project is happy to announce the results of the solar physics community survey!&lt;/p&gt;
&lt;p&gt;For six months last year, between February and July 2019, the SunPy Project asked the solar physics community to fill out a 13-question survey about software and hardware. Some of the questions were: Do you use software in your research? Have you had formal training in programming? Have you cited software papers in your published research?&lt;/p&gt;
&lt;p&gt;We deliberately asked some of the same questions as &lt;a class="reference external" href="https://arxiv.org/abs/1507.03989"&gt;Momcheva and Tollerud (2015)&lt;/a&gt;, who informally surveyed 1142 members of the astrophysics community, to compare software preferences between the two communities. A total of 364 community members, across 35 countries, took our survey.&lt;/p&gt;
&lt;section id="what-we-found"&gt;
&lt;h2&gt;What we found&lt;/h2&gt;
&lt;p&gt;We found that 99±0.5% of people who responded to our survey use software in their research. Nearly everyone in the solar physics community relies on scientific software. A large fraction (66%) of respondents use Python. Most respondents use both Interactive Data Language (IDL) and Python.&lt;/p&gt;
&lt;img alt="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure1.jpg" src="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure1.jpg" /&gt;
&lt;p&gt;However, students are twice as likely as faculty, staff scientists, and researchers to use Python. This breakdown is pretty different from the astrophysics community, where Momcheva and Tollerud (2015) found that Python is the most popular programming language within every individual career category.&lt;/p&gt;
&lt;img alt="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure2.jpg" src="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure2.jpg" /&gt;
&lt;p&gt;We also found that most respondents (63±4%) haven’t taken any computer science courses at an undergraduate or graduate level. Momcheva and Tollerud (2015) also found that most astrophysicists also lack formal training in software development.&lt;/p&gt;
&lt;img alt="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure3.jpg" src="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure3.jpg" /&gt;
&lt;p&gt;Most of the people who responded to our survey work with observational data taken by ground-based or space-based instruments (82%). And about half (47%) work with numerical simulations. Some work in both sub-disciplines. Although some instruments and numerical models in solar physics generate sizeable data volumes, only a small fraction of respondents use a regional cluster, national cluster, or the commercial cloud for their research.&lt;/p&gt;
&lt;img alt="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure4.jpg" src="https://sunpy.org/_images/2020-04-27-SunPy_Survey_Figure4.jpg" /&gt;
&lt;p&gt;Finally, we found that 42±3% of respondents regularly cite scientific software. Half the respondents who don’t cite software said they didn’t know how.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="our-paper"&gt;
&lt;h2&gt;Our paper&lt;/h2&gt;
&lt;p&gt;Please check out our paper! We detailed all of these results, and more, in a paper published on April 20, 2020 (DOI: &lt;a class="reference external" href="https://doi.org/10.1007/s11207-020-01622-2"&gt;10.1007/s11207-020-01622-2&lt;/a&gt;). We also included an appendix on how to cite scientific software. You can also take a look at all the raw survey responses (anonymized and randomized), along with the code to analyze these data, at &lt;a class="reference external" href="https://github.com/sunpy/survey"&gt;github.com/sunpy/survey&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2020/2020-04-27-SunPy_Survey/"/>
    <summary>The SunPy project is happy to announce the results of the solar physics community survey!</summary>
    <category term="sunpy" label="sunpy"/>
    <published>2020-04-27T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2019/2019-07-01-SunPy-Releasing/</id>
    <title>SunPy Release Schedule and Version Numbering</title>
    <updated>2019-06-27T00:00:00+00:00</updated>
    <author>
      <name>Stuart Mumford</name>
    </author>
    <content type="html">&lt;section id="sunpy-release-schedule-and-version-numbering"&gt;

&lt;p&gt;In this blog post I want to outline how, and more over why, we are going to
number the SunPy releases and when we are going to release them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TLDR&lt;/strong&gt;; we are going to move to a 6 month release cadence, with a Long Term
Support (one year of support) release in May and a Short Term Support (6 months
of support) in November. We will increment the major version number for each LTS
release.&lt;/p&gt;
&lt;section id="background"&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;As part of the 1.0 release planning the SunPy developers and the board spent a
long time discussing how we want to version SunPy and what we want to use our
versioning a release schedule to achieve. We went through two major iterations
of this plan, the first can be found in the abandoned PR to the SunPy
Enhancement Proposal repository &lt;a class="reference external" href="https://github.com/sunpy/sunpy-SEP/pull/30"&gt;#30&lt;/a&gt;,
and the second one which was accepted in
&lt;a class="reference external" href="https://github.com/sunpy/sunpy-SEP/pull/40"&gt;#40&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="objectives"&gt;
&lt;h2&gt;Objectives&lt;/h2&gt;
&lt;p&gt;In moving SunPy out of the 0.y series of releases we knew that our users would
be expecting us to make breaking changes less, and for them to be able to rely
on SunPy for longer.&lt;/p&gt;
&lt;p&gt;We wanted to balance the desire for people to be able to start using SunPy for a
project and be able to see that project through without having to constantly
adjust to many changes in new releases. On the other hand, we wanted to also
allow the development of SunPy to continue without having to delay people
contributing improvements to SunPy because of a strict versioning scheme.&lt;/p&gt;
&lt;p&gt;We also have to consider that, currently, SunPy core is developed entirely by
volunteers, and supporting old versions of the library is a time consuming and
sometimes thankless job.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="releases"&gt;
&lt;h2&gt;Releases&lt;/h2&gt;
&lt;p&gt;The solution we landed on is to provide a Long Term Support release that we will
support for one year (i.e. until the following LTS release). This gives people
who want stability a release schedule where they get bug fixes for a year. While
also allowing SunPy to do releases on a six month cycle to get new features out
for people to use.&lt;/p&gt;
&lt;p&gt;To make it clear which releases are Long Term Support releases, we will
increment the major version (the first number) for each LTS release. This means
SunPy 1.0 is a LTS release which we will be supporting until the release of 2.0
in May 2020.&lt;/p&gt;
&lt;p&gt;The all the non-LTS releases between the LTS releases will increment the minor
version number, as there is only one release planned between LTS releases the
normal release number will be 1.0, 1.1, 2.0, 2.1 etc.&lt;/p&gt;
&lt;img alt="https://sunpy.org/_images/sunpy-release-schedule.jpg" src="https://sunpy.org/_images/sunpy-release-schedule.jpg" /&gt;
&lt;/section&gt;
&lt;section id="deprecations"&gt;
&lt;h2&gt;Deprecations&lt;/h2&gt;
&lt;p&gt;We still expect, and have plans for, changes to many parts of SunPy. We believe
these changes will enable even more people to find SunPy useful in their work.&lt;/p&gt;
&lt;p&gt;To enable people to prepare for changes and to not be in for big surprises when
updating SunPy we will endeavour to emit a deprecation warning for any
breaking changes for &lt;em&gt;one LTS release&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The upshot of this is that, if now after 1.0, we want to change something in a
backwards incompatible way we would continue to provide both the old and new
ways until after the 2.0 release. The 2.0 release would emit a deprecation
warning, to give people who go from LTS to LTS a year to update their code
before the next LTS.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="conclusion"&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I hope this blog post gives you some insight into how we made this decision and
why, if you have any comments please don’t hesitate to get in touch using any of
the usual ways.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2019/2019-07-01-SunPy-Releasing/"/>
    <summary>In this blog post I want to outline how, and more over why, we are going to
number the SunPy releases and when we are going to release them.</summary>
    <category term="sunpy" label="sunpy"/>
    <published>2019-06-27T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://sunpy.org/posts/2017/2017-04-07-update/</id>
    <title>Updates to the website</title>
    <updated>2017-04-07T00:00:00+00:00</updated>
    <author>
      <name>Nabil Freij</name>
    </author>
    <content type="html">&lt;section id="updates-to-the-website"&gt;

&lt;p&gt;The website has gone some minor updates to incorporate the latest version of Bootstrap and its build dependencies among other items.
This work came from &lt;a class="reference external" href="https://github.com/prateekiiest"&gt;Prateek Chanda&lt;/a&gt;, &lt;a class="reference external" href="https://github.com/DuyguKeskek"&gt;Duygu KEŞKEK&lt;/a&gt; and &lt;a class="reference external" href="https://github.com/souravc4"&gt;Sourav Kumar&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
</content>
    <link href="https://sunpy.org/posts/2017/2017-04-07-update/"/>
    <summary>The website has gone some minor updates to incorporate the latest version of Bootstrap and its build dependencies among other items.
This work came from Prateek Chanda, Duygu KEŞKEK and Sourav Kumar</summary>
    <category term="sunpy" label="sunpy"/>
    <category term="website" label="website"/>
    <published>2017-04-07T00:00:00+00:00</published>
  </entry>
</feed>
