hinode 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. hinode-0.1.0/.github/workflows/black.yml +17 -0
  2. hinode-0.1.0/.github/workflows/publish.yml +32 -0
  3. hinode-0.1.0/.github/workflows/ruff.yml +14 -0
  4. hinode-0.1.0/.github/workflows/tests.yml +46 -0
  5. hinode-0.1.0/.github/workflows/typing.yml +25 -0
  6. hinode-0.1.0/.gitignore +26 -0
  7. hinode-0.1.0/.readthedocs.yml +18 -0
  8. hinode-0.1.0/CITATION.cff +22 -0
  9. hinode-0.1.0/LICENSE +28 -0
  10. hinode-0.1.0/PKG-INFO +77 -0
  11. hinode-0.1.0/README.md +46 -0
  12. hinode-0.1.0/docs/.gitignore +2 -0
  13. hinode-0.1.0/docs/Makefile +20 -0
  14. hinode-0.1.0/docs/_static/.gitkeep +0 -0
  15. hinode-0.1.0/docs/_templates/class_custom.rst +40 -0
  16. hinode-0.1.0/docs/_templates/function_custom.rst +5 -0
  17. hinode-0.1.0/docs/_templates/module_custom.rst +69 -0
  18. hinode-0.1.0/docs/conf.py +80 -0
  19. hinode-0.1.0/docs/index.rst +92 -0
  20. hinode-0.1.0/docs/make.bat +35 -0
  21. hinode-0.1.0/docs/refs.bib +32 -0
  22. hinode-0.1.0/hinode/__init__.py +29 -0
  23. hinode-0.1.0/hinode/py.typed +0 -0
  24. hinode-0.1.0/hinode/xrt/__init__.py +17 -0
  25. hinode-0.1.0/hinode/xrt/_data.py +558 -0
  26. hinode-0.1.0/hinode/xrt/_data_test.py +638 -0
  27. hinode-0.1.0/hinode/xrt/_filtergrams.py +576 -0
  28. hinode-0.1.0/hinode/xrt/_filtergrams_test.py +518 -0
  29. hinode-0.1.0/hinode/xrt/_xrt.py +63 -0
  30. hinode-0.1.0/hinode/xrt/_xrt_test.py +14 -0
  31. hinode-0.1.0/hinode.egg-info/PKG-INFO +77 -0
  32. hinode-0.1.0/hinode.egg-info/SOURCES.txt +37 -0
  33. hinode-0.1.0/hinode.egg-info/dependency_links.txt +1 -0
  34. hinode-0.1.0/hinode.egg-info/requires.txt +19 -0
  35. hinode-0.1.0/hinode.egg-info/scm_file_list.json +34 -0
  36. hinode-0.1.0/hinode.egg-info/scm_version.json +8 -0
  37. hinode-0.1.0/hinode.egg-info/top_level.txt +1 -0
  38. hinode-0.1.0/pyproject.toml +61 -0
  39. hinode-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,17 @@
1
+ name: Black
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ black:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: psf/black@stable
15
+ with:
16
+ options: "--check --verbose --diff"
17
+ src: "./hinode"
@@ -0,0 +1,32 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ name: Build and publish to PyPI
10
+ if: startsWith(github.ref, 'refs/tags')
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ id-token: write
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ - name: Install pypa/build
19
+ run: >-
20
+ python -m
21
+ pip install
22
+ build
23
+ --user
24
+ - name: Build a binary wheel and a source tarball
25
+ run: >-
26
+ python -m
27
+ build
28
+ --sdist
29
+ --wheel
30
+ --outdir dist/
31
+ - name: Publish to PyPI
32
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,14 @@
1
+ name: Ruff
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ ruff:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: astral-sh/ruff-action@v3
@@ -0,0 +1,46 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [
16
+ ubuntu-latest,
17
+ windows-latest,
18
+ macOS-latest,
19
+ ]
20
+ python-version: ["3.12", "3.14",]
21
+ name: ${{ matrix.os }}, Python ${{ matrix.python-version }} tests
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+ - name: Install package
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install setuptools wheel
32
+ pip install -e .[test]
33
+ - name: Test with pytest
34
+ env:
35
+ MPLBACKEND: "agg"
36
+ run: |
37
+ pip install pytest pytest-cov
38
+ pytest --cov=. --cov-report=xml
39
+ - name: Upload coverage to Codecov
40
+ uses: codecov/codecov-action@v7
41
+ with:
42
+ token: ${{ secrets.CODECOV_TOKEN }}
43
+ files: coverage.xml
44
+ flags: unittests
45
+ env_vars: OS,PYTHON
46
+ name: codecov-umbrella
@@ -0,0 +1,25 @@
1
+ name: typing
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ pyright:
11
+ name: Check type annotations with pyright
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.13"
19
+ - name: Install package
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -e .[test]
23
+ pip install pyright==1.1.411
24
+ - name: Check types with pyright
25
+ run: pyright
@@ -0,0 +1,26 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+
5
+ # Build metadata written by `pip install -e .`
6
+ *.egg-info/
7
+ build/
8
+ dist/
9
+
10
+ # Written by Sphinx: `_autosummary` is the API reference generated from the
11
+ # docstrings, so it is a copy of the source rather than a thing of its own.
12
+ docs/_build/
13
+ docs/_autosummary/
14
+ jupyter_execute/
15
+
16
+ # Written by pytest and by the coverage step of the test workflow
17
+ .pytest_cache/
18
+ .coverage
19
+ coverage.xml
20
+
21
+ # Written by Jupyter alongside a notebook that has been opened
22
+ .ipynb_checkpoints/
23
+
24
+ # IDE
25
+ .idea/
26
+ .vscode/
@@ -0,0 +1,18 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-lts-latest
5
+ tools:
6
+ python: "3.12"
7
+ apt_packages:
8
+ - graphviz
9
+
10
+ sphinx:
11
+ configuration: docs/conf.py
12
+
13
+ python:
14
+ install:
15
+ - method: pip
16
+ path: .
17
+ extra_requirements:
18
+ - doc
@@ -0,0 +1,22 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use hinode in your research, please cite it using these metadata."
3
+ type: software
4
+ title: hinode
5
+ abstract: >-
6
+ hinode is a Python library for downloading and analyzing observations from
7
+ the Hinode satellite, starting with the X-Ray Telescope (XRT). Observations
8
+ are represented as named-arrays function arrays, so a sequence of images has
9
+ named axes and physical units, and carries the time and sky position of
10
+ every pixel.
11
+ authors:
12
+ - family-names: Smart
13
+ given-names: Roy T.
14
+ orcid: "https://orcid.org/0000-0002-9997-5515"
15
+ repository-code: "https://github.com/sun-data/hinode"
16
+ url: "https://hinode.readthedocs.io"
17
+ license: BSD-3-Clause
18
+ keywords:
19
+ - Hinode
20
+ - XRT
21
+ - solar physics
22
+ - data access
hinode-0.1.0/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Roy T. Smart
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hinode-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: hinode
3
+ Version: 0.1.0
4
+ Summary: A Python library to download and analyze observations from the Hinode satellite.
5
+ Author-email: "Roy T. Smart" <roytsmart@gmail.com>
6
+ License-Expression: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/sun-data/hinode
8
+ Project-URL: Documentation, https://hinode.readthedocs.io/en/latest
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.12
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: requests
14
+ Requires-Dist: urllib3>=2
15
+ Requires-Dist: joblib
16
+ Requires-Dist: astropy
17
+ Requires-Dist: named-arrays~=2.14
18
+ Provides-Extra: test
19
+ Requires-Dist: pytest; extra == "test"
20
+ Provides-Extra: doc
21
+ Requires-Dist: pytest; extra == "doc"
22
+ Requires-Dist: matplotlib; extra == "doc"
23
+ Requires-Dist: graphviz; extra == "doc"
24
+ Requires-Dist: sphinx-autodoc-typehints; extra == "doc"
25
+ Requires-Dist: sphinxcontrib-bibtex; extra == "doc"
26
+ Requires-Dist: pydata-sphinx-theme; extra == "doc"
27
+ Requires-Dist: ipykernel; extra == "doc"
28
+ Requires-Dist: jupyter-sphinx; extra == "doc"
29
+ Requires-Dist: sphinx-favicon; extra == "doc"
30
+ Dynamic: license-file
31
+
32
+ # hinode
33
+
34
+ [![tests](https://github.com/sun-data/hinode/actions/workflows/tests.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/tests.yml)
35
+ [![codecov](https://codecov.io/gh/sun-data/hinode/graph/badge.svg)](https://codecov.io/gh/sun-data/hinode)
36
+ [![Black](https://github.com/sun-data/hinode/actions/workflows/black.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/black.yml)
37
+ [![Ruff](https://github.com/sun-data/hinode/actions/workflows/ruff.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/ruff.yml)
38
+ [![typing](https://github.com/sun-data/hinode/actions/workflows/typing.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/typing.yml)
39
+ [![Documentation Status](https://readthedocs.org/projects/hinode/badge/?version=latest)](https://hinode.readthedocs.io/en/latest/?badge=latest)
40
+
41
+ A Python library to download and analyze observations from the
42
+ JAXA/NASA [Hinode](https://hinode.nao.ac.jp/en/) satellite.
43
+
44
+ So far it supports the Level 1 images of the X-Ray Telescope (XRT),
45
+ which it finds in the archive of the Solar Data Analysis Center,
46
+ sorts by filter, and downloads.
47
+ The images are not represented as instances of
48
+ [`sunpy.map.Map`](https://docs.sunpy.org/en/stable/generated/api/sunpy.map.Map.html),
49
+ but as instances of [`named_arrays.FunctionArray`](https://named-arrays.readthedocs.io/en/latest/_autosummary/named_arrays.FunctionArray.html),
50
+ which carry the time, exposure time and sky position of every pixel,
51
+ along with a mask of the pixels affected by saturation.
52
+
53
+ ## Installation
54
+
55
+ This package is published on PyPI and can be installed using pip
56
+ ```bash
57
+ pip install hinode
58
+ ```
59
+
60
+ ## Example
61
+
62
+ Load the XRT images taken through the Al_poly filter between two times
63
+ ```python
64
+ import hinode
65
+
66
+ images = hinode.xrt.open(
67
+ time_start="2019-09-30T18:06:11",
68
+ time_stop="2019-09-30T18:11:01",
69
+ filter="Al_poly",
70
+ )
71
+ ```
72
+
73
+ ## Citation
74
+
75
+ If you use hinode in your research, please cite it.
76
+ The citation metadata is kept in [`CITATION.cff`](https://github.com/sun-data/hinode/blob/main/CITATION.cff),
77
+ which the "Cite this repository" button on GitHub can export as BibTeX or APA.
hinode-0.1.0/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # hinode
2
+
3
+ [![tests](https://github.com/sun-data/hinode/actions/workflows/tests.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/tests.yml)
4
+ [![codecov](https://codecov.io/gh/sun-data/hinode/graph/badge.svg)](https://codecov.io/gh/sun-data/hinode)
5
+ [![Black](https://github.com/sun-data/hinode/actions/workflows/black.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/black.yml)
6
+ [![Ruff](https://github.com/sun-data/hinode/actions/workflows/ruff.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/ruff.yml)
7
+ [![typing](https://github.com/sun-data/hinode/actions/workflows/typing.yml/badge.svg)](https://github.com/sun-data/hinode/actions/workflows/typing.yml)
8
+ [![Documentation Status](https://readthedocs.org/projects/hinode/badge/?version=latest)](https://hinode.readthedocs.io/en/latest/?badge=latest)
9
+
10
+ A Python library to download and analyze observations from the
11
+ JAXA/NASA [Hinode](https://hinode.nao.ac.jp/en/) satellite.
12
+
13
+ So far it supports the Level 1 images of the X-Ray Telescope (XRT),
14
+ which it finds in the archive of the Solar Data Analysis Center,
15
+ sorts by filter, and downloads.
16
+ The images are not represented as instances of
17
+ [`sunpy.map.Map`](https://docs.sunpy.org/en/stable/generated/api/sunpy.map.Map.html),
18
+ but as instances of [`named_arrays.FunctionArray`](https://named-arrays.readthedocs.io/en/latest/_autosummary/named_arrays.FunctionArray.html),
19
+ which carry the time, exposure time and sky position of every pixel,
20
+ along with a mask of the pixels affected by saturation.
21
+
22
+ ## Installation
23
+
24
+ This package is published on PyPI and can be installed using pip
25
+ ```bash
26
+ pip install hinode
27
+ ```
28
+
29
+ ## Example
30
+
31
+ Load the XRT images taken through the Al_poly filter between two times
32
+ ```python
33
+ import hinode
34
+
35
+ images = hinode.xrt.open(
36
+ time_start="2019-09-30T18:06:11",
37
+ time_stop="2019-09-30T18:11:01",
38
+ filter="Al_poly",
39
+ )
40
+ ```
41
+
42
+ ## Citation
43
+
44
+ If you use hinode in your research, please cite it.
45
+ The citation metadata is kept in [`CITATION.cff`](https://github.com/sun-data/hinode/blob/main/CITATION.cff),
46
+ which the "Cite this repository" button on GitHub can export as BibTeX or APA.
@@ -0,0 +1,2 @@
1
+ _autosummary/
2
+ _build/
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
File without changes
@@ -0,0 +1,40 @@
1
+ {{ name | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autoclass:: {{ fullname }}
6
+ :members:
7
+ :show-inheritance:
8
+ :inherited-members:
9
+ :undoc-members:
10
+ :member-order: groupwise
11
+
12
+ {% block attributes %}
13
+ {% if attributes %}
14
+ .. rubric:: {{ _('Attributes') }}
15
+
16
+ .. autosummary::
17
+ {% for item in attributes %}
18
+ ~{{ name }}.{{ item }}
19
+ {%- endfor %}
20
+ {% endif %}
21
+ {% endblock %}
22
+
23
+ {% block methods %}
24
+ {% if methods %}
25
+ .. rubric:: {{ _('Methods') }}
26
+
27
+ .. autosummary::
28
+ {% for item in methods %}
29
+ ~{{ name }}.{{ item }}
30
+ {%- endfor %}
31
+ {% endif %}
32
+ {% endblock %}
33
+
34
+ {% block dia %}
35
+ .. rubric:: {{ _('Inheritance Diagram') }}
36
+
37
+ .. inheritance-diagram:: {{ fullname }}
38
+ :parts: 1
39
+ {% endblock %}
40
+
@@ -0,0 +1,5 @@
1
+ {{ name | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autofunction:: {{ fullname }}
@@ -0,0 +1,69 @@
1
+ {{ name | escape | underline}}
2
+
3
+ .. automodule:: {{ fullname }}
4
+
5
+ {% block attributes %}
6
+ {% if attributes %}
7
+ .. rubric:: Module Attributes
8
+
9
+ .. autosummary::
10
+ :toctree:
11
+ {% for item in attributes %}
12
+ {{ item }}
13
+ {%- endfor %}
14
+ {% endif %}
15
+ {% endblock %}
16
+
17
+ {% block functions %}
18
+ {% if functions %}
19
+ .. rubric:: {{ _('Functions') }}
20
+
21
+ .. autosummary::
22
+ :toctree:
23
+ :template: function_custom.rst
24
+ {% for item in functions %}
25
+ {{ item }}
26
+ {%- endfor %}
27
+ {% endif %}
28
+ {% endblock %}
29
+
30
+ {% block classes %}
31
+ {% if classes %}
32
+ .. rubric:: {{ _('Classes') }}
33
+
34
+ .. autosummary::
35
+ :toctree:
36
+ :template: class_custom.rst
37
+ {% for item in classes %}
38
+ {{ item }}
39
+ {%- endfor %}
40
+ {% endif %}
41
+ {% endblock %}
42
+
43
+ {% block exceptions %}
44
+ {% if exceptions %}
45
+ .. rubric:: {{ _('Exceptions') }}
46
+
47
+ .. autosummary::
48
+ :toctree:
49
+ {% for item in exceptions %}
50
+ {{ item }}
51
+ {%- endfor %}
52
+ {% endif %}
53
+ {% endblock %}
54
+
55
+ {% block modules %}
56
+ {% if modules %}
57
+ .. rubric:: Modules
58
+
59
+ .. autosummary::
60
+ :toctree:
61
+ :template: module_custom.rst
62
+ :recursive:
63
+ {% for item in modules %}
64
+ {{ item }}
65
+ {%- endfor %}
66
+ {% endif %}
67
+ {% endblock %}
68
+
69
+
@@ -0,0 +1,80 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of options, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ import os
7
+ import sys
8
+
9
+ package_path = os.path.abspath("../")
10
+ sys.path.insert(0, package_path)
11
+ os.environ["PYTHONPATH"] = os.pathsep.join(
12
+ (package_path, os.environ.get("PYTHONPATH", ""))
13
+ )
14
+
15
+ # -- Project information -----------------------------------------------------
16
+
17
+ project = "hinode"
18
+ copyright = "2026, Roy T. Smart"
19
+ author = "Roy T. Smart"
20
+
21
+ # -- General configuration ---------------------------------------------------
22
+
23
+ extensions = [
24
+ "sphinx.ext.napoleon",
25
+ "sphinx.ext.autodoc",
26
+ "sphinx.ext.autosummary",
27
+ "sphinx.ext.intersphinx",
28
+ "sphinx.ext.inheritance_diagram",
29
+ "sphinx.ext.viewcode",
30
+ "sphinxcontrib.bibtex",
31
+ "jupyter_sphinx",
32
+ ]
33
+ autosummary_generate = True
34
+ autosummary_imported_members = True
35
+ autosummary_ignore_module_all = False
36
+ autodoc_typehints = "description"
37
+
38
+ graphviz_output_format = "png"
39
+ inheritance_graph_attrs = dict(rankdir="TB")
40
+
41
+ templates_path = ["_templates"]
42
+
43
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
44
+
45
+ # -- Options for HTML output -------------------------------------------------
46
+
47
+ html_theme = "pydata_sphinx_theme"
48
+
49
+ html_static_path = ["_static"]
50
+
51
+ html_theme_options = {
52
+ "icon_links": [
53
+ {
54
+ "name": "GitHub",
55
+ "url": "https://github.com/sun-data/hinode",
56
+ "icon": "fa-brands fa-github",
57
+ "type": "fontawesome",
58
+ },
59
+ {
60
+ "name": "PyPI",
61
+ "url": "https://pypi.org/project/hinode",
62
+ "icon": "fa-brands fa-python",
63
+ },
64
+ ],
65
+ }
66
+
67
+ # https://github.com/readthedocs/readthedocs.org/issues/2569
68
+ master_doc = "index"
69
+
70
+ bibtex_bibfiles = ["refs.bib"]
71
+ bibtex_default_style = "plain"
72
+ bibtex_reference_style = "author_year"
73
+
74
+ intersphinx_mapping = {
75
+ "python": ("https://docs.python.org/3", None),
76
+ "numpy": ("https://numpy.org/doc/stable/", None),
77
+ "matplotlib": ("https://matplotlib.org/stable", None),
78
+ "astropy": ("https://docs.astropy.org/en/stable/", None),
79
+ "named_arrays": ("https://named-arrays.readthedocs.io/en/stable/", None),
80
+ }
@@ -0,0 +1,92 @@
1
+ Introduction
2
+ ============
3
+
4
+ `Hinode <https://hinode.nao.ac.jp/en/>`_ is a JAXA solar observatory,
5
+ built with NASA, the UK Space Agency, and ESA,
6
+ which has been observing the Sun since 2006 :cite:p:`Kosugi2007`.
7
+
8
+ This Python package downloads Hinode observations and represents them
9
+ using :mod:`named_arrays`,
10
+ a named tensor implementation with :class:`astropy.units.Quantity` support.
11
+ So far it supports the Level 1 images of the
12
+ X-Ray Telescope (XRT) :cite:p:`Golub2007`, in :mod:`hinode.xrt`.
13
+
14
+ Installation
15
+ ============
16
+
17
+ This package is published to PyPI and can be installed using pip.
18
+
19
+ .. code-block::
20
+
21
+ pip install hinode
22
+
23
+ API Reference
24
+ =============
25
+
26
+ .. autosummary::
27
+ :toctree: _autosummary
28
+ :template: module_custom.rst
29
+ :recursive:
30
+
31
+ hinode
32
+
33
+
34
+ Examples
35
+ ========
36
+
37
+ Load the XRT images taken through the Al_poly filter while the
38
+ EUV Snapshot Imaging Spectrograph (ESIS) was observing the Sun on
39
+ 2019 September 30, and display the last one.
40
+
41
+ .. jupyter-execute::
42
+
43
+ import matplotlib.pyplot as plt
44
+ import astropy.units as u
45
+ import astropy.visualization
46
+ import named_arrays as na
47
+ import hinode
48
+
49
+ # Download the images and load them into memory
50
+ images = hinode.xrt.open(
51
+ time_start="2019-09-30T18:06:11",
52
+ time_stop="2019-09-30T18:11:01",
53
+ filter="Al_poly",
54
+ )
55
+
56
+ # Select the last image
57
+ image = images[{images.axis_time: ~0}]
58
+
59
+ # Display the image
60
+ unit = image.inputs.position.x.unit
61
+ with astropy.visualization.quantity_support():
62
+ fig, ax = plt.subplots(figsize=(6, 6), constrained_layout=True)
63
+ na.plt.pcolormesh(
64
+ image.inputs.position.x,
65
+ image.inputs.position.y,
66
+ C=image.outputs,
67
+ ax=ax,
68
+ cmap="gray",
69
+ norm="asinh",
70
+ vmin=0 * u.DN / u.s,
71
+ vmax=100 * u.DN / u.s,
72
+ )
73
+ ax.set_aspect("equal")
74
+ ax.set_title(image.inputs.time.ndarray)
75
+ ax.set_xlabel(f"helioprojective $x$ ({unit:latex_inline})")
76
+ ax.set_ylabel(f"helioprojective $y$ ({unit:latex_inline})")
77
+
78
+
79
+ References
80
+ ==========
81
+
82
+ .. bibliography::
83
+
84
+ |
85
+
86
+
87
+ Indices and tables
88
+ ==================
89
+
90
+ * :ref:`genindex`
91
+ * :ref:`modindex`
92
+ * :ref:`search`