Task-oriented Python-based examples for working with NASA Planetary Data System version 4 archive data.
The software requirements vary by example. At a minimum, an up to date Python distribution is needed, v2.7 is probably OK, but v3.5 or latter is recommended. Some examples require one or more of the following:
pds4_tools
, our Python module for reading and inspecting PDS4 data and meta data;numpy
, an efficient library for arrays, linear algebra, and many basic mathematical functions; andmatplotlib
for plotting data.
Most examples are written as Jupyter notebooks. These may be downloaded, edited, and executed on your own system. As an alternative, you can copy and paste the Python code onto your command line or into your own scripts.
The following examples use the pds4_tools
Python module.
A detailed example, showing how to read in and inspect a spectrum. The spectral data is from A'Hearn, M.F., Wellnitz, D.D., and Meier, R., Spectra of C/1996 B2 (Hyakutake) for Multiple Offsets from Photocenter, urn:nasa:pds:gbo-kpno:hyakutake_spectra::1.0, Blankenship, D.W. (ed), NASA Planetary Data System, 2015.
A detailed example, showing how to read in and inspect an image. The image is from: Cheng, A. and Hibbitts, K., Balloon Observation Platform for Planetary Science (BOPPS) 2014 Observations: BIRC Co-Added Images, urn:nasa:pds:bopps2014:scoadded::v1.0, Espiritu, R. and Raugh, A.C. (eds.), NASA Planetary Data System, 2015.
The following examples do not use the pds4_tools
Python module.
Read in an image from a BOPPS BIRC data product into a Numpy array and display it with the correct orientation.