Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Loading and Overplotting AIA and HMI files as SunPy Maps" docs #17

Merged
merged 4 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@
copyright = '2020, The SunPy Developers and The Glue Developers'
author = 'The SunPy Developers and The Glue Developers'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.doctest',
'sphinx.ext.mathjax',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -27,6 +35,25 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = '.rst'

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3/',
(None, 'http://data.astropy.org/intersphinx/python3.inv')),
'numpy': ('https://docs.scipy.org/doc/numpy/',
(None, 'http://data.astropy.org/intersphinx/numpy.inv')),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/',
(None, 'http://data.astropy.org/intersphinx/scipy.inv')),
'matplotlib': ('https://matplotlib.org/',
(None, 'http://data.astropy.org/intersphinx/matplotlib.inv')),
'astropy': ('http://docs.astropy.org/en/stable/', None),
'sunpy': ('https://docs.sunpy.org/en/stable/', None),
'glueviz': ('http://docs.glueviz.org/en/stable/', None)}

# -- Options for HTML output -------------------------------------------------

Expand Down
Binary file added docs/images/loading-aia-and-hmi-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loading-aia-and-hmi-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loading-aia-and-hmi-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loading-aia-and-hmi-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Glue Solar is a project to provide solar physics specific functionality to

.. toctree::
:maxdepth: 2

loading-aia-and-hmi
58 changes: 58 additions & 0 deletions docs/loading-aia-and-hmi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. _loading_aia_and_hmi_files:

========================================================
Loading and Overplotting AIA and HMI files as SunPy Maps
========================================================

Loading an AIA file
-------------------
To load an AIA file as a SunPy Map with the ``glue-solar`` plugin of ``glue`` is
very straightforward. Upon firing up ``glue`` while the environment is with
kakirastern marked this conversation as resolved.
Show resolved Hide resolved
``glue-solar`` installed, simply import data with the third icon from the left on the top
navigation bar of ``glue``, choose the file one would like to view, then before clicking
the "Open" button on the lower right corner of the loader select from the dropdown menu
at the bottom the "SunPy Map" format. Otherwise the AIA file would be loaded automatically
nabobalis marked this conversation as resolved.
Show resolved Hide resolved
as an ordinary FITS file instead. The colormap used in ``glue`` for this AIA file would
then be one for the AIA format, depending on the wavelength.

Loading a corresponding HMI file
--------------------------------
The procedure is similar, except that the default colormap for each of the HMI files
nabobalis marked this conversation as resolved.
Show resolved Hide resolved
is different. Autolinking in the spatial dimensions is automatically detected,
but the actual autolinking is performed only after this option is selected/agreed
to by the user.

Overplotting AIA and HMI SunPy Maps as Colormaps
------------------------------------------------
Once both the AIA and corresponding HMI data have been loaded, first drag and drop
the AIA dataset from the upper left "Data Collection" panel to the viewing area
with the "2D Image" data viewer chosen to display the AIA image. The result would be
a view like the following:

.. image:: images/loading-aia-and-hmi-1.png
:width: 800
:alt: Viewing AIA SunPy map individually

Autolinking is automatically detected. If this is say your first time, you would be prompted
kakirastern marked this conversation as resolved.
Show resolved Hide resolved
with a dialog box to autolink as below:

.. image:: images/loading-aia-and-hmi-2.png
:width: 800
:alt: Autolinking AIA and corresponding HMI SunPy map

If dragging the HMI dataset to a space outside of the AIA SunPy map now, you would see:

.. image:: images/loading-aia-and-hmi-3.png
:width: 800
:alt: Viewing HMI SunPy map individually along AIA one

On the other hand, if dragging and dropping the HMI data set on top of the AIA image
to overplot as different colormaps, we would expect to see the following:

.. image:: images/loading-aia-and-hmi-4.png
:width: 800
:alt: Overplotting AMI and HMI SunPy maps as colormaps

The final result should be an overplot of both the AIA and HMI SunPy maps as
different colormaps. Note that the ``limits`` such as scale has been tweaked
to bring out the more salient feaures in the 2D image views.
nabobalis marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion glue_solar/instruments/iris/stack_spectrograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def stack_spectrogram_sequence(cube_sequence, memmap=True, reproject=False):

Parameters
----------
cube_sequence : `irispy.spectrogram.IRISSpectrogramCubeSequence`
cube_sequence : `sunraster.spectrogram_sequence.RasterSequence`
The input arrays to regrid.

memmap : `bool`
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ qt =
docs =
sphinx
sunpy-sphinx-theme
sphinx-gallery
towncrier

[options.entry_points]
glue.plugins =
Expand Down