././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721780225.6395478 drms-0.8.0/0000755000175100001770000000000014650044002012064 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.codecov.yaml0000644000175100001770000000012514650043765014465 0ustar00runnerdockercomment: off coverage: status: project: default: threshold: 0.2% ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.editorconfig0000644000175100001770000000041114650043765014554 0ustar00runnerdocker# https://editorconfig.org root = true # utf, UNIX-style new line [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true [*.{py,rst,md}] indent_style = space indent_size = 4 [*.yml] indent_style = space indent_size = 2 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.gitattributes0000644000175100001770000000012314650043765014772 0ustar00runnerdocker*fits binary *fit binary *fts binary *fit.gz binary *fits.gz binary *fts.gz binary ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721780225.6235476 drms-0.8.0/.github/0000755000175100001770000000000014650044002013424 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721780225.6275477 drms-0.8.0/.github/workflows/0000755000175100001770000000000014650044002015461 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.github/workflows/ci.yml0000644000175100001770000000505014650043765016616 0ustar00runnerdockername: CI on: push: branches: - 'main' - '*.*' - '!*backport*' tags: - 'v*' - '!*dev*' - '!*pre*' - '!*post*' pull_request: workflow_dispatch: schedule: # ┌───────── minute (0 - 59) # │ ┌───────── hour (0 - 23) # │ │ ┌───────── day of the month (1 - 31) # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) - cron: '0 7 * * *' # Every day at 07:00 UTC concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: core: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: submodules: false coverage: codecov toxdeps: "tox-pypi-filter" posargs: -n auto envs: | - linux: py312 test: needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: submodules: false coverage: codecov toxdeps: "tox-pypi-filter" posargs: -n auto envs: | - windows: py10 - macos: py311 - linux: py310-oldestdeps docs: needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: submodules: false pytest: false default_python: '3.12' toxdeps: "tox-pypi-filter" libraries: | apt: - graphviz envs: | - linux: build_docs online: if: "!startsWith(github.event.ref, 'refs/tags/v')" needs: [docs] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: submodules: false coverage: codecov toxdeps: "tox-pypi-filter" posargs: -n 1 --dist loadgroup envs: | - linux: py312-online - linux: py312-sunpy publish: # Build wheels when pushing to any branch # publish_pure_python.yml will only publish if tagged ^v.* if: | ( github.event_name != 'pull_request' ) || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run publish') ) needs: [test] uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main with: test_extras: 'dev' test_command: 'pytest -p no:warnings --doctest-rst --pyargs drms' submodules: false secrets: pypi_token: ${{ secrets.pypi_token }} ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.gitignore0000644000175100001770000000635214650043765014101 0ustar00runnerdocker### Python: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class tmp/ # C extensions *.so # Distribution / packaging .Python pip-wheel-metadata/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ junit/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # pyenv .python-version # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ ### https://raw.github.com/github/gitignore/master/Global/OSX.gitignore .DS_Store .AppleDouble .LSOverride # Icon must ends with two \r. Icon # Thumbnails ._* # Files that might appear on external disk .Spotlight-V100 .Trashes ### Linux: https://raw.githubusercontent.com/github/gitignore/master/Global/Linux.gitignore *~ # temporary files which can be created if a process still has a handle open of a deleted file .fuse_hidden* # KDE directory preferences .directory # Linux trash folder which might appear on any partition or disk .Trash-* # .nfs files are created when an open file is removed but is still being accessed .nfs* ### MacOS: https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore # General .DS_Store .AppleDouble .LSOverride # Icon must end with two \r Icon # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk ### Windows: https://raw.githubusercontent.com/github/gitignore/master/Global/Windows.gitignore # Windows thumbnail cache files Thumbs.db ehthumbs.db ehthumbs_vista.db # Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi *.msix *.msm *.msp # Windows shortcuts *.lnk ### VScode: https://raw.githubusercontent.com/github/gitignore/master/Global/VisualStudioCode.gitignore .vscode/* .vs/* ### Extra Python Items and DRMS Specific .hypothesis .pytest_cache docs/_build docs/api/ docs/generated docs/whatsnew/latest_changelog.txt drms/_version.py examples/**/*.asdf examples/**/*.csv examples/jsoc.stanford.edu/ jsoc.stanford.edu/ docs/sg_execution_times.rst ### Pycharm(?) .idea # Release script .github_cache # Misc Stuff .history *.orig .tmp ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.pre-commit-config.yaml0000644000175100001770000000276314650043765016374 0ustar00runnerdockerrepos: - repo: https://github.com/PyCQA/docformatter rev: v1.7.5 hooks: - id: docformatter args: [--in-place, --pre-summary-newline, --make-summary-multi] - repo: https://github.com/PyCQA/autoflake rev: v2.3.1 hooks: - id: autoflake args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$" - repo: https://github.com/astral-sh/ruff-pre-commit rev: 'v0.5.0' hooks: - id: ruff args: ['--fix', '--unsafe-fixes'] - repo: https://github.com/psf/black rev: 24.4.2 hooks: - id: black exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: check-ast - id: check-case-conflict - id: trailing-whitespace exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - id: mixed-line-ending exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - id: end-of-file-fixer exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" - id: check-yaml - id: debug-statements - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell additional_dependencies: - tomli ci: autofix_prs: false autoupdate_schedule: "quarterly" ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/.readthedocs.yml0000644000175100001770000000043714650043765015175 0ustar00runnerdockerversion: 2 build: os: ubuntu-20.04 tools: python: "3.11" apt_packages: - graphviz sphinx: builder: html configuration: docs/conf.py fail_on_warning: false python: install: - method: pip extra_requirements: - all - docs path: . ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/CHANGELOG.rst0000644000175100001770000000755714650043765014142 0ustar00runnerdocker0.8.0 (2024-07-23) ================== Backwards Incompatible Changes ------------------------------ - Increased minimum version of Python to 3.10.0 (`#116 `__) - The return from `drms.JsocInfoConstants` is now a string, there is no need to do ``.value`` on it. (`#116 `__) 0.7.1 (2023-12-28) ================== Bug Fixes --------- - Incorrect setup of the logger is now fixed. (`#113 `__) - Fixed missing environment variable in the docs. (`#113 `__) 0.7.0 (2023-11-17) ================== Backwards Incompatible Changes ------------------------------ - Dropped Python 3.8 support. (`#90 `__) - Updated all of the sphinx anchors to be more consistent. This means that any use of the old anchors (intersphinx links to sunpy doc pages) will need to be updated. (`#90 `__) - Removed ``verbose`` keyword argument from `drms.Client`. Now all prints are done via the logging module. (`#90 `__) - ``drms.const`` was renamed to `drms.JsocInfoConstants` It is also now a `Enum`. (`#90 `__) - Renamed keywords or arguments from ``requestor`` to ``requester``. (`#90 `__) - Removed ``debug`` keyword argument from `drms.HttpJsonClient` Now all prints are done via the logging module. (`#90 `__) - Removed all FTP options. (`#90 `__) - All keywords have to be passed by reference, no more positional keywords arguments are allowed. (`#90 `__) Trivial/Internal Changes ------------------------ - Added "ruff" to the pre-commit and fixed the errors. (`#90 `__) 0.6.4 (2023-06-09) ================== Bug Fixes --------- - Modified :meth:`drms.client.Client._convert_numeric_keywords` to use a row-centric approach for handling hexadecimal strings. (`#102 `__) - Modified :meth:`drms.utils.to_datetime` to work with Pandas 2.0. (`#103 `__) - Fixed pandas 2.0.0 warning. (`#97 `__) 0.6.3 (2022-10-13) ================== Bug Fixes --------- - Updated indexing in a function to prevent FutureWarnings from pandas. (`#73 `__) Trivial/Internal Changes ------------------------ - Updated the init of `drms.json.HttpJsonRequest` to raise a nicer message if the URL fails to open. (`#76 `__) 0.6.2 (2021-05-15) ================== Trivial ------- - Tidy up of internal code that has no user facing changes. 0.6.1 (2021-01-23) ================== Bug Fixes --------- - Fixed issue with downloads not having the primekeys substituted with their correct values in downloaded filenames. (`#52 `__) 0.6.0 (2020-11-01) ================== Improved Documentation ---------------------- - Examples has been formatted into an online gallery. Backwards Incompatible Changes ------------------------------ - Python 2 support has been dropped, only Python 3.7 or higher is supported. Deprecations and Removals ------------------------- - ``Client.get()`` has been removed, use :meth:`drms.client.Client.query()` instead. Support for Processing Keywords -------------------------------- - :meth:`drms.client.Client.export` now accepts a ``process`` keyword argument - This allows users to specify additional server-side processing options such as image cutouts - See the "Processing" section of the `JSOC Data Export page `__ for more information. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/CITATION.rst0000644000175100001770000000274114650043765014053 0ustar00runnerdockerAcknowledging or Citing drms ============================ If you use drms in your scientific work, we would appreciate citing it in your publications. The continued growth and development of drms is dependent on the community being aware of drms. Please add the following line within your methods, conclusion or acknowledgements sections: *This research used version X.Y.Z (software citation) of the drms open source software package (project citation).* The project citation should be to the `drms paper`_, and the software citation should be the specific `Zenodo DOI`_ for the version used in your work. Here is the Bibtex entry: .. code:: bibtex @ARTICLE{Glogowski2019, doi = {10.21105/joss.01614}, url = {https://doi.org/10.21105/joss.01614}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {40}, pages = {1614}, author = {Kolja Glogowski and Monica G. Bobra and Nitin Choudhary and Arthur B. Amezcua and Stuart J. Mumford}, title = {drms: A Python package for accessing HMI and AIA data}, journal = {Journal of Open Source Software} } You can also get this information with ``drms.__citation__``. Or as, "Glogowski et al., (2019). drms: A Python package for accessing HMI and AIA data. Journal of Open Source Software, 4(40), 1614, https://doi.org/10.21105/joss.01614." .. _drms paper: https://doi.org/10.21105/joss.01614 .. _Zenodo DOI: https://doi.org/10.5281/zenodo.3369966 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/LICENSE.rst0000644000175100001770000000243414650043765013722 0ustar00runnerdockerCopyright (c) 2013-2023 The SunPy developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/MANIFEST.in0000644000175100001770000000020114650043765013632 0ustar00runnerdockerprune paper # This subpackage is only used in development checkouts and should not be included in built tarballs prune drms/_dev ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721780225.6395478 drms-0.8.0/PKG-INFO0000644000175100001770000001137514650044002013170 0ustar00runnerdockerMetadata-Version: 2.1 Name: drms Version: 0.8.0 Summary: Access HMI, AIA and MDI data from the Standford JSOC DRMS Home-page: https://sunpy.org Author: The SunPy Community Author-email: sunpy@googlegroups.com License: BSD 2-Clause Keywords: solar physics,solar,science,data Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Science/Research Classifier: License :: OSI Approved :: BSD License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Topic :: Scientific/Engineering :: Astronomy Classifier: Topic :: Scientific/Engineering :: Physics Provides: drms Requires-Python: >=3.10 Description-Content-Type: text/x-rst License-File: LICENSE.rst Requires-Dist: numpy Requires-Dist: pandas Requires-Dist: packaging Provides-Extra: tests Requires-Dist: pytest-astropy; extra == "tests" Requires-Dist: tox; extra == "tests" Provides-Extra: docs Requires-Dist: astropy; extra == "docs" Requires-Dist: matplotlib; extra == "docs" Requires-Dist: sphinx; extra == "docs" Requires-Dist: sphinx-automodapi; extra == "docs" Requires-Dist: sphinx-changelog; extra == "docs" Requires-Dist: sphinx-copybutton; extra == "docs" Requires-Dist: sphinx-gallery; extra == "docs" Requires-Dist: sphinx-hoverxref; extra == "docs" Requires-Dist: sphinxext-opengraph; extra == "docs" Requires-Dist: sunpy-sphinx-theme; extra == "docs" Requires-Dist: importlib-resources<6; extra == "docs" Provides-Extra: dev Requires-Dist: pytest-astropy; extra == "dev" Requires-Dist: tox; extra == "dev" Requires-Dist: astropy; extra == "dev" Requires-Dist: matplotlib; extra == "dev" Requires-Dist: sphinx; extra == "dev" Requires-Dist: sphinx-automodapi; extra == "dev" Requires-Dist: sphinx-changelog; extra == "dev" Requires-Dist: sphinx-copybutton; extra == "dev" Requires-Dist: sphinx-gallery; extra == "dev" Requires-Dist: sphinx-hoverxref; extra == "dev" Requires-Dist: sphinxext-opengraph; extra == "dev" Requires-Dist: sunpy-sphinx-theme; extra == "dev" Requires-Dist: importlib-resources<6; extra == "dev" Provides-Extra: all ==== drms ==== `Docs `__ | `Tutorial `__ | `Github `__ | `PyPI `__ |JOSS| |Zenodo| .. |JOSS| image:: https://joss.theoj.org/papers/10.21105/joss.01614/status.svg :target: https://doi.org/10.21105/joss.01614 .. |Zenodo| image:: https://zenodo.org/badge/58651845.svg :target: https://zenodo.org/badge/latestdoi/58651845 The ``drms`` module provides an easy-to-use interface for accessing HMI, AIA and MDI data with Python. It uses the publicly accessible `JSOC `__ DRMS server by default, but can also be used with local `NetDRMS `__ sites. More information, including a detailed tutorial, is available in the `Documentation `__. Getting Help ------------ For more information or to ask questions about ``drms``, check out: - `drms Documentation `__ - `SunPy Chat `__ Contributing ------------ If you would like to get involved, read our `Newcomers' guide `__. Help is always welcome so let us know what you like to work on, or check out the `issues page `__ for a list of known outstanding items. Citation -------- If you use ``drms`` in your work, please cite our `paper `__. .. code-block:: bibtex @article{Glogowski2019, doi = {10.21105/joss.01614}, url = {https://doi.org/10.21105/joss.01614}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {40}, pages = {1614}, author = {Kolja Glogowski and Monica G. Bobra and Nitin Choudhary and Arthur B. Amezcua and Stuart J. Mumford}, title = {drms: A Python package for accessing HMI and AIA data}, journal = {Journal of Open Source Software} } Code of Conduct (CoC) --------------------- When you are interacting with the SunPy community you are asked to follow our `code of conduct `__. Acknowledgements ---------------- Kolja Glogowski has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/README.rst0000644000175100001770000000472414650043765013601 0ustar00runnerdocker==== drms ==== `Docs `__ | `Tutorial `__ | `Github `__ | `PyPI `__ |JOSS| |Zenodo| .. |JOSS| image:: https://joss.theoj.org/papers/10.21105/joss.01614/status.svg :target: https://doi.org/10.21105/joss.01614 .. |Zenodo| image:: https://zenodo.org/badge/58651845.svg :target: https://zenodo.org/badge/latestdoi/58651845 The ``drms`` module provides an easy-to-use interface for accessing HMI, AIA and MDI data with Python. It uses the publicly accessible `JSOC `__ DRMS server by default, but can also be used with local `NetDRMS `__ sites. More information, including a detailed tutorial, is available in the `Documentation `__. Getting Help ------------ For more information or to ask questions about ``drms``, check out: - `drms Documentation `__ - `SunPy Chat `__ Contributing ------------ If you would like to get involved, read our `Newcomers' guide `__. Help is always welcome so let us know what you like to work on, or check out the `issues page `__ for a list of known outstanding items. Citation -------- If you use ``drms`` in your work, please cite our `paper `__. .. code-block:: bibtex @article{Glogowski2019, doi = {10.21105/joss.01614}, url = {https://doi.org/10.21105/joss.01614}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {40}, pages = {1614}, author = {Kolja Glogowski and Monica G. Bobra and Nitin Choudhary and Arthur B. Amezcua and Stuart J. Mumford}, title = {drms: A Python package for accessing HMI and AIA data}, journal = {Journal of Open Source Software} } Code of Conduct (CoC) --------------------- When you are interacting with the SunPy community you are asked to follow our `code of conduct `__. Acknowledgements ---------------- Kolja Glogowski has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721780225.6275477 drms-0.8.0/changelog/0000755000175100001770000000000014650044002014013 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/changelog/README.rst0000644000175100001770000000371414650043765015526 0ustar00runnerdocker========= Changelog ========= .. note:: This README was adapted from the pytest changelog readme under the terms of the MIT licence. This directory contains "news fragments" which are short files that contain a small **ReST**-formatted text that will be added to the next ``CHANGELOG``. The ``CHANGELOG`` will be read by users, so this description should be aimed at drms users instead of describing internal changes which are only relevant to the developers. Make sure to use full sentences with correct case and punctuation, for example:: Add support for Helioprojective coordinates in `sunpy.coordinates.frames`. Please try to use Sphinx intersphinx using backticks. Each file should be named like ``.[.].rst``, where ```` is a pull request number, ``COUNTER`` is an optional number if a PR needs multiple entries with the same type and ```` is one of: * ``breaking``: A change which requires users to change code and is not backwards compatible. (Not to be used for removal of deprecated features.) * ``feature``: New user facing features and any new behavior. * ``bugfix``: Fixes a reported bug. * ``doc``: Documentation addition or improvement, like rewording an entire session or adding missing docs. * ``docfix``: Correction to existing documentation, such as fixing a typo or adding a missing input parameter. * ``removal``: Feature deprecation and/or feature removal. * ``trivial``: A change which has no user facing effect or is tiny change. So for example: ``123.feature.rst``, ``456.bugfix.rst``. If you are unsure what pull request type to use, don't hesitate to ask in your PR. Note that the ``towncrier`` tool will automatically reflow your text, so it will work best if you stick to a single paragraph, but multiple sentences and links are OK and encouraged. You can install ``towncrier`` and then run ``towncrier --draft`` if you want to get a preview of how your change will look in the final release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721780225.6275477 drms-0.8.0/docs/0000755000175100001770000000000014650044002013014 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/Makefile0000644000175100001770000001760114650043765014500 0ustar00runnerdocker# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " epub3 to make an epub3" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" @echo " dummy to check syntax errors of document sources" .PHONY: clean clean: rm -rf $(BUILDDIR)/* generated .PHONY: html html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." .PHONY: qthelp qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/drms.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/drms.qhc" .PHONY: applehelp applehelp: $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @echo "N.B. You won't be able to view it unless you put it in" \ "~/Library/Documentation/Help or install it in your application" \ "bundle." .PHONY: devhelp devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/drms" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/drms" @echo "# devhelp" .PHONY: epub epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: epub3 epub3: $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 @echo @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." .PHONY: latex latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." .PHONY: latexpdf latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: latexpdfja latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: text text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." .PHONY: info info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." .PHONY: gettext gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." .PHONY: changes changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." .PHONY: linkcheck linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." .PHONY: doctest doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." .PHONY: coverage coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." .PHONY: xml xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." .PHONY: dummy dummy: $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy @echo @echo "Build finished. Dummy builder generates no files." ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/api.rst0000644000175100001770000000015114650043765014333 0ustar00runnerdocker.. _drms-api-reference: ************* API Reference ************* .. automodapi:: drms :no-heading: ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/citation.rst0000644000175100001770000000006614650043765015401 0ustar00runnerdocker.. _drms-citation: .. include:: ../drms/CITATION.rst ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/conf.py0000644000175100001770000000754114650043765014341 0ustar00runnerdocker""" Configuration file for the Sphinx documentation builder. """ import os import datetime from pathlib import Path from sunpy_sphinx_theme import PNG_ICON from drms import __version__ # -- Project information ----------------------------------------------------- project = "drms" author = "The SunPy Project" copyright = f"{datetime.datetime.now().year}, {author}" # NOQA: A001 # The full version, including alpha/beta/rc tags release = __version__ is_development = ".dev" in __version__ # -- General configuration --------------------------------------------------- extensions = [ "hoverxref.extension", "sphinx_copybutton", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", "sphinx_changelog", "sphinx_gallery.gen_gallery", "sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.doctest", "sphinx.ext.inheritance_diagram", "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", ] automodapi_toctreedirnm = "generated/api" exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] source_suffix = ".rst" master_doc = "index" default_role = "obj" # -- Options for hoverxref ----------------------------------------------------- if os.environ.get("READTHEDOCS"): hoverxref_api_host = "https://readthedocs.org" if os.environ.get("PROXIED_API_ENDPOINT"): # Use the proxied API endpoint # - A RTD thing to avoid a CSRF block when docs are using a # custom domain hoverxref_api_host = "/_" hoverxref_tooltip_maxwidth = 600 # RTD main window is 696px hoverxref_auto_ref = True hoverxref_mathjax = True hoverxref_domains = ["py"] hoverxref_role_types = { # roles with py domain "attr": "tooltip", "class": "tooltip", "const": "tooltip", "data": "tooltip", "exc": "tooltip", "func": "tooltip", "meth": "tooltip", "mod": "tooltip", "obj": "tooltip", # roles with std domain "confval": "tooltip", "hoverxref": "tooltip", "ref": "tooltip", "term": "tooltip", } # -- Options for sphinx-copybutton --------------------------------------------- # Python Repl + continuation, Bash, ipython and qtconsole + continuation, jupyter-console + continuation copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: " copybutton_prompt_is_regexp = True # -- Options for intersphinx extension --------------------------------------- intersphinx_mapping = { "python": ( "https://docs.python.org/3/", (None, "http://www.astropy.org/astropy-data/intersphinx/python3.inv"), ), "numpy": ( "https://numpy.org/doc/stable/", (None, "http://www.astropy.org/astropy-data/intersphinx/numpy.inv"), ), "scipy": ( "https://docs.scipy.org/doc/scipy/reference/", (None, "http://www.astropy.org/astropy-data/intersphinx/scipy.inv"), ), "matplotlib": ("https://matplotlib.org/stable", None), "astropy": ("https://docs.astropy.org/en/stable/", None), "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), "sunpy": ("https://docs.sunpy.org/en/stable/", None), } # -- Options for HTML output ------------------------------------------------- # JSOC email os env # see https://github.com/sunpy/sunpy/wiki/Home:-JSOC os.environ["JSOC_EMAIL"] = "jsoc@sunpy.org" graphviz_output_format = "svg" sphinx_gallery_conf = { "backreferences_dir": Path("generated") / "modules", "filename_pattern": "^((?!skip_).)*$", "examples_dirs": Path("..") / "examples", "within_subsection_order": "ExampleTitleSortKey", "gallery_dirs": Path("generated") / "gallery", "default_thumb_file": PNG_ICON, "abort_on_example_error": False, "plot_gallery": "True", "remove_config_comments": True, "doc_module": ("sunpy"), "only_warn_on_example_error": True, "matplotlib_animations": True, } ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/index.rst0000644000175100001770000000066314650043765014701 0ustar00runnerdocker.. _drms-index: ********************** ``drms`` documentation ********************** :Github: https://github.com/sunpy/drms :PyPI: https://pypi.org/project/drms/ Python library for accessing HMI, AIA and MDI data from the Joint Science Operations Center (JSOC) or other Data Record Management System (DRMS) servers. .. toctree:: :maxdepth: 2 intro tutorial api generated/gallery/index citation whatsnew/index ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/intro.rst0000644000175100001770000000401014650043765014713 0ustar00runnerdocker.. _drms-introduction: ************ Introduction ************ The ``drms`` Python package can be used to access HMI, AIA and MDI data which are stored in a DRMS database system. DRMS stands for *Data Record Management System* and is a system that was developed by the `Joint Science Operation Center `__ (JSOC), headquartered at Stanford University, to handle the data produced by the AIA and HMI instruments aboard the `Solar Dynamics Observatory `__ spacecraft. By default the ``drms`` library uses the HTTP/JSON interface provided by JSOC and has similar functionality to the `JSOC Lookdata `__ website. It can be used to query metadata, submit data export requests and download data files. This module also works well for local `NetDRMS `__ sites, as long as the site runs a web server providing the needed CGI programs ``show_series`` and ``jsoc_info`` (for the data export functionality, additional CGIs, like ``jsoc_fetch``, are needed). Installation ============ If you are using `miniforge`_ (which is conda but using the conda-forge channel): .. code-block:: bash conda install drms Otherwise the ``drms`` Python package can be installed from `PyPI`_ using: .. code-block:: bash pip install drms .. note:: If you do not use a Python distribution, like `miniforge`_, and did not create an isolated Python environment using `Virtualenv`_, you might need to add ``--user`` to the ``pip`` command: .. code-block:: bash pip install --user drms .. _PyPI: https://pypi.org/project/drms/ .. _conda-forge: https://anaconda.org/conda-forge/drms .. _miniforge: https://github.com/conda-forge/miniforge#miniforge3 .. _Virtualenv: https://virtualenv.pypa.io/en/latest/ Acknowledgements ================ Kolja Glogowski has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/rtd_requirements.txt0000644000175100001770000000000014650043765017156 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721780213.0 drms-0.8.0/docs/tutorial.rst0000644000175100001770000004351214650043765015435 0ustar00runnerdocker.. _drms-tutorial: ******** Tutorial ******** This tutorial gives an introduction on how to use the ``drms`` Python library. More detailed information on the different classes and functions can be found in the :ref:`API Reference `. Basic usage =========== We start with looking at data series that are available from `JSOC `__ and perform some basic DRMS queries to obtain keyword data (metadata) and segment file (data) locations. This is essentially what you can do on the `JSOC Lookdata `__ website. To be able to access the JSOC DRMS from Python, we first need to import the ``drms`` module and create an instance of the `~drms.client.Client` class: .. code-block:: python >>> import drms >>> client = drms.Client() # doctest: +REMOTE_DATA All available data series can be now retrieved by calling :meth:`drms.client.Client.series`. HMI series names start with ``"hmi."``, AIA series names with ``"aia."`` and the names of MDI series with ``"mdi."``. The first (optional) parameter of this method takes a regular expression that allows you to filter the result. If for example, you want to obtain a list of HMI series, with a name that start with the string ``"m_"``, you can write: .. code-block:: python >>> client.series(r'hmi\.m_') # doctest: +REMOTE_DATA ['hmi.M_45s', 'hmi.M_45s_dcon', 'hmi.M_720s', 'hmi.M_720s_dcon', 'hmi.M_720s_dconS', 'hmi.m_720s_mod', 'hmi.m_720s_nrt'] Keep in mind to escape the dot character (``'.'``), like it is shown in the example above, if you want to include it in your filter string. Also note that series names are handled in a case-insensitive way. DRMS records can be selected by creating a query string that contains a series name, followed by one or more fields, which are surrounded by square brackets. Each of those fields corresponds to a specific primekey, that is specified in the series definition. A complete set of primekeys represents a unique identifier for a record in that particular series. For more detailed information on building record set queries, including additional non-primekey fields, see the `JSOC Help `__ page about this. With the ``drms`` module you can use :meth:`drms.client.Client.pkeys` to obtain a list of all primekeys of a series: .. code-block:: python >>> client.pkeys('hmi.m_720s') # doctest: +REMOTE_DATA ['T_REC', 'CAMERA'] >>> client.pkeys('hmi.v_sht_modes') # doctest: +REMOTE_DATA ['T_START', 'LMIN', 'LMAX', 'NDT'] A list of all (regular) keywords can be obtained using :meth:`drms.client.Client.keys`. You can also use :meth:`drms.client.Client.info` to get more detailed information about a series: .. code-block:: python >>> series_info = client.info('hmi.v_avg120') # doctest: +REMOTE_DATA >>> series_info.segments # doctest: +REMOTE_DATA type units protocol dims note name mean short m/s fits 4096x4096 Doppler mean power short m2/s2 fits 4096x4096 Doppler power valid short NA fits 4096x4096 valid pixel count Log char NA generic run log All table-like structures, returned by routines in the ``drms`` module, are `Pandas DataFrames `__. If you are new to `Pandas `__, you should have a look at the introduction to `Pandas Data Structures `__. Record set queries, used to obtain keyword data and get the location of data segments, can be performed using :meth:`drms.client.Client.query`. To get, for example, the record time and the mean value for some of the HMI Dopplergrams that were recorded on April 1, 2016, together with the spacecraft's radial velocity in respect to the Sun, you can write: .. code-block:: python >>> query = client.query('hmi.v_45s[2016.04.01_TAI/1d@6h]', ... key='T_REC, DATAMEAN, OBS_VR') # doctest: +REMOTE_DATA >>> query # doctest: +REMOTE_DATA T_REC DATAMEAN OBS_VR 0 2016.04.01_00:00:00_TAI 3313.104980 3309.268006 1 2016.04.01_06:00:00_TAI 878.075195 887.864139 2 2016.04.01_12:00:00_TAI -2289.062500 -2284.690263 3 2016.04.01_18:00:00_TAI 128.609283 137.836168 JSOC time strings can be converted to a naive `~datetime.datetime` representation using :meth:`drms.utils.to_datetime`: .. code-block:: python >>> timestamps = drms.to_datetime(query.T_REC) # doctest: +REMOTE_DATA >>> timestamps # doctest: +REMOTE_DATA 0 2016-04-01 00:00:00 1 2016-04-01 06:00:00 2 2016-04-01 12:00:00 3 2016-04-01 18:00:00 Name: T_REC, dtype: datetime64[ns] For most of the HMI and MDI data sets, the `TAI `__ time standard is used which, in contrast to `UTC `__, does not make use of any leap seconds. The TAI standard is currently not supported by the Python standard libraries. If you need to convert timestamps between TAI and UTC, you can use `Astropy `__: .. code-block:: python >>> from astropy.time import Time >>> start_time = Time(timestamps[0], format='datetime', scale='tai') # doctest: +REMOTE_DATA >>> start_time # doctest: +REMOTE_DATA