drms-0.5.7/0000755000175000017500000000000013525573717012731 5ustar koljakolja00000000000000drms-0.5.7/AUTHORS.txt0000644000175000017500000000027013432321514014575 0ustar koljakolja00000000000000Maintainer and project lead: - Kolja Glogowski Contributors: - Monica Bobra - Arthur Amezcua - David Perez-Suarez - Nitin Choudhary - Stuart Mumford - Nabil Freij drms-0.5.7/LICENSE.txt0000644000175000017500000000210513525570236014543 0ustar koljakolja00000000000000Copyright (c) 2014-2019 Kolja Glogowski and others (see AUTHORS.txt) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. drms-0.5.7/MANIFEST.in0000644000175000017500000000046713432237547014471 0ustar koljakolja00000000000000include MANIFEST.in include *.txt *.md *.rst include setup.py setup.cfg include tox.ini include versioneer.py recursive-include drms *.py recursive-include examples *.py recursive-include doc * prune doc/build prune doc/generated prune */__pycache__ global-exclude *.pyc *~ *.bak *.swp include drms/_version.py drms-0.5.7/PKG-INFO0000644000175000017500000001421113525573717014025 0ustar koljakolja00000000000000Metadata-Version: 1.1 Name: drms Version: 0.5.7 Summary: Access HMI, AIA and MDI data with Python Home-page: https://github.com/sunpy/drms Author: Kolja Glogowski Author-email: "Kolja Glogowski" License: MIT Description: ==== drms ==== `Docs `_ | `Tutorial `_ | `Github `_ | `PyPI `_ .. 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 `_. Requirements ------------ The ``drms`` module supports Python 2.7 and Python 3.4 or newer. It requires the following Python packages: - NumPy, version 1.9.0 or newer - Pandas, version 0.15.0 or newer - Six, version 1.8.0 or newer The module might also work with earlier versions, but it has not been tested with any versions older than the ones listed above. 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 Running Tests ------------- In order to run any unit tests, `pytest`_ needs to be installed. Basic tests for the currently installed ``drms`` package can be run using:: python -m drms.tests To perform online tests against the JSOC servers, use the ``--run-jsoc`` flag:: python -m drms.tests --run-jsoc To also include additional email verification and JSOC export tests, you need to specify a `registered email address`_, e.g.:: python -m drms.tests --run-jsoc --email name@example.com .. _pytest: https://pypi.org/project/pytest/ .. _registered email address: http://jsoc.stanford.edu/ajax/register_email.html 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 .. _SunPy Mailing List: https://groups.google.com/forum/#!forum/sunpy 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, 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://riot.im/app/#/room/#sunpy:matrix.org .. _issues page: https://github.com/sunpy/drms/issues .. _Newcomers' guide: https://docs.sunpy.org/en/latest/dev_guide/newcomers.html Code of Conduct --------------- 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 Acknowledgements ---------------- The main author of this project has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. Parts of this file were adopted from the SunPy README file, Copyright (c) 2013-2019 The SunPy developers. See AUTHORS.txt for a list of contributors. Platform: any Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Science/Research Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Topic :: Scientific/Engineering :: Astronomy drms-0.5.7/README.rst0000644000175000017500000001027613525570236014417 0ustar koljakolja00000000000000==== drms ==== `Docs `_ | `Tutorial `_ | `Github `_ | `PyPI `_ .. 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 `_. Requirements ------------ The ``drms`` module supports Python 2.7 and Python 3.4 or newer. It requires the following Python packages: - NumPy, version 1.9.0 or newer - Pandas, version 0.15.0 or newer - Six, version 1.8.0 or newer The module might also work with earlier versions, but it has not been tested with any versions older than the ones listed above. 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 Running Tests ------------- In order to run any unit tests, `pytest`_ needs to be installed. Basic tests for the currently installed ``drms`` package can be run using:: python -m drms.tests To perform online tests against the JSOC servers, use the ``--run-jsoc`` flag:: python -m drms.tests --run-jsoc To also include additional email verification and JSOC export tests, you need to specify a `registered email address`_, e.g.:: python -m drms.tests --run-jsoc --email name@example.com .. _pytest: https://pypi.org/project/pytest/ .. _registered email address: http://jsoc.stanford.edu/ajax/register_email.html 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 .. _SunPy Mailing List: https://groups.google.com/forum/#!forum/sunpy 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, 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://riot.im/app/#/room/#sunpy:matrix.org .. _issues page: https://github.com/sunpy/drms/issues .. _Newcomers' guide: https://docs.sunpy.org/en/latest/dev_guide/newcomers.html Code of Conduct --------------- 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 Acknowledgements ---------------- The main author of this project has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. Parts of this file were adopted from the SunPy README file, Copyright (c) 2013-2019 The SunPy developers. See AUTHORS.txt for a list of contributors. drms-0.5.7/doc/0000755000175000017500000000000013525573717013476 5ustar koljakolja00000000000000drms-0.5.7/doc/Makefile0000644000175000017500000001760113060055252015122 0ustar koljakolja00000000000000# 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." drms-0.5.7/doc/_static/0000755000175000017500000000000013525573717015124 5ustar koljakolja00000000000000drms-0.5.7/doc/_static/copybutton.js0000644000175000017500000000551713345412002017653 0ustar koljakolja00000000000000/* Copyright (c) 2016, Python Software Foundation * Licensed under the Python Software Foundation License Version 2. * This file was copied from the Python 3.5.2 release. */ $(document).ready(function() { /* Add a [>>>] button on the top-right corner of code samples to hide * the >>> and ... prompts and the output and thus make the code * copyable. */ var div = $('.highlight-python .highlight,' + '.highlight-python3 .highlight') var pre = div.find('pre'); // get the styles from the current theme pre.parent().parent().css('position', 'relative'); var hide_text = 'Hide the prompts and output'; var show_text = 'Show the prompts and output'; var border_width = pre.css('border-top-width'); var border_style = pre.css('border-top-style'); var border_color = pre.css('border-top-color'); var button_styles = { 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', 'border-color': border_color, 'border-style': border_style, 'border-width': border_width, 'color': border_color, 'text-size': '75%', 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', 'border-radius': '0 3px 0 0' } // create and add the button to all the code blocks that contain >>> div.each(function(index) { var jthis = $(this); if (jthis.find('.gp').length > 0) { var button = $('>>>'); button.css(button_styles) button.attr('title', hide_text); button.data('hidden', 'false'); jthis.prepend(button); } // tracebacks (.gt) contain bare text elements that need to be // wrapped in a span to work with .nextUntil() (see later) jthis.find('pre:has(.gt)').contents().filter(function() { return ((this.nodeType == 3) && (this.data.trim().length > 0)); }).wrap(''); }); // define the behavior of the button when it's clicked $('.copybutton').click(function(e){ e.preventDefault(); var button = $(this); if (button.data('hidden') === 'false') { // hide the code output button.parent().find('.go, .gp, .gt').hide(); button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); button.css('text-decoration', 'line-through'); button.attr('title', show_text); button.data('hidden', 'true'); } else { // show the code output button.parent().find('.go, .gp, .gt').show(); button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); button.css('text-decoration', 'none'); button.attr('title', hide_text); button.data('hidden', 'false'); } }); }); drms-0.5.7/doc/_templates/0000755000175000017500000000000013525573717015633 5ustar koljakolja00000000000000drms-0.5.7/doc/_templates/autosummary/0000755000175000017500000000000013525573717020221 5ustar koljakolja00000000000000drms-0.5.7/doc/_templates/autosummary/class.rst0000644000175000017500000000173113060055252022041 0ustar koljakolja00000000000000.. Copyright (c) 2005-2016, NumPy Developers .. Licensed under the BSD License. .. This file was adapted from NumPy 1.11.1. {% extends "!autosummary/class.rst" %} {% block methods %} {% if methods %} .. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. .. autosummary:: :toctree: {% for item in all_methods %} {%- if not item.startswith('_') or item in ['__call__'] %} {{ name }}.{{ item }} {%- endif -%} {%- endfor %} {% endif %} {% endblock %} {% block attributes %} {% if attributes %} .. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. .. autosummary:: :toctree: {% for item in all_attributes %} {%- if not item.startswith('_') %} {{ name }}.{{ item }} {%- endif -%} {%- endfor %} {% endif %} {% endblock %} drms-0.5.7/doc/_templates/layout.html0000644000175000017500000000045413345412002020014 0ustar koljakolja00000000000000{% extends "!layout.html" %} {% block extrahead %} {% if not embedded %} {% endif %} {% endblock %} {%- block relbar2 %} {{ relbar() }} {% include "versions.html" %} {% endblock %} drms-0.5.7/doc/_templates/versions.html0000644000175000017500000000034213345412002020343 0ustar koljakolja00000000000000{% if READTHEDOCS %} {% endif %} drms-0.5.7/doc/_themes/0000755000175000017500000000000013525573717015122 5ustar koljakolja00000000000000drms-0.5.7/doc/_themes/drmsdoc/0000755000175000017500000000000013525573717016555 5ustar koljakolja00000000000000drms-0.5.7/doc/_themes/drmsdoc/static/0000755000175000017500000000000013525573717020044 5ustar koljakolja00000000000000drms-0.5.7/doc/_themes/drmsdoc/static/drmsdoc.css0000644000175000017500000000574313345412002022175 0ustar koljakolja00000000000000/* Copyright (c) 2016, Python Software Foundation * Copyright (c) 2016, Kolja Glogowski * Licensed under the Python Software Foundation License Version 2. * This file is based on the theme included in the Python 3.5.2 release. */ @import url("default.css"); body { background-color: white; margin-left: 1em; margin-right: 1em; } div.related { margin-bottom: 1.2em; padding: 0.5em 0; border-top: 1px solid #ccc; margin-top: 0.5em; } div.related a:hover { color: #4079c4; } div.related:first-child { border-top: 0; border-bottom: 1px solid #ccc; } div.sphinxsidebar { /*background-color: #eeeeee;*/ /*background-color: #f5f5f5;*/ background-color: #e7ebf0; border-radius: 5px; line-height: 130%; font-size: smaller; } div.sphinxsidebar h3, div.sphinxsidebar h4 { margin-top: 1.5em; } div.sphinxsidebarwrapper > h3:first-child { margin-top: 0.2em; } div.sphinxsidebarwrapper > ul > li > ul > li { margin-bottom: 0.4em; } div.sphinxsidebar a:hover { color: #4079c4; } div.sphinxsidebar input { border: 1px solid #999999; border-radius: 3px; } div.sphinxsidebar input[type=text] { max-width: 150px; } div.body { padding: 0 0 0 1.2em; } div.body p { line-height: 140%; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { margin: 0; border: 0; padding: 0.3em 0; } div.body hr { border: 0; background-color: #ccc; height: 1px; } div.body pre { border-radius: 3px; border: 1px solid #ac9; } div.body div.admonition, div.body div.impl-detail { border-radius: 3px; } div.body div.impl-detail > p { margin: 0; } div.body div.seealso { border: 1px solid #dddd66; } div.body a { /*color: #4079c4;*/ } div.body a:visited { /*color: #4079c4;*/ } div.body a:hover { /*color: #4079c4;*/ } tt, code, pre { font-family: Consolas, Inconsolata, monospace, sans-serif; font-size: 96.5%; } div.body tt, div.body code { border-radius: 3px; } div.body tt.descname, div.body code.descname { font-size: 120%; } div.body tt.xref, div.body a tt, div.body code.xref, div.body a code { font-weight: normal; } .deprecated { border-radius: 3px; } table.docutils { border: 1px solid #ddd; min-width: 20%; border-radius: 3px; margin-top: 10px; margin-bottom: 10px; } table.docutils td, table.docutils th { border: 1px solid #ddd !important; border-radius: 3px; } table p, table li { text-align: left !important; } table.docutils th { /*background-color: #eee;*/ background-color: #e7ebf0; padding: 0.3em 0.5em; } table.docutils td { background-color: white; padding: 0.3em 0.5em; } table.footnote, table.footnote td { border: 0 !important; } div.footer { line-height: 150%; margin-top: -2em; text-align: right; width: auto; margin-right: 10px; } div.footer a:hover { color: #4079c4; } .refcount { color: #060; } .stableabi { color: #229; } drms-0.5.7/doc/_themes/drmsdoc/theme.conf0000644000175000017500000000120713345412002020501 0ustar koljakolja00000000000000[theme] inherit = default stylesheet = drmsdoc.css pygments_style = sphinx [options] bodyfont = 'Nimbus Sans', 'Open Sans', 'Lucida Grande', Verdana, sans-serif headfont = 'Nimbus Sans', 'Open Sans', 'Lucida Grande', Verdana, sans-serif bgcolor = white textcolor = #333333 linkcolor = #4079c4 visitedlinkcolor = #4079c4 headbgcolor = white headtextcolor = #264976 headlinkcolor = #a3b1c1 footerbgcolor = white footertextcolor = #555555 relbarbgcolor = #c3deff relbartextcolor = #3572a5 relbarlinkcolor = #333333 sidebarbgcolor = white sidebartextcolor = #333333 sidebarlinkcolor = #333333 sidebarbtncolor = #d4e1f0 collapsiblesidebar = True drms-0.5.7/doc/api.rst0000644000175000017500000000122113060055252014754 0ustar koljakolja00000000000000.. _api: API Reference ============== :Release: |version| :Date: |today| .. module:: drms This reference manual contains detailed information about classes and functions included in the ``drms`` module. For an introduction on how to use the ``drms`` module, see also the :ref:`tutorial `. Classes ------- .. autosummary:: :toctree: generated/ Client SeriesInfo ExportRequest Constants and utility functions ------------------------------- .. autosummary:: :toctree: generated/ const to_datetime Exceptions ---------- .. autosummary:: :toctree: generated/ DrmsError DrmsQueryError DrmsExportError drms-0.5.7/doc/conf.py0000644000175000017500000002355113432237547014776 0ustar koljakolja00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) import drms # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = '1.3' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'numpydoc' ] # Generate API docs. autosummary_generate = ['api.rst'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'drms' copyright = '2016, Kolja Glogowski' author = 'Kolja Glogowski' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = drms.__version__ # Read the Docs apparently does not build the documentation in a clean working # directory, which causes versioneer to return a version that ends with # ".dirty". As a workaround, we just remove this substring from the version. if version.endswith('.dirty'): version = version[:-6] # RtD also seems to change some files in the working directory, which causes # versioneer to return a version like '0.5.0+0g.....'. Remove the part after # the '+' if this starts with a '0'. v = version.split('+') if len(v) > 1 and v[1].startswith('0'): version = v[0] # The full version, including alpha/beta/rc tags. release = version # Default highlight language, needed for copybutton.js highlight_language = 'python' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- 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 * # Custom sidebar templates, maps document names to template names. html_sidebars = {'**': ['docsidebar.html']} except ImportError: html_theme = 'drmsdoc' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_themes'] # 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'] #html_theme = 'classic' #html_theme = 'sphinxdoc' #html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # The name for this set of Sphinx documents. # " v documentation" by default. #html_title = 'drms v0.5.0' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (relative to this directory) to use as a favicon of # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not None, a 'Last updated on:' timestamp is inserted at every page # bottom, using the given strftime format. # The empty string is equivalent to '%b %d, %Y'. # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. html_domain_indices = False # If false, no index is generated. html_use_index = False # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. html_show_sourcelink = False # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Language to be used for generating the HTML full-text search index. # Sphinx supports the following languages: # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' #html_search_language = 'en' # A dictionary with options for the search language support, empty by default. # 'ja' uses this config value. # 'zh' user can custom change `jieba` dictionary path. #html_search_options = {'type': 'default'} # The name of a javascript file (relative to the configuration directory) that # implements a search results scorer. If empty, the default will be used. #html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. htmlhelp_basename = 'drmsdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', # Latex figure (float) alignment #'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'drms.tex', 'drms Documentation', 'Kolja Glogowski', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. latex_domain_indices = False # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'drms', 'drms Documentation', [author], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'drms', 'drms Documentation', author, 'drms', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False drms-0.5.7/doc/index.rst0000644000175000017500000000057713432321514015327 0ustar koljakolja00000000000000################## drms documentation ################## :Release: |version| :Date: |today| :Github: https://github.com/sunpy/drms :PyPI: https://pypi.python.org/pypi/drms Python module for accessing HMI, AIA and MDI data. .. toctree:: :maxdepth: 2 intro tutorial api .. Index and search pages .. ====================== .. .. * :ref:`genindex` .. * :ref:`search` drms-0.5.7/doc/intro.rst0000644000175000017500000000470513525570236015362 0ustar koljakolja00000000000000Introduction ============ 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`` module 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 2.7 and Python 3.4 or newer. It requires the following Python packages: - NumPy, version 1.9.0 or newer - Pandas, version 0.15.0 or newer - Six, version 1.8.0 or newer The module might also work with earlier versions, but it has not been tested with any versions older than the ones listed above. 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 ---------------- The main author of this project has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. See :download:`LICENSE.txt <../LICENSE.txt>` for the license text and :download:`AUTHORS.txt <../AUTHORS.txt>` for a list of contributors. drms-0.5.7/doc/rtd_requirements.txt0000644000175000017500000000005513432237547017626 0ustar koljakolja00000000000000six numpy pandas numpydoc sunpy-sphinx-theme drms-0.5.7/doc/tutorial.rst0000644000175000017500000004227413432321514016063 0ustar koljakolja00000000000000.. _tutorial: Tutorial ======== .. currentmodule:: drms This tutorial gives an introduction on how to use the ``drms`` Python module. More detailed information on the different classes and functions can be found in the :ref:`API Reference Manual `. In addition to this tutorial, many example scripts are available in the `source code package `_ of the ``drms`` module. .. tip:: Instead of using a plain Python interpreter session, it is highly recommended to use an interactive `IPython `_ shell or a `Jupyter `_ notebook for this tutorial. 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 :class:`drms.Client` class:: >>> import drms >>> c = drms.Client() All available data series can be now retrieved by calling the :func:`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:: >>> c.series(r'hmi\.m_') ['hmi.M_45s', 'hmi.M_720s', '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 topic. With the ``drms`` module you can use the :func:`Client.pkeys` method to obtain a list of all primekeys of a series, e.g.:: >>> c.pkeys('hmi.m_720s') ['T_REC', 'CAMERA'] >>> c.pkeys('hmi.v_sht_modes') ['T_START', 'LMIN', 'LMAX', 'NDT'] A list of all (regular) keywords can be obtained using :func:`Client.keys`. You can also use the method :func:`Client.info` to get more detailed information about a series, e.g.:: >>> si = c.info('hmi.v_avg120') >>> si.segments 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 :func:`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 = c.query('hmi.v_45s[2016.04.01_TAI/1d@6h]', ... key='T_REC, DATAMEAN, OBS_VR') >>> k 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 :func:`drms.to_datetime` utility function:: >>> t = drms.to_datetime(k.T_REC) >>> t 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') >>> ta