././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1781101775.5049925 drms-0.9.1/0000755000175100017510000000000015212272320012130 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/.black0000644000175100017510000000027415212272305013213 0ustar00runnerrunnertarget-version = ['py310'] exclude = ''' ( /( \.eggs | \.git | \.mypy_cache | \.tox | \.venv | _build | build | dist | docs | .history )/ ) ''' ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/.codespellrc0000644000175100017510000000045415212272305014436 0ustar00runnerrunner[codespell] skip = *.asdf,*.fits,*.fts,*.header,*.json,*.xsh,*cache*,*egg*,*extern*,.git,.idea,.tox,_build,*truncated,*.svg,.asv_env,.history ignore-words-list = afile, alog, nd, nin, observ, ot, precess precessed, requestor, sav, te, upto, parms, ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/.editorconfig0000644000175100017510000000041115212272305014604 0ustar00runnerrunner# 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=1781101765.0 drms-0.9.1/.flake80000644000175100017510000000101415212272305013302 0ustar00runnerrunner[flake8] ignore = # missing-whitespace-around-operator E225 # missing-whitespace-around-arithmetic-operator E226 # line-too-long E501 # unused-import F401 # undefined-local-with-import-star F403 # redefined-while-unused F811 # Line break occurred before a binary operator W503, # Line break occurred after a binary operator W504 max-line-length = 110 exclude = .git __pycache__ docs/conf.py build drms/__init__.py rst-directives = plot ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/.gitattributes0000644000175100017510000000012315212272305015022 0ustar00runnerrunner*fits binary *fit binary *fts binary *fit.gz binary *fits.gz binary *fts.gz binary ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/158.breaking.rst0000644000175100017510000000021115212272305014755 0ustar00runnerrunnerIncreased minimum version of Python to 3.12. Increased minimum version of NumPy to 1.26.0. Increased minimum version of pandas to 2.2.0. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/CHANGELOG.rst0000644000175100017510000001064115212272305014156 0ustar00runnerrunnerv0.9.1 (2026-06-10) =================== Bug Fixes --------- - Fixed a bug in parsing of hexadecimal columns. (`#169 `__) Documentation ------------- - Added export status codes to docstring of `drms.ExportResult.status`. (`#156 `__) 0.9.0 (2025-02-05) ================== New Features ------------ - Added timeout keyword to :meth:`drms.client.ExportRequest.download` which also will use the socket value, if it is set. (`#137 `__) 0.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=1781101765.0 drms-0.9.1/CITATION.rst0000644000175100017510000000274115212272305014103 0ustar00runnerrunnerAcknowledging 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=1781101765.0 drms-0.9.1/LICENSE.rst0000644000175100017510000000243415212272305013752 0ustar00runnerrunnerCopyright (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=1781101765.0 drms-0.9.1/MANIFEST.in0000644000175100017510000000102715212272305013671 0ustar00runnerrunner# Exclude specific files # All files which are tracked by git and not explicitly excluded here are included by setuptools_scm exclude .codecov.yaml exclude .coveragerc exclude .cruft.json exclude .gitignore exclude .isort.cfg exclude .pre-commit-config.yaml exclude .readthedocs.yaml exclude .rtd-environment.yml exclude .ruff.toml # Prune folders prune .github prune build prune changelog global-exclude *.pyc *.o # This subpackage is only used in development checkouts # and should not be included in built tarballs prune drms/_dev ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1781101775.5049586 drms-0.9.1/PKG-INFO0000644000175100017510000001202115212272320013221 0ustar00runnerrunnerMetadata-Version: 2.4 Name: drms Version: 0.9.1 Summary: Access HMI, AIA and MDI data from the Standford JSOC DRMS Author-email: The SunPy Community Project-URL: Homepage, https://sunpy.org Project-URL: Source Code, https://github.com/sunpy/drms Project-URL: Download, https://pypi.org/project/sunpy Project-URL: Documentation, https://docs.sunpy.org/projects/drms Project-URL: Changelog, https://docs.sunpy.org/projects/drms/en/stable/whatsnew/changelog.html Project-URL: Issue Tracker, https://github.com/sunpy/drms/issues Requires-Python: >=3.12 Description-Content-Type: text/x-rst Requires-Dist: numpy>=1.26.0 Requires-Dist: pandas>=2.2.0 Provides-Extra: tests Requires-Dist: astropy; extra == "tests" Requires-Dist: pytest; extra == "tests" Requires-Dist: pytest-astropy; extra == "tests" Requires-Dist: pytest-doctestplus; extra == "tests" Requires-Dist: pytest-cov; extra == "tests" Requires-Dist: pytest-xdist; extra == "tests" Provides-Extra: docs Requires-Dist: sphinx; extra == "docs" Requires-Dist: sphinx-automodapi; extra == "docs" Requires-Dist: sunpy-sphinx-theme; extra == "docs" Requires-Dist: packaging; extra == "docs" Requires-Dist: astropy; extra == "docs" Requires-Dist: matplotlib; 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" ``drms`` ======== Access HMI, AIA and MDI data from the Standford JSOC 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 `__ Usage of Generative AI ---------------------- We expect authentic engagement in our community. **Do not post the output from Large Language Models or similar generative AI as code, issues or comments on GitHub or any other platform.** If you use generative AI tools as an aid in developing code or documentation changes, ensure that you fully understand the proposed changes and can explain why they are the correct approach and an improvement to the current state. For more information see our documentation on fair and appropriate `AI usage `__. Contributing ------------ We love contributions! drms is open source, built on open source, and we'd love to have you hang out in our community. If you would like to get involved, check out the `Developers Guide`_ section of the SunPy docs. Stop by our chat room `#sunpy:openastronomy.org`_ if you have any questions. Help is always welcome so let us know what you like to work on, or check out the `issues page`_ for the list of known outstanding items. For more information on contributing to SunPy, please read our `Newcomers' guide`_. .. _Developers Guide: https://docs.sunpy.org/en/latest/dev_guide/index.html .. _`#sunpy:openastronomy.org`: https://app.element.io/#/room/#sunpy:openastronomy.org .. _issues page: https://github.com/sunpy/drms/issues .. _Newcomers' guide: https://docs.sunpy.org/en/latest/dev_guide/contents/newcomers.html When you are interacting with the SunPy community you are asked at to follow our `code of conduct `__. 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} } 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=1781101765.0 drms-0.9.1/README.rst0000644000175100017510000000707115212272305013627 0ustar00runnerrunner``drms`` ======== Access HMI, AIA and MDI data from the Standford JSOC 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 `__ Usage of Generative AI ---------------------- We expect authentic engagement in our community. **Do not post the output from Large Language Models or similar generative AI as code, issues or comments on GitHub or any other platform.** If you use generative AI tools as an aid in developing code or documentation changes, ensure that you fully understand the proposed changes and can explain why they are the correct approach and an improvement to the current state. For more information see our documentation on fair and appropriate `AI usage `__. Contributing ------------ We love contributions! drms is open source, built on open source, and we'd love to have you hang out in our community. If you would like to get involved, check out the `Developers Guide`_ section of the SunPy docs. Stop by our chat room `#sunpy:openastronomy.org`_ if you have any questions. Help is always welcome so let us know what you like to work on, or check out the `issues page`_ for the list of known outstanding items. For more information on contributing to SunPy, please read our `Newcomers' guide`_. .. _Developers Guide: https://docs.sunpy.org/en/latest/dev_guide/index.html .. _`#sunpy:openastronomy.org`: https://app.element.io/#/room/#sunpy:openastronomy.org .. _issues page: https://github.com/sunpy/drms/issues .. _Newcomers' guide: https://docs.sunpy.org/en/latest/dev_guide/contents/newcomers.html When you are interacting with the SunPy community you are asked at to follow our `code of conduct `__. 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} } 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=1781101775.4960363 drms-0.9.1/docs/0000755000175100017510000000000015212272317013066 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/docs/Makefile0000644000175100017510000001760115212272305014530 0ustar00runnerrunner# 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=1781101765.0 drms-0.9.1/docs/api.rst0000644000175100017510000000015115212272305014363 0ustar00runnerrunner.. _drms-api-reference: ************* API Reference ************* .. automodapi:: drms :no-heading: ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/docs/citation.rst0000644000175100017510000000006615212272305015431 0ustar00runnerrunner.. _drms-citation: .. include:: ../drms/CITATION.rst ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/docs/conf.py0000644000175100017510000001502315212272305014363 0ustar00runnerrunner# Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config import os import datetime from pathlib import Path from sunpy_sphinx_theme import PNG_ICON from packaging.version import Version # -- Project information ----------------------------------------------------- # The full version, including alpha/beta/rc tags from drms import __version__ _version = Version(__version__) version = release = str(_version) # Avoid "post" appearing in version string in rendered docs if _version.is_postrelease: version = release = _version.base_version # Avoid long githashes in rendered Sphinx docs elif _version.is_devrelease: version = release = f"{_version.base_version}.dev{_version.dev}" is_development = _version.is_devrelease is_release = not (_version.is_prerelease or _version.is_devrelease) project = "drms" author = "The SunPy Community" copyright = f"{datetime.datetime.now().year}, {author}" # noqa: A001 # -- General configuration --------------------------------------------------- # Wrap large function/method signatures maximum_signature_line_length = 80 # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named "sphinx.ext.*") or your custom # ones. extensions = [ # TODO: Re-enable this, it was failing the doc build # "hoverxref.extension", "sphinx_copybutton", "sphinx_gallery.gen_gallery", "sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.doctest", "sphinx.ext.inheritance_diagram", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", "sphinx.ext.mathjax", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", "sphinx_changelog", ] # Add any paths that contain templates here, relative to this directory. # templates_path = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. automodapi_toctreedirnm = "generated/api" exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The suffix(es) of source filenames. source_suffix = {".rst": "restructuredtext"} # The master toctree document. master_doc = "index" # Treat everything in single ` as a Python reference. default_role = "py:obj" # -- 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 ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "sunpy" # Render inheritance diagrams in SVG graphviz_output_format = "svg" graphviz_dot_args = [ "-Nfontsize=10", "-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif", "-Efontsize=10", "-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif", "-Gfontsize=10", "-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif", ] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ["_static"] # By default, when rendering docstrings for classes, sphinx.ext.autodoc will # make docs with the class-level docstring and the class-method docstrings, # but not the __init__ docstring, which often contains the parameters to # class constructors across the scientific Python ecosystem. The option below # will append the __init__ docstring to the class-level docstring when rendering # the docs. For more options, see: # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content autoclass_content = "both" # -- Other options ---------------------------------------------------------- # JSOC email os env # see https://github.com/sunpy/sunpy/wiki/Home:-JSOC os.environ["JSOC_EMAIL"] = "jsoc@sunpy.org" # -- 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 # -- Sphinx Gallery ------------------------------------------------------------ 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=1781101765.0 drms-0.9.1/docs/index.rst0000644000175100017510000000071215212272305014724 0ustar00runnerrunner.. _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 :caption: Contents: intro tutorial api generated/gallery/index citation whatsnew/index ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/docs/intro.rst0000644000175100017510000000401015212272305014743 0ustar00runnerrunner.. _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=1781101765.0 drms-0.9.1/docs/make.bat0000644000175100017510000000143315212272305014471 0ustar00runnerrunner@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% :end popd ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/docs/rtd_requirements.txt0000644000175100017510000000000015212272305017206 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1781101765.0 drms-0.9.1/docs/tutorial.rst0000644000175100017510000004314315212272305015465 0ustar00runnerrunner.. _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_sht_2drls') # doctest: +REMOTE_DATA >>> series_info.segments # doctest: +REMOTE_DATA type units protocol dims note name split string none generic calculated splittings rot string none generic rotation profile err string none generic errors mesh string none generic radial grid points parms string none generic input parameters log string none generic standard output 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[us] 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