././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1738776244.3047771 drms-0.9.0/0000755000175100001660000000000014750717264012105 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.black0000644000175100001660000000027414750717252013162 0ustar00runnerdockertarget-version = ['py310'] exclude = ''' ( /( \.eggs | \.git | \.mypy_cache | \.tox | \.venv | _build | build | dist | docs | .history )/ ) ''' ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.codecov.yaml0000644000175100001660000000023314750717252014464 0ustar00runnerdockercomment: off coverage: status: project: default: threshold: 0.2% codecov: require_ci_to_pass: false notify: wait_for_ci: true ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.codespellrc0000644000175100001660000000045414750717252014405 0ustar00runnerdocker[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=1738776234.0 drms-0.9.0/.coveragerc0000644000175100001660000000140414750717252014222 0ustar00runnerdocker[run] omit = drms/conftest.py drms/*setup_package* drms/extern/* drms/version* */drms/conftest.py */drms/*setup_package* */drms/extern/* */drms/version* [report] exclude_lines = # Have to re-enable the standard pragma pragma: no cover # Don't complain about packages we have installed except ImportError # Don't complain if tests don't hit assertions raise AssertionError raise NotImplementedError # Don't complain about script hooks def main(.*): # Ignore branches that don't pertain to this version of Python pragma: py{ignore_python_version} # Don't complain about IPython completion helper def _ipython_key_completions_ # typing.TYPE_CHECKING is False at runtime if TYPE_CHECKING: # Ignore typing overloads @overload ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.cruft.json0000644000175100001660000000274014750717252014201 0ustar00runnerdocker{ "template": "https://github.com/sunpy/package-template", "commit": "29db3569a215e43fa8c5114d3dbcb98b6a9caac0", "checkout": null, "context": { "cookiecutter": { "package_name": "drms", "module_name": "drms", "short_description": "Access HMI, AIA and MDI data from the Standford JSOC DRMS", "author_name": "The SunPy Community", "author_email": "sunpy@googlegroups.com", "project_url": "https://sunpy.org", "github_repo": "sunpy/drms", "sourcecode_url": "https://github.com/sunpy/drms", "download_url": "https://pypi.org/project/drms", "documentation_url": "https://docs.sunpy.org/projects/drms", "changelog_url": "https://docs.sunpy.org/projects/drms/en/stable/whatsnew/changelog.html", "issue_tracker_url": "https://github.com/sunpy/drms/issues", "license": "BSD 2-Clause", "minimum_python_version": "3.10", "use_compiled_extensions": "n", "enable_dynamic_dev_versions": "y", "include_example_code": "n", "include_cruft_update_github_workflow": "y", "use_extended_ruff_linting": "y", "_sphinx_theme": "sunpy", "_parent_project": "", "_install_requires": "", "_copy_without_render": [ "docs/_templates", "docs/_static", ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", "_commit": "29db3569a215e43fa8c5114d3dbcb98b6a9caac0" } }, "directory": null } ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.editorconfig0000644000175100001660000000041114750717252014553 0ustar00runnerdocker# https://editorconfig.org root = true # utf, UNIX-style new line [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true [*.{py,rst,md}] indent_style = space indent_size = 4 [*.yml] indent_style = space indent_size = 2 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.flake80000644000175100001660000000101414750717252013251 0ustar00runnerdocker[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=1738776234.0 drms-0.9.0/.gitattributes0000644000175100001660000000012314750717252014771 0ustar00runnerdocker*fits binary *fit binary *fts binary *fit.gz binary *fits.gz binary *fts.gz binary ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1738776244.285777 drms-0.9.0/.github/0000755000175100001660000000000014750717264013445 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1738776244.2907772 drms-0.9.0/.github/workflows/0000755000175100001660000000000014750717264015502 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.github/workflows/ci.yml0000644000175100001660000000631214750717252016617 0ustar00runnerdocker# Main CI Workflow name: CI on: push: branches: - 'main' - '*.*' - '!*backport*' tags: - 'v*' - '!*dev*' - '!*pre*' - '!*post*' pull_request: # Allow manual runs through the web UI workflow_dispatch: schedule: # ┌───────── minute (0 - 59) # │ ┌───────── hour (0 - 23) # │ │ ┌───────── day of the month (1 - 31) # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) - cron: '0 7 * * *' # Every day at 07:00 UTC concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: core: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false coverage: codecov toxdeps: "tox-pypi-filter" posargs: -n auto envs: | - linux: py312 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} sdist_verify: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.12' - run: python -m pip install -U --user build - run: python -m build . --sdist - run: python -m pip install -U --user twine - run: python -m twine check dist/* test: needs: [core, sdist_verify] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false coverage: codecov toxdeps: "tox-pypi-filter" posargs: -n auto envs: | - windows: py10 - macos: py311 - linux: py310-oldestdeps secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} docs: needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: default_python: '3.12' submodules: false pytest: false toxdeps: "tox-pypi-filter" libraries: | apt: - graphviz envs: | - linux: build_docs online: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: default_python: '3.12' submodules: false coverage: codecov toxdeps: "tox-pypi-filter" posargs: -n 1 --dist loadgroup envs: | - linux: py312-online - linux: py312-sunpy secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} publish: # Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.* # see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi if: | github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run publish') ) needs: [test, docs] uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: python-version: '3.12' test_extras: 'tests' test_command: 'pytest -p no:warnings --doctest-rst --pyargs drms' submodules: false secrets: pypi_token: ${{ secrets.pypi_token }} ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.github/workflows/label_sync.yml0000644000175100001660000000147014750717252020337 0ustar00runnerdockername: Label Sync on: workflow_dispatch: schedule: # ┌───────── minute (0 - 59) # │ ┌───────── hour (0 - 23) # │ │ ┌───────── day of the month (1 - 31) # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) - cron: '0 0 * * *' # run every day at midnight UTC # Give permissions to write issue labels permissions: issues: write jobs: label_sync: runs-on: ubuntu-latest name: Label Sync steps: - uses: srealmoreno/label-sync-action@850ba5cef2b25e56c6c420c4feed0319294682fd with: config-file: https://raw.githubusercontent.com/sunpy/.github/main/labels.yml ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.github/workflows/sub_package_update.yml0000644000175100001660000000665014750717252022037 0ustar00runnerdocker# This template is taken from the cruft example code, for further information please see: # https://cruft.github.io/cruft/#automating-updates-with-github-actions name: Automatic Update from package template permissions: contents: write pull-requests: write on: # Allow manual runs through the web UI workflow_dispatch: schedule: # ┌───────── minute (0 - 59) # │ ┌───────── hour (0 - 23) # │ │ ┌───────── day of the month (1 - 31) # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) - cron: '0 7 * * 1' # Every Monday at 7am UTC jobs: update: runs-on: ubuntu-latest strategy: fail-fast: true steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install Cruft run: python -m pip install git+https://github.com/Cadair/cruft@patch-p1 - name: Check if update is available continue-on-error: false id: check run: | CHANGES=0 if [ -f .cruft.json ]; then if ! cruft check; then CHANGES=1 fi else echo "No .cruft.json file" fi echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT" - name: Run update if available id: cruft_update if: steps.check.outputs.has_changes == '1' run: | git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global user.name "${{ github.actor }}" cruft_output=$(cruft update --skip-apply-ask --refresh-private-variables) echo $cruft_output git restore --staged . if [[ "$cruft_output" == *"Failed to cleanly apply the update, there may be merge conflicts."* ]]; then echo merge_conflicts=1 >> $GITHUB_OUTPUT else echo merge_conflicts=0 >> $GITHUB_OUTPUT fi - name: Check if only .cruft.json is modified id: cruft_json if: steps.check.outputs.has_changes == '1' run: | git status --porcelain=1 if [[ "$(git status --porcelain=1)" == " M .cruft.json" ]]; then echo "Only .cruft.json is modified. Exiting workflow early." echo "has_changes=0" >> "$GITHUB_OUTPUT" else echo "has_changes=1" >> "$GITHUB_OUTPUT" fi - name: Create pull request if: steps.cruft_json.outputs.has_changes == '1' uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} add-paths: "." commit-message: "Automatic package template update" branch: "cruft/update" delete-branch: true draft: ${{ steps.cruft_update.outputs.merge_conflicts == '1' }} title: "Updates from the package template" labels: | No Changelog Entry Needed body: | This is an autogenerated PR, which will applies the latest changes from the [SunPy Package Template](https://github.com/sunpy/package-template). If this pull request has been opened as a draft there are conflicts which need fixing. **To run the CI on this pull request you will need to close it and reopen it.** ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.gitignore0000644000175100001660000001055414750717252014077 0ustar00runnerdocker### Python: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class tmp/ # C extensions *.so # Distribution / packaging .Python pip-wheel-metadata/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST drms/_version.py # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ cover/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # automodapi docs/api docs/sg_execution_times.rst # PyBuilder .pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: # .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # pdm # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. #pdm.lock # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it # in version control. # https://pdm.fming.dev/#use-with-ide .pdm.toml # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ # Pyre type checker .pyre/ # IDE # PyCharm .idea # Spyder project settings .spyderproject .spyproject ### VScode: https://raw.githubusercontent.com/github/gitignore/master/Global/VisualStudioCode.gitignore .vscode/* .vs/* ### https://raw.github.com/github/gitignore/master/Global/OSX.gitignore .DS_Store .AppleDouble .LSOverride # Icon must ends with two \r. Icon # Thumbnails ._* # Files that might appear on external disk .Spotlight-V100 .Trashes ### Linux: https://raw.githubusercontent.com/github/gitignore/master/Global/Linux.gitignore *~ # temporary files which can be created if a process still has a handle open of a deleted file .fuse_hidden* # KDE directory preferences .directory # Linux trash folder which might appear on any partition or disk .Trash-* # .nfs files are created when an open file is removed but is still being accessed .nfs* # pytype static type analyzer .pytype/ # General .DS_Store .AppleDouble .LSOverride # Icon must end with two \r Icon # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk ### Windows: https://raw.githubusercontent.com/github/gitignore/master/Global/Windows.gitignore # Windows thumbnail cache files Thumbs.db ehthumbs.db ehthumbs_vista.db # Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi *.msix *.msm *.msp # Windows shortcuts *.lnk ### Extra Python Items and SunPy Specific .hypothesis .pytest_cache docs/_build docs/api/ docs/generated docs/whatsnew/latest_changelog.txt drms/_version.py examples/**/*.asdf examples/**/*.csv examples/jsoc.stanford.edu/ jsoc.stanford.edu/ docs/sg_execution_times.rst # Release script .github_cache # Misc Stuff .history *.orig .tmp node_modules/ package-lock.json package.json .prettierrc # Log files generated by 'vagrant up' *.log ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.isort.cfg0000644000175100001660000000062614750717252014005 0ustar00runnerdocker[settings] balanced_wrapping = true skip = docs/conf.py drms/__init__.py default_section = THIRDPARTY include_trailing_comma = true known_astropy = astropy, asdf known_sunpy = sunpy known_first_party = drms length_sort = false length_sort_sections = stdlib line_length = 110 multi_line_output = 3 no_lines_before = LOCALFOLDER sections = STDLIB, THIRDPARTY, ASTROPY, SUNPY, FIRSTPARTY, LOCALFOLDER ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.pre-commit-config.yaml0000644000175100001660000000170414750717252016365 0ustar00runnerdockerexclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|drms/extern)$|^CITATION.rst$" repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.9.4" hooks: - id: ruff args: ['--fix', '--unsafe-fixes'] - id: ruff-format - repo: https://github.com/PyCQA/isort rev: 6.0.0 hooks: - id: isort - repo: https://github.com/PyCQA/isort rev: 6.0.0 hooks: - id: isort - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-ast - id: check-case-conflict - id: trailing-whitespace - id: check-yaml - id: debug-statements - id: check-added-large-files args: ["--enforce-all", "--maxkb=1054"] - id: end-of-file-fixer - id: mixed-line-ending - repo: https://github.com/codespell-project/codespell rev: v2.4.1 hooks: - id: codespell ci: autofix_prs: false autoupdate_schedule: "quarterly" ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.readthedocs.yaml0000644000175100001660000000074314750717252015335 0ustar00runnerdockerversion: 2 build: os: ubuntu-lts-latest tools: python: "mambaforge-latest" jobs: post_checkout: - git fetch --unshallow || true pre_install: - git update-index --assume-unchanged .rtd-environment.yml docs/conf.py conda: environment: .rtd-environment.yml sphinx: builder: html configuration: docs/conf.py fail_on_warning: false formats: - htmlzip python: install: - method: pip extra_requirements: - docs path: . ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.readthedocs.yml0000644000175100001660000000043714750717252015174 0ustar00runnerdockerversion: 2 build: os: ubuntu-20.04 tools: python: "3.11" apt_packages: - graphviz sphinx: builder: html configuration: docs/conf.py fail_on_warning: false python: install: - method: pip extra_requirements: - all - docs path: . ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.rtd-environment.yml0000644000175100001660000000015114750717252016033 0ustar00runnerdockername: drms channels: - conda-forge dependencies: - python=3.12 - pip - graphviz!=2.42.*,!=2.43.* ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/.ruff.toml0000644000175100001660000000376114750717252014026 0ustar00runnerdockertarget-version = "py310" line-length = 120 exclude = [ ".git,", "__pycache__", "build", "drms/version.py", ] [lint] select = [ "E", "F", "W", "UP", "PT", "BLE", "A", "C4", "INP", "PIE", "T20", "RET", "TID", "PTH", "PD", "PLC", "PLE", "FLY", "NPY", "PERF", "RUF", ] extend-ignore = [ # pycodestyle (E, W) "E501", # ignore line length will use a formatter instead # pyupgrade (UP) "UP038", # Use | in isinstance - not compatible with models and is slower # pytest (PT) "PT001", # Always use pytest.fixture() "PT023", # Always use () on pytest decorators # flake8-pie (PIE) "PIE808", # Disallow passing 0 as the first argument to range # flake8-use-pathlib (PTH) "PTH123", # open() should be replaced by Path.open() # Ruff (RUF) "RUF003", # Ignore ambiguous quote marks, doesn't allow ' in comments "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` "RUF013", # PEP 484 prohibits implicit `Optional` "RUF015", # Prefer `next(iter(...))` over single element slice ] [lint.per-file-ignores] "setup.py" = [ "INP001", # File is part of an implicit namespace package. ] "conftest.py" = [ "INP001", # File is part of an implicit namespace package. ] "docs/conf.py" = [ "E402" # Module imports not at top of file ] "docs/*.py" = [ "INP001", # File is part of an implicit namespace package. ] "examples/**.py" = [ "T201", # allow use of print in examples "INP001", # File is part of an implicit namespace package. ] "__init__.py" = [ "E402", # Module level import not at top of cell "F401", # Unused import "F403", # from {name} import * used; unable to detect undefined names "F405", # {name} may be undefined, or defined from star imports ] "test_*.py" = [ "E402", # Module level import not at top of cell ] "examples/plot_hmi_modes.py" = [ "E741", # Ambiguous variable name ] "drms/json.py" = [ "A005", # Module `json` shadows a Python standard-library module ] [lint.pydocstyle] convention = "numpy" ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/CHANGELOG.rst0000644000175100001660000001014114750717252014120 0ustar00runnerdocker0.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=1738776234.0 drms-0.9.0/CITATION.rst0000644000175100001660000000274114750717252014052 0ustar00runnerdockerAcknowledging or Citing drms ============================ If you use drms in your scientific work, we would appreciate citing it in your publications. The continued growth and development of drms is dependent on the community being aware of drms. Please add the following line within your methods, conclusion or acknowledgements sections: *This research used version X.Y.Z (software citation) of the drms open source software package (project citation).* The project citation should be to the `drms paper`_, and the software citation should be the specific `Zenodo DOI`_ for the version used in your work. Here is the Bibtex entry: .. code:: bibtex @ARTICLE{Glogowski2019, doi = {10.21105/joss.01614}, url = {https://doi.org/10.21105/joss.01614}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {40}, pages = {1614}, author = {Kolja Glogowski and Monica G. Bobra and Nitin Choudhary and Arthur B. Amezcua and Stuart J. Mumford}, title = {drms: A Python package for accessing HMI and AIA data}, journal = {Journal of Open Source Software} } You can also get this information with ``drms.__citation__``. Or as, "Glogowski et al., (2019). drms: A Python package for accessing HMI and AIA data. Journal of Open Source Software, 4(40), 1614, https://doi.org/10.21105/joss.01614." .. _drms paper: https://doi.org/10.21105/joss.01614 .. _Zenodo DOI: https://doi.org/10.5281/zenodo.3369966 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/LICENSE.rst0000644000175100001660000000243414750717252013721 0ustar00runnerdockerCopyright (c) 2013-2023 The SunPy developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/MANIFEST.in0000644000175100001660000000051414750717252013640 0ustar00runnerdocker# Exclude specific files # All files which are tracked by git and not explicitly excluded here are included by setuptools_scm # Prune folders prune build prune docs/_build prune docs/api 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=1738776244.3047771 drms-0.9.0/PKG-INFO0000644000175100001660000001324414750717264013206 0ustar00runnerdockerMetadata-Version: 2.2 Name: drms Version: 0.9.0 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.10 Description-Content-Type: text/x-rst License-File: LICENSE.rst Requires-Dist: numpy>=1.23.5 Requires-Dist: pandas>=1.5.1 Requires-Dist: packaging>=23.0 Provides-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" Requires-Dist: astropy; 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 `__ License ------- This project is Copyright (c) The SunPy Community and licensed under the terms of the BSD 2-Clause license. This package is based upon the `Openastronomy packaging guide `_ which is licensed under the BSD 3-clause licence. See the licenses folder for more information. Contributing ------------ We love contributions! drms is open source, built on open source, and we'd love to have you hang out in our community. **Imposter syndrome disclaimer**: We want your help. No, really. There may be a little voice inside your head that is telling you that you're not ready to be an open source contributor; that your skills aren't nearly good enough to contribute. What could you possibly offer a project like this one? We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one's coding skills. Writing perfect code isn't the measure of a good developer (that would disqualify all of us!); it's trying to create something, making mistakes, and learning from those mistakes. That's how we all improve, and we are happy to help others learn. Being an open source contributor doesn't just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you're coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over. Note: This disclaimer was originally written by `Adrienne Lowe `_ for a `PyCon talk `_, and was adapted by drms based on its use in the README file for the `MetPy project `_. Citation -------- If you use ``drms`` in your work, please cite our `paper `__. .. code-block:: bibtex @article{Glogowski2019, doi = {10.21105/joss.01614}, url = {https://doi.org/10.21105/joss.01614}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {40}, pages = {1614}, author = {Kolja Glogowski and Monica G. Bobra and Nitin Choudhary and Arthur B. Amezcua and Stuart J. Mumford}, title = {drms: A Python package for accessing HMI and AIA data}, journal = {Journal of Open Source Software} } Code of Conduct (CoC) --------------------- When you are interacting with the SunPy community you are asked to follow our `code of conduct `__. Acknowledgements ---------------- Kolja Glogowski has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/README.rst0000644000175100001660000001022314750717252013567 0ustar00runnerdocker==== 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 `__ License ------- This project is Copyright (c) The SunPy Community and licensed under the terms of the BSD 2-Clause license. This package is based upon the `Openastronomy packaging guide `_ which is licensed under the BSD 3-clause licence. See the licenses folder for more information. Contributing ------------ We love contributions! drms is open source, built on open source, and we'd love to have you hang out in our community. **Imposter syndrome disclaimer**: We want your help. No, really. There may be a little voice inside your head that is telling you that you're not ready to be an open source contributor; that your skills aren't nearly good enough to contribute. What could you possibly offer a project like this one? We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one's coding skills. Writing perfect code isn't the measure of a good developer (that would disqualify all of us!); it's trying to create something, making mistakes, and learning from those mistakes. That's how we all improve, and we are happy to help others learn. Being an open source contributor doesn't just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you're coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over. Note: This disclaimer was originally written by `Adrienne Lowe `_ for a `PyCon talk `_, and was adapted by drms based on its use in the README file for the `MetPy project `_. Citation -------- If you use ``drms`` in your work, please cite our `paper `__. .. code-block:: bibtex @article{Glogowski2019, doi = {10.21105/joss.01614}, url = {https://doi.org/10.21105/joss.01614}, year = {2019}, publisher = {The Open Journal}, volume = {4}, number = {40}, pages = {1614}, author = {Kolja Glogowski and Monica G. Bobra and Nitin Choudhary and Arthur B. Amezcua and Stuart J. Mumford}, title = {drms: A Python package for accessing HMI and AIA data}, journal = {Journal of Open Source Software} } Code of Conduct (CoC) --------------------- When you are interacting with the SunPy community you are asked to follow our `code of conduct `__. Acknowledgements ---------------- Kolja Glogowski has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1738776244.2907772 drms-0.9.0/changelog/0000755000175100001660000000000014750717264014034 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/changelog/README.rst0000644000175100001660000000371414750717252015525 0ustar00runnerdocker========= Changelog ========= .. note:: This README was adapted from the pytest changelog readme under the terms of the MIT licence. This directory contains "news fragments" which are short files that contain a small **ReST**-formatted text that will be added to the next ``CHANGELOG``. The ``CHANGELOG`` will be read by users, so this description should be aimed at drms users instead of describing internal changes which are only relevant to the developers. Make sure to use full sentences with correct case and punctuation, for example:: Add support for Helioprojective coordinates in `sunpy.coordinates.frames`. Please try to use Sphinx intersphinx using backticks. Each file should be named like ``.[.].rst``, where ```` is a pull request number, ``COUNTER`` is an optional number if a PR needs multiple entries with the same type and ```` is one of: * ``breaking``: A change which requires users to change code and is not backwards compatible. (Not to be used for removal of deprecated features.) * ``feature``: New user facing features and any new behavior. * ``bugfix``: Fixes a reported bug. * ``doc``: Documentation addition or improvement, like rewording an entire session or adding missing docs. * ``docfix``: Correction to existing documentation, such as fixing a typo or adding a missing input parameter. * ``removal``: Feature deprecation and/or feature removal. * ``trivial``: A change which has no user facing effect or is tiny change. So for example: ``123.feature.rst``, ``456.bugfix.rst``. If you are unsure what pull request type to use, don't hesitate to ask in your PR. Note that the ``towncrier`` tool will automatically reflow your text, so it will work best if you stick to a single paragraph, but multiple sentences and links are OK and encouraged. You can install ``towncrier`` and then run ``towncrier --draft`` if you want to get a preview of how your change will look in the final release notes. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1738776244.292777 drms-0.9.0/docs/0000755000175100001660000000000014750717264013035 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/Makefile0000644000175100001660000001760114750717252014477 0ustar00runnerdocker# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " epub3 to make an epub3" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" @echo " dummy to check syntax errors of document sources" .PHONY: clean clean: rm -rf $(BUILDDIR)/* generated .PHONY: html html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." .PHONY: qthelp qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/drms.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/drms.qhc" .PHONY: applehelp applehelp: $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @echo "N.B. You won't be able to view it unless you put it in" \ "~/Library/Documentation/Help or install it in your application" \ "bundle." .PHONY: devhelp devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/drms" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/drms" @echo "# devhelp" .PHONY: epub epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: epub3 epub3: $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 @echo @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." .PHONY: latex latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." .PHONY: latexpdf latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: latexpdfja latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: text text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." .PHONY: info info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." .PHONY: gettext gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." .PHONY: changes changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." .PHONY: linkcheck linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." .PHONY: doctest doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." .PHONY: coverage coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." .PHONY: xml xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." .PHONY: dummy dummy: $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy @echo @echo "Build finished. Dummy builder generates no files." ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/api.rst0000644000175100001660000000015114750717252014332 0ustar00runnerdocker.. _drms-api-reference: ************* API Reference ************* .. automodapi:: drms :no-heading: ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/citation.rst0000644000175100001660000000006614750717252015400 0ustar00runnerdocker.. _drms-citation: .. include:: ../drms/CITATION.rst ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/conf.py0000644000175100001660000001465514750717252014344 0ustar00runnerdocker# 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 --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named "sphinx.ext.*") or your custom # ones. extensions = [ "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. # You can specify multiple suffix as a list of string: source_suffix = ".rst" # 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=1738776234.0 drms-0.9.0/docs/index.rst0000644000175100001660000000071214750717252014673 0ustar00runnerdocker.. _drms-index: ********************** ``drms`` documentation ********************** :Github: https://github.com/sunpy/drms :PyPI: https://pypi.org/project/drms/ Python library for accessing HMI, AIA and MDI data from the Joint Science Operations Center (JSOC) or other Data Record Management System (DRMS) servers. .. toctree:: :maxdepth: 2 :caption: Contents: intro tutorial api generated/gallery/index citation whatsnew/index ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/intro.rst0000644000175100001660000000401014750717252014712 0ustar00runnerdocker.. _drms-introduction: ************ Introduction ************ The ``drms`` Python package can be used to access HMI, AIA and MDI data which are stored in a DRMS database system. DRMS stands for *Data Record Management System* and is a system that was developed by the `Joint Science Operation Center `__ (JSOC), headquartered at Stanford University, to handle the data produced by the AIA and HMI instruments aboard the `Solar Dynamics Observatory `__ spacecraft. By default the ``drms`` library uses the HTTP/JSON interface provided by JSOC and has similar functionality to the `JSOC Lookdata `__ website. It can be used to query metadata, submit data export requests and download data files. This module also works well for local `NetDRMS `__ sites, as long as the site runs a web server providing the needed CGI programs ``show_series`` and ``jsoc_info`` (for the data export functionality, additional CGIs, like ``jsoc_fetch``, are needed). Installation ============ If you are using `miniforge`_ (which is conda but using the conda-forge channel): .. code-block:: bash conda install drms Otherwise the ``drms`` Python package can be installed from `PyPI`_ using: .. code-block:: bash pip install drms .. note:: If you do not use a Python distribution, like `miniforge`_, and did not create an isolated Python environment using `Virtualenv`_, you might need to add ``--user`` to the ``pip`` command: .. code-block:: bash pip install --user drms .. _PyPI: https://pypi.org/project/drms/ .. _conda-forge: https://anaconda.org/conda-forge/drms .. _miniforge: https://github.com/conda-forge/miniforge#miniforge3 .. _Virtualenv: https://virtualenv.pypa.io/en/latest/ Acknowledgements ================ Kolja Glogowski has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 307117. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/make.bat0000644000175100001660000000143314750717252014440 0ustar00runnerdocker@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=1738776234.0 drms-0.9.0/docs/rtd_requirements.txt0000644000175100001660000000000014750717252017155 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1738776234.0 drms-0.9.0/docs/tutorial.rst0000644000175100001660000004314014750717252015431 0ustar00runnerdocker.. _drms-tutorial: ******** Tutorial ******** This tutorial gives an introduction on how to use the ``drms`` Python library. More detailed information on the different classes and functions can be found in the :ref:`API Reference `. Basic usage =========== We start with looking at data series that are available from `JSOC `__ and perform some basic DRMS queries to obtain keyword data (metadata) and segment file (data) locations. This is essentially what you can do on the `JSOC Lookdata `__ website. To be able to access the JSOC DRMS from Python, we first need to import the ``drms`` module and create an instance of the `~drms.client.Client` class: .. code-block:: python >>> import drms >>> client = drms.Client() # doctest: +REMOTE_DATA All available data series can be now retrieved by calling :meth:`drms.client.Client.series`. HMI series names start with ``"hmi."``, AIA series names with ``"aia."`` and the names of MDI series with ``"mdi."``. The first (optional) parameter of this method takes a regular expression that allows you to filter the result. If for example, you want to obtain a list of HMI series, with a name that start with the string ``"m_"``, you can write: .. code-block:: python >>> client.series(r'hmi\.m_') # doctest: +REMOTE_DATA ['hmi.M_45s', 'hmi.M_45s_dcon', 'hmi.M_720s', 'hmi.M_720s_dcon', 'hmi.M_720s_dconS', 'hmi.m_720s_mod', 'hmi.m_720s_nrt'] Keep in mind to escape the dot character (``'.'``), like it is shown in the example above, if you want to include it in your filter string. Also note that series names are handled in a case-insensitive way. DRMS records can be selected by creating a query string that contains a series name, followed by one or more fields, which are surrounded by square brackets. Each of those fields corresponds to a specific primekey, that is specified in the series definition. A complete set of primekeys represents a unique identifier for a record in that particular series. For more detailed information on building record set queries, including additional non-primekey fields, see the `JSOC Help `__ page about this. With the ``drms`` module you can use :meth:`drms.client.Client.pkeys` to obtain a list of all primekeys of a series: .. code-block:: python >>> client.pkeys('hmi.m_720s') # doctest: +REMOTE_DATA ['T_REC', 'CAMERA'] >>> client.pkeys('hmi.v_sht_modes') # doctest: +REMOTE_DATA ['T_START', 'LMIN', 'LMAX', 'NDT'] A list of all (regular) keywords can be obtained using :meth:`drms.client.Client.keys`. You can also use :meth:`drms.client.Client.info` to get more detailed information about a series: .. code-block:: python >>> series_info = client.info('hmi.v_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[ns] For most of the HMI and MDI data sets, the `TAI `__ time standard is used which, in contrast to `UTC `__, does not make use of any leap seconds. The TAI standard is currently not supported by the Python standard libraries. If you need to convert timestamps between TAI and UTC, you can use `Astropy `__: .. code-block:: python >>> from astropy.time import Time >>> start_time = Time(timestamps[0], format='datetime', scale='tai') # doctest: +REMOTE_DATA >>> start_time # doctest: +REMOTE_DATA