MCPcopy Index your code
hub / github.com/MillionConcepts/pdr

github.com/MillionConcepts/pdr @v1.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.1 ↗ · + Follow
1,106 symbols 3,647 edges 118 files 691 documented · 62%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

README.md

The Planetary Data Reader (pdr)

This tool provides a single command---read(‘/path/to/file’)---for ingesting all common planetary data types. It reads almost all "primary observational data" products currently archived in the PDS (under PDS3 or PDS4), and the fraction of products it does not read is continuously shrinking. Currently-supported datasets are listed here.

If the software fails while attempting to read from datasets that we have listed as supported, please submit an issue with a link to the file and information about the error (if applicable). There might also be datasets that work but are not listed. We would like to hear about those too. If a dataset is not yet supported that you would like us to consider prioritizing, please fill out this request form.

Attribution

If you use pdr in your work, please cite us using our JOSS Paper: DOI. A BibTex style citation is available in CITATION.cff.

Installation

pdr is now on conda and pip. We recommend (and only officially support) installation into a conda environment. You can do this like so:

conda create --name pdrenv
conda activate pdrenv
conda install -c conda-forge pdr

The minimum supported version of Python is 3.9.

Using the conda install will install some optional dependencies in the environment.yml file for pdr including: astropy and pillow. If you'd prefer to forego those optional dependencies, please use minimal_environment.yml in your installation. This is not supported through a direct conda install as described above and will require additional steps. Optional dependencies and the added functionality they support are listed below:

  • pvl: allows Data.load("LABEL", as_pvl=True), which will load PDS3 labels as pvl objects rather than plain text
  • astropy: adds support for FITS files
  • jupyter: allows usage of the Example Jupyter Notebook (and other jupyter notebooks you create)
  • pillow: adds support for reading a variety of 'desktop' image formats (TIFF, JPEG, etc.) and for browse image rendering
  • Levenshtein: allows use of metaget_fuzzy, a fuzzy-matching metadata parsing function

For pip users, no optional dependencies will be packaged with pdr. The extras tags are: - pvl: installs pvl - fits: installs astropy - notebooks: installs jupyter - pillow: installs pillow - fuzzy: installs Levenshtein

Example syntax for using pip to install syntax with astropy and pillow optional dependencies:

pip install pdr[fits, pillow]

NOTE: pdr is not currently compatible with python 3.13 when installed with pip, it can be used with python 3.13 through conda

Usage

You can check out our example Notebook on a JupyterLite server for a quick interactive demo of functionality: JupyterLite

Additional information on usage including examples, output data types, notes and caveats, tests, etc. can now be accessed in our documentation on readthedocs at: https://pdr.readthedocs.io Documentation Status

Contributing

Thank you for wanting to contribute to pdr and improving efforts to make planetary science data accessible. Please review our code of conduct before contributing. Contributor Covenant

If you have found a bug, a dataset that we claim to support that's not opening properly, or you have a feature request, please file an issue. We will also review pull requests, but would probably prefer you start the conversation with us first, so we can expect your contributions and make sure they will be within scope.

If you need general support you can find us on OpenPlanetary Slack (available to OpenPlanetary members) or feel free to email the team.


This work is supported by NASA grant No. 80NSSC21K0885.

Core symbols most depended-on inside this repo

get
called by 129
pdr/pds4_tools/reader/label_objects.py
format
called by 94
pdr/pds4_tools/utils/logging.py
items
called by 46
pdr/pds4_tools/extern/ordered_dict.py
keys
called by 36
pdr/pds4_tools/extern/ordered_dict.py
metablock_
called by 32
pdr/pdr.py
pop
called by 29
pdr/pds4_tools/extern/ordered_dict.py
getroot
called by 25
pdr/pds4_tools/reader/label_objects.py
metaget
called by 24
pdr/pdr.py

Shape

Function 535
Method 465
Class 106

Languages

Python100%

Modules by API surface

pdr/pds4_tools/extern/argparse.py154 symbols
pdr/pds4_tools/extern/six.py75 symbols
pdr/pds4_tools/reader/table_objects.py64 symbols
pdr/pdr.py57 symbols
pdr/pds4_tools/reader/label_objects.py44 symbols
pdr/loaders/queries.py40 symbols
pdr/pds4_tools/reader/data.py34 symbols
pdr/pds4_tools/utils/logging.py28 symbols
pdr/pds4_tools/reader/general_objects.py28 symbols
pdr/pds4_tools/extern/ordered_dict.py26 symbols
pdr/parselabel/pds3.py25 symbols
pdr/loaders/datawrap.py25 symbols

For agents

$ claude mcp add pdr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact