diff --git a/docs/conf.py b/docs/conf.py index aeead48..f0fd902 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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. @@ -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 ------------------------------------------------- diff --git a/docs/images/loading-aia-and-hmi-1.png b/docs/images/loading-aia-and-hmi-1.png new file mode 100644 index 0000000..72f6f3a Binary files /dev/null and b/docs/images/loading-aia-and-hmi-1.png differ diff --git a/docs/images/loading-aia-and-hmi-2.png b/docs/images/loading-aia-and-hmi-2.png new file mode 100644 index 0000000..dffcace Binary files /dev/null and b/docs/images/loading-aia-and-hmi-2.png differ diff --git a/docs/images/loading-aia-and-hmi-3.png b/docs/images/loading-aia-and-hmi-3.png new file mode 100644 index 0000000..28c77bc Binary files /dev/null and b/docs/images/loading-aia-and-hmi-3.png differ diff --git a/docs/images/loading-aia-and-hmi-4.png b/docs/images/loading-aia-and-hmi-4.png new file mode 100644 index 0000000..62943bb Binary files /dev/null and b/docs/images/loading-aia-and-hmi-4.png differ diff --git a/docs/index.rst b/docs/index.rst index 6fad686..218cfcf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,3 +8,5 @@ Glue Solar is a project to provide solar physics specific functionality to .. toctree:: :maxdepth: 2 + + loading-aia-and-hmi diff --git a/docs/loading-aia-and-hmi.rst b/docs/loading-aia-and-hmi.rst new file mode 100644 index 0000000..3c96270 --- /dev/null +++ b/docs/loading-aia-and-hmi.rst @@ -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 +``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 +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 +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 +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. diff --git a/glue_solar/instruments/iris/stack_spectrograms.py b/glue_solar/instruments/iris/stack_spectrograms.py index da877bb..008eba1 100644 --- a/glue_solar/instruments/iris/stack_spectrograms.py +++ b/glue_solar/instruments/iris/stack_spectrograms.py @@ -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` diff --git a/setup.cfg b/setup.cfg index 3e25f06..2fa3e0b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,8 @@ qt = docs = sphinx sunpy-sphinx-theme + sphinx-gallery + towncrier [options.entry_points] glue.plugins =