././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1621093703.2034578 drms-0.6.2/0000755000175100001710000000000000000000000012752 5ustar00vstsdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/.readthedocs.yml0000644000175100001710000000050200000000000016035 0ustar00vstsdocker00000000000000# readthedocs.yml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details version: 2 sphinx: builder: html configuration: docs/conf.py fail_on_warning: true python: install: - method: pip extra_requirements: - dev path: . ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/CHANGELOG.rst0000644000175100001710000000216600000000000015000 0ustar00vstsdocker000000000000000.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. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/CITATION.rst0000644000175100001710000000274100000000000014722 0ustar00vstsdocker00000000000000Acknowledging 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 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/LICENSE.rst0000644000175100001710000000243400000000000014571 0ustar00vstsdocker00000000000000Copyright (c) 2013-2021 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. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/MANIFEST.in0000644000175100001710000000110400000000000014504 0ustar00vstsdocker00000000000000# Exclude specific files # All files which are tracked by git and not explicitly excluded here are included by setuptools_scm exclude .codecov.yaml exclude .mailmap exclude .editorconfig exclude .gitattributes exclude .gitignore exclude .pep8speaks.yml exclude .pre-commit-config.yaml exclude .test_package_pins.txt exclude .zenodo.json exclude azure-pipelines.yml exclude readthedocs.yml exclude rtd-environment.yml # Prune folders prune paper prune changelog # This subpackage is only used in development checkouts and should not be included in built tarballs prune drms/_dev ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1621093703.2034578 drms-0.6.2/PKG-INFO0000644000175100001710000001143600000000000014054 0ustar00vstsdocker00000000000000Metadata-Version: 2.1 Name: drms Version: 0.6.2 Summary: "Access HMI, AIA and MDI data with Python from the public JSOC DRMS server" Home-page: https://sunpy.org Author: The SunPy Community Author-email: sunpy@googlegroups.com License: BSD 2-Clause Description: ==== 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 ------------ This is a SunPy-affiliated package. For more information or to ask questions about drms or SunPy, check out: - `drms Documentation`_ - `SunPy Matrix Channel`_ - `SunPy mailing list`_ .. _drms Documentation: https://docs.sunpy.org/projects/drms/en/latest/ .. _SunPy Matrix Channel: https://riot.im/app/#/room/#sunpy:matrix.org Contributing ------------ If you would like to get involved, start by joining the `SunPy mailing list`_ and check out the `Developers Guide`_ section of the SunPy docs. Stop by our chat room `#sunpy:matrix.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 and to DRMS, please read our `Newcomers guide`_. .. _SunPy mailing list: https://groups.google.com/forum/#!forum/sunpy .. _Developers Guide: https://docs.sunpy.org/en/latest/dev_guide/index.html .. _`#sunpy:matrix.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/newcomers.html Code of Conduct (CoC) --------------------- When you are interacting with the SunPy community you are asked to follow our `code of conduct`_. .. _code of conduct: https://docs.sunpy.org/en/latest/code_of_conduct.html Citation -------- If you use ``drms`` in your work, please consider citing our `paper`_. .. 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} } .. _paper: https://doi.org/10.21105/joss.01614 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. 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.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Topic :: Scientific/Engineering :: Astronomy Classifier: Topic :: Scientific/Engineering :: Physics Provides: drms Requires-Python: >=3.7 Description-Content-Type: text/x-rst Provides-Extra: tests Provides-Extra: docs Provides-Extra: dev Provides-Extra: all ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/README.rst0000644000175100001710000000614300000000000014445 0ustar00vstsdocker00000000000000==== 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 ------------ This is a SunPy-affiliated package. For more information or to ask questions about drms or SunPy, check out: - `drms Documentation`_ - `SunPy Matrix Channel`_ - `SunPy mailing list`_ .. _drms Documentation: https://docs.sunpy.org/projects/drms/en/latest/ .. _SunPy Matrix Channel: https://riot.im/app/#/room/#sunpy:matrix.org Contributing ------------ If you would like to get involved, start by joining the `SunPy mailing list`_ and check out the `Developers Guide`_ section of the SunPy docs. Stop by our chat room `#sunpy:matrix.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 and to DRMS, please read our `Newcomers guide`_. .. _SunPy mailing list: https://groups.google.com/forum/#!forum/sunpy .. _Developers Guide: https://docs.sunpy.org/en/latest/dev_guide/index.html .. _`#sunpy:matrix.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/newcomers.html Code of Conduct (CoC) --------------------- When you are interacting with the SunPy community you are asked to follow our `code of conduct`_. .. _code of conduct: https://docs.sunpy.org/en/latest/code_of_conduct.html Citation -------- If you use ``drms`` in your work, please consider citing our `paper`_. .. 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} } .. _paper: https://doi.org/10.21105/joss.01614 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. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/conftest.py0000644000175100001710000000451000000000000015151 0ustar00vstsdocker00000000000000from urllib.error import URLError, HTTPError from urllib.request import urlopen import pytest import drms # Test URLs, used to check if a online site is reachable jsoc_testurl = 'http://jsoc.stanford.edu/' kis_testurl = 'http://drms.leibniz-kis.de/' def pytest_addoption(parser): parser.addoption('--email', help='Export email address') class lazily_cached: """ Lazily evaluted function call with cached result. """ def __init__(self, f, *args, **kwargs): self.func = lambda: f(*args, **kwargs) def __call__(self): if not hasattr(self, 'result'): self.result = self.func() return self.result def site_reachable(url, timeout=15): """ Checks if the given URL is accessible. """ try: urlopen(url, timeout=timeout) except (URLError, HTTPError): return False return True # Create lazily evaluated, cached site checks for JSOC and KIS. jsoc_reachable = lazily_cached(site_reachable, jsoc_testurl) kis_reachable = lazily_cached(site_reachable, kis_testurl) def pytest_runtest_setup(item): # Skip JSOC online site tests if the site is not reachable. if item.get_closest_marker('jsoc') is not None: if not jsoc_reachable(): pytest.skip('JSOC is not reachable') # Skip KIS online site tests if the site is not reachable. if item.get_closest_marker('kis') is not None: if not kis_reachable(): pytest.skip('KIS is not reachable') # Skip export tests if no email address was specified. if item.get_closest_marker('export') is not None: email = item.config.getoption('email') if email is None: pytest.skip('No email address specified; use the --email option to enable export tests') @pytest.fixture def email(request): """ Email address from --email command line option. """ return request.config.getoption('--email') @pytest.fixture def jsoc_client(): """ Client fixture for JSOC online tests, does not use email. """ return drms.Client('jsoc') @pytest.fixture def jsoc_client_export(email): """ Client fixture for JSOC online tests, uses email if specified. """ return drms.Client('jsoc', email=email) @pytest.fixture def kis_client(): """ Client fixture for KIS online tests. """ return drms.Client('kis') ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1621093703.195458 drms-0.6.2/docs/0000755000175100001710000000000000000000000013702 5ustar00vstsdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/Makefile0000644000175100001710000001760100000000000015347 0ustar00vstsdocker00000000000000# 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." ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/citation.rst0000644000175100001710000000006100000000000016243 0ustar00vstsdocker00000000000000.. _citation: .. include:: ../drms/CITATION.rst ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1621093703.195458 drms-0.6.2/docs/code_ref/0000755000175100001710000000000000000000000015450 5ustar00vstsdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/code_ref/index.rst0000644000175100001710000000031400000000000017307 0ustar00vstsdocker00000000000000.. _reference: ************* API Reference ************* .. automodapi:: drms.client .. automodapi:: drms.config .. automodapi:: drms.exceptions .. automodapi:: drms.json .. automodapi:: drms.utils ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/conf.py0000644000175100001710000001061700000000000015206 0ustar00vstsdocker00000000000000# # 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 # -- Project information ----------------------------------------------------- import os from drms import __version__ project = 'drms' copyright = '2021, The SunPy Developers' author = 'The SunPy Developers' # The full version, including alpha/beta/rc tags release = __version__ is_development = '.dev' in __version__ # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx_automodapi.automodapi', 'sphinx_automodapi.smart_resolver', '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', 'sphinx_changelog', ] numpydoc_show_class_members = False # 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. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: source_suffix = '.rst' # The master toctree document. master_doc = 'index' # The reST default role (used for this markup: `text`) to use for all # documents. Set to the "smart" one. default_role = 'obj' # Enable nitpicky mode, which forces links to be non-broken nitpicky = True nitpick_ignore = [ ('py:obj', 'numpy.datetime64'), # See https://github.com/numpy/numpy/issues/10039 ] # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/3/', (None, 'http://data.astropy.org/intersphinx/python3.inv'),), 'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None), 'numpy': ('https://docs.scipy.org/doc/numpy/', (None, 'http://data.astropy.org/intersphinx/numpy.inv'),), 'scipy': ( 'https://docs.scipy.org/doc/scipy/reference/', (None, 'http://data.astropy.org/intersphinx/scipy.inv'), ), 'matplotlib': ('https://matplotlib.org/', (None, 'http://data.astropy.org/intersphinx/matplotlib.inv'),), 'astropy': ('http://docs.astropy.org/en/stable/', None), 'sunpy': ('https://docs.sunpy.org/en/stable/', None), } # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. try: from sunpy_sphinx_theme.conf import * except ImportError: html_theme = 'default' # JSOC email os env os.environ["JSOC_EMAIL"] = "jsoc@cadair.com" # 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'] # 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', ] # -- Sphinx Gallery ------------------------------------------------------------ from sphinx_gallery.sorting import ExampleTitleSortKey sphinx_gallery_conf = { 'backreferences_dir': os.path.join('generated', 'modules'), 'filename_pattern': '^((?!skip_).)*$', 'examples_dirs': os.path.join('..', 'examples'), 'within_subsection_order': ExampleTitleSortKey, 'gallery_dirs': os.path.join('generated', 'gallery'), # Comes from the theme. 'default_thumb_file': os.path.join(html_static_path[0], 'img', 'sunpy_icon_128x128.png'), 'abort_on_example_error': False, 'only_warn_on_example_error': True, 'plot_gallery': True, 'remove_config_comments': True, 'doc_module': ('sunpy'), } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/index.rst0000644000175100001710000000047600000000000015552 0ustar00vstsdocker00000000000000################## drms documentation ################## :Github: https://github.com/sunpy/drms :PyPI: https://pypi.python.org/pypi/drms Python library for accessing HMI, AIA and MDI data. .. toctree:: :maxdepth: 2 intro tutorial generated/gallery/index code_ref/index citation whatsnew/index ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/intro.rst0000644000175100001710000000410600000000000015570 0ustar00vstsdocker00000000000000Introduction ============ 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). Requirements ------------ The ``drms`` module supports Python 3.7 or newer. It requires the following Python packages: - numpy - pandas Installation ------------ If you are using `Anaconda`_, it is recommended to use the `conda-forge`_ package:: conda config --append channels conda-forge conda install drms Otherwise the ``drms`` Python package can be installed from `PyPI`_ using:: pip install drms .. note:: If you do not use a Python distribution, like `Anaconda`_, and did not create an isolated Python environment using `Virtualenv`_, you might need to add ``--user`` to the ``pip`` command:: pip install --user drms .. _PyPI: https://pypi.python.org/pypi/drms .. _conda-forge: https://anaconda.org/conda-forge/drms .. _Anaconda: https://www.anaconda.com/distribution/ .. _Virtualenv: https://virtualenv.pypa.io 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. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/rtd_requirements.txt0000644000175100001710000000000000000000000020025 0ustar00vstsdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1621093688.0 drms-0.6.2/docs/tutorial.rst0000644000175100001710000004202100000000000016276 0ustar00vstsdocker00000000000000.. _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 ----------- In this first part, 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:: >>> import drms >>> client = drms.Client() # doctest: +REMOTE_DATA All available data series can be now retrieved by calling the :meth:`drms.client.Client.series` method. 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 you, for example, want to obtain a list of HMI series, with a name that start with the string ``"m_"``, you can write:: >>> 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 topiclient. With the ``drms`` module you can use the :meth:`drms.client.Client.pkeys` method to obtain a list of all primekeys of a series, e.g.:: >>> 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 the method :meth:`drms.client.Client.info` to get more detailed information about a series, e.g.:: >>> si = client.info('hmi.v_avg120') # doctest: +REMOTE_DATA >>> si.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 the :meth:`drms.client.Client.query` method. 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:: >>> k = client.query('hmi.v_45s[2016.04.01_TAI/1d@6h]', ... key='T_REC, DATAMEAN, OBS_VR') # doctest: +REMOTE_DATA >>> k # 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`` representation using the :meth:`drms.utils.to_datetime` utility function:: >>> t = drms.to_datetime(k.T_REC) # doctest: +REMOTE_DATA >>> t # 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 the `Astropy `__ time module:: >>> from astropy.time import Time >>> ta = Time(t[0], format='datetime', scale='tai') # doctest: +REMOTE_DATA >>> ta # doctest: +REMOTE_DATA