pds4_utils example

This is a work-in-progress notebook demonstrating how to use the psd4_utils module.

In [1]:
from pds4_utils import pds4_utils
In [2]:
pds4_utils.index_products?
Signature: pds4_utils.index_products(directory='.', pattern='*.xml')
Docstring:
Accepts a directory containing PDS4 products, indexes the labels and returns a 
Pandas data-frame containng meta-data for each product.
File:      ~/Dropbox/work/bepi/software/pds4_utils/pds4_utils/pds4_utils.py
Type:      function
In [3]:
idx = pds4_utils.index_products(directory='/home/mbentley/Desktop/bc_mtm_mcam/')
INFO 2020-05-25 17:36:02 (pds4_utils.pds4_utils): 406 PDS4 labels indexed
In [4]:
idx.head()
Out[4]:
filename product_type lid vid start_time stop_time bundle collection product_id
0 /home/mbentley/Desktop/bc_mtm_mcam/browse/crui... Product_Browse urn:esa:psa:bc_mtm_mcam:browse:cam_raw_sc_cam1... 1.0 NaT NaT bc_mtm_mcam browse cam_raw_sc_cam1_browse_20200515t024802_00_f__t...
1 /home/mbentley/Desktop/bc_mtm_mcam/browse/crui... Product_Browse urn:esa:psa:bc_mtm_mcam:browse:cam_raw_sc_cam1... 1.0 NaT NaT bc_mtm_mcam browse cam_raw_sc_cam1_browse_20200515t025757_00_f__t...
2 /home/mbentley/Desktop/bc_mtm_mcam/browse/crui... Product_Browse urn:esa:psa:bc_mtm_mcam:browse:cam_raw_sc_cam1... 1.0 NaT NaT bc_mtm_mcam browse cam_raw_sc_cam1_browse_20200515t030752_00_f__t...
3 /home/mbentley/Desktop/bc_mtm_mcam/browse/crui... Product_Browse urn:esa:psa:bc_mtm_mcam:browse:cam_raw_sc_cam1... 1.0 NaT NaT bc_mtm_mcam browse cam_raw_sc_cam1_browse_20200515t031747_00_f__t...
4 /home/mbentley/Desktop/bc_mtm_mcam/browse/crui... Product_Browse urn:esa:psa:bc_mtm_mcam:browse:cam_raw_sc_cam1... 1.0 NaT NaT bc_mtm_mcam browse cam_raw_sc_cam1_browse_20200515t032742_00_f__t...
In [6]:
idx[idx.product_type=='Product_Observational'].head()
Out[6]:
filename product_type lid vid start_time stop_time bundle collection product_id
204 /home/mbentley/Desktop/bc_mtm_mcam/data_raw/cr... Product_Observational urn:esa:psa:bc_mtm_mcam:data_raw:cam_raw_sc_ca... 1.0 2020-05-15 02:48:02.940 2020-05-15 02:48:02.960 bc_mtm_mcam data_raw cam_raw_sc_cam1_image_20200515t024802_00_f__t0020
205 /home/mbentley/Desktop/bc_mtm_mcam/data_raw/cr... Product_Observational urn:esa:psa:bc_mtm_mcam:data_raw:cam_raw_sc_ca... 1.0 2020-05-15 02:57:57.930 2020-05-15 02:57:57.950 bc_mtm_mcam data_raw cam_raw_sc_cam1_image_20200515t025757_00_f__t0020
206 /home/mbentley/Desktop/bc_mtm_mcam/data_raw/cr... Product_Observational urn:esa:psa:bc_mtm_mcam:data_raw:cam_raw_sc_ca... 1.0 2020-05-15 03:07:52.930 2020-05-15 03:07:52.950 bc_mtm_mcam data_raw cam_raw_sc_cam1_image_20200515t030752_00_f__t0020
207 /home/mbentley/Desktop/bc_mtm_mcam/data_raw/cr... Product_Observational urn:esa:psa:bc_mtm_mcam:data_raw:cam_raw_sc_ca... 1.0 2020-05-15 03:17:47.940 2020-05-15 03:17:47.960 bc_mtm_mcam data_raw cam_raw_sc_cam1_image_20200515t031747_00_f__t0020
208 /home/mbentley/Desktop/bc_mtm_mcam/data_raw/cr... Product_Observational urn:esa:psa:bc_mtm_mcam:data_raw:cam_raw_sc_ca... 1.0 2020-05-15 03:27:42.940 2020-05-15 03:27:42.960 bc_mtm_mcam data_raw cam_raw_sc_cam1_image_20200515t032742_00_f__t0020
In [ ]: