From 0ab0e8e73d9542df7968cc644035c379a8c86550 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 18 May 2023 03:10:55 +0000 Subject: automatic import of python-planetarypy --- .gitignore | 1 + python-planetarypy.spec | 1558 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 1560 insertions(+) create mode 100644 python-planetarypy.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..6821edd 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/planetarypy-0.26.4.tar.gz diff --git a/python-planetarypy.spec b/python-planetarypy.spec new file mode 100644 index 0000000..8edd4af --- /dev/null +++ b/python-planetarypy.spec @@ -0,0 +1,1558 @@ +%global _empty_manifest_terminate_build 0 +Name: python-planetarypy +Version: 0.26.4 +Release: 1 +Summary: Python Tools for Planetary Science +License: MIT License +URL: https://github.com/michaelaye/nbplanetary +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/37/2b/d508b045571b46a37136a4cd6c788042d186ccbfccad1e3a1fa344a9fed4/planetarypy-0.26.4.tar.gz +BuildArch: noarch + +Requires: python3-tomlkit +Requires: python3-pandas +Requires: python3-pvl +Requires: python3-numpy +Requires: python3-dateutil +Requires: python3-tqdm +Requires: python3-lxml +Requires: python3-yarl +Requires: python3-kalasiris +Requires: python3-dask +Requires: python3-fastparquet +Requires: python3-rioxarray +Requires: python3-matplotlib +Requires: python3-hvplot +Requires: python3-requests +Requires: python3-astropy +Requires: python3-fastcore +Requires: python3-datashader +Requires: python3-ipywidgets +Requires: python3-gdal +Requires: python3-spiceypy +Requires: python3-rasterio + +%description + +Potential +logo:![image.png](images/epilup_with_python_logo_with_axis.png) +## Install +``` bash +pip install planetarypy +``` +This will pull in these other dependencies and their dependencies: +`tomlkit pandas pvl numpy python-dateutil tqdm lxml yarl hirise-tools kalasiris` +## Suggested standard abbreviations: +- Inside these docs the package will be called `PLPY` for brevity. +- A standard Python import could be: `plp` or `plpy` + - because the last `p` in `plp` can be pronounced out, we consider + these equivalent for human conversation and pronounce these + “plippy”. +## General scope +First and foremost this package should provide support in working with +planetary science data. +With `working` we mean: +- locating +- retrieving +- reading +- further processing +of data. +### Locating +This library manages, via its `PDS tools`, multiple PDS3 index files per +instrument that can be used for identifying data of interest. These +index files are automatically downloaded and converted to the very +performant (and cloud-ready) +[parquet](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) +file format. \> Parquet is able to store advanced datatypes like +nan-capable integer and full datetime objects, as opposed to HDF5. +### Retrieving +The interface to getting data is via a path-retrieving function based on +a PDS product-id. If that product-id is available locally, the path will +be returned. If it is not, it will previously be downloaded, stored in a +systematic fashion organized by mission and instrument, and then the +local path will be returned. +### Reading +For now, the library only returns the path to the object and the user +needs to sort out the reading process. A recently funded NASA project +`Planetary Data Reader` will be integrated here, so that basic reading +into memory can be provided. +As such, we anticipate two classes of reading support: 1. basic reading +into numpy and/or xarray 1. added reader functionality like basic plots +and basic geospatial processing, as supported by interested parties +There will exist larger other packages that focus on working with a +given instrument’s data, in which case that package could become an +affiliated package with the `planetarypy` GitHub organization, if so +desired. +### Further processing +In the future, additional frequently used procedures will be added to +this library, e.g. \* frequently used GDAL/rasterio procedures \* +frequently used SPICE operations \* like surface illumination on a given +body +## PDS tools +Look at the `Apps` docs to see what `pds.apps` exist for easily getting +PDS indexes. The `find_index` app is specifically useful when you don’t +know what index files exist. +So far, the following indexes are supported (but not necessarily all +tested within PLPY): +- Cassini + - ISS (all) + - UVIS (all) +- MRO + - CTX EDR + - HiRISE + - EDR, RDR, DTM + - EDR index has a bug (as delivered by the team, reported), where + I need to activate an existing fix for it. +- LRO + - Diviner (DLRE) + - EDR, RDR + - LOLA + - EDR, RDR +### More indexes +More indexes of other instruments can be easily added by following the +existing structure of what has been copied into your config at +`~/.planetarypy_config.toml`. +Please consider submitting a pull request for adding further PDS index +files into the config file at its source: +https://github.com/michaelaye/nbplanetary/blob/master/planetarypy/data/planetarypy_config.toml +## Utils +Find something in `Utils` for working with NASA timestamps and a well +working URL download function +[`url_retrieve`](https://michaelaye.github.io/planetarypy/api/utils.html#url_retrieve), +among other stuff. +## Experiment/Instrument Specific +So far, `planetarypy` supports CTX EDR and HiRISE RGB.NOMAP data. Look +at the +[`CTX`](https://michaelaye.github.io/planetarypy/api/ctx.html#ctx) and +`HiRISE` pages for descriptions of classes for working with these data. +## Bug reports +Please submit bug reports at +https://github.com/michaelaye/nbplanetary/issues +## How to use +### Indexes +See [PDS apps](api/02c_pds.apps.ipynb) for more details. +``` python +from planetarypy.pds.apps import get_index +``` +``` python +ctrindex = get_index("mro.ctx", "edr") +ctrindex.sample(5, random_state=42) # setting random_state to always get same files for docs +``` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VOLUME_IDFILE_SPECIFICATION_NAMEORIGINAL_PRODUCT_IDPRODUCT_IDIMAGE_TIMEINSTRUMENT_IDINSTRUMENT_MODE_IDLINE_SAMPLESLINESSPATIAL_SUMMING...SUB_SOLAR_LATITUDESUB_SPACECRAFT_LONGITUDESUB_SPACECRAFT_LATITUDESOLAR_DISTANCESOLAR_LONGITUDELOCAL_TIMEIMAGE_SKEW_ANGLERATIONALE_DESCDATA_QUALITY_DESCORBIT_NUMBER
102927MROX_3290DATA/K09_056855_1472_XN_32S152W.IMG4A_04_112001B600K09_056855_1472_XN_32S152W2018-09-12 15:27:23.819CTXNIFL505671681...-23.61152.16-32.84206674590.7248.7015.1290.1Ride-along with HiRISEOK56855
116952MROX_3714DATA/N08_065442_0965_XN_83S191W.IMG4A_04_114C019800N08_065442_0965_XN_83S191W2020-07-12 17:31:23.962CTXNIFL5056337921...-21.24190.23-83.51207154930.4237.3717.1291.4Planum AustraleOK65442
16386MROX_0690DATA/B01_010083_2567_XI_76N181W.IMG4A_04_103101E100B01_010083_2567_XI_76N181W2008-09-20 04:33:05.584CTXITL5056522241...19.30180.8076.84237461101.1129.8014.7689.7North polar outlierOK10083
107515MROX_3450DATA/K15_059059_1434_XN_36S196W.IMG4A_04_112C004300K15_059059_1434_XN_36S196W2019-03-03 08:44:14.027CTXNIFL252892161...-4.38196.66-36.69229158765.3349.7914.2190.1Craters in Terra CimmeriaOK59059
57288MROX_1890DATA/D16_033513_1653_XI_14S108W.IMG4A_04_10A9016F00D16_033513_1653_XI_14S108W2013-09-19 20:45:34.363CTXITL5056153601...10.17108.53-14.83241359283.424.2114.6690.2Syria/Claritas dust-raising event monitoring siteOK33513
+

5 rows × 51 columns

+
+``` python +hirise_rdr = get_index("mro.hirise", "rdr") +hirise_rdr.sample(5, random_state=42) +``` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VOLUME_IDFILE_NAME_SPECIFICATIONINSTRUMENT_HOST_IDINSTRUMENT_IDOBSERVATION_IDPRODUCT_IDPRODUCT_VERSION_IDTARGET_NAMEORBIT_NUMBERMISSION_PHASE_NAME...LINE_PROJECTION_OFFSETSAMPLE_PROJECTION_OFFSETCORNER1_LATITUDECORNER1_LONGITUDECORNER2_LATITUDECORNER2_LONGITUDECORNER3_LATITUDECORNER3_LONGITUDECORNER4_LATITUDECORNER4_LONGITUDE
95782MROHR_0001RDR/ESP/ORB_049400_049499/ESP_049456_0945/ESP_...MROHIRISEESP_049456_0945ESP_049456_0945_COLOR1MARS49456Extended Science Phase...289555.51014477.5-85.6701286.4690-85.6815286.3020-85.5562284.8560-85.5452285.0210
142902MROHR_0001RDR/ESP/ORB_072700_072799/ESP_072755_2030/ESP_...MROHIRISEESP_072755_2030ESP_072755_2030_RED1MARS72755Extended Science Phase...5448057.5-36148404.022.8511342.471022.8408342.377022.9836342.359022.9940342.4520
114241MROHR_0001RDR/ESP/ORB_057400_057499/ESP_057400_1150/ESP_...MROHIRISEESP_057400_1150ESP_057400_1150_RED1MARS57400Extended Science Phase...-15324106.09551808.0-65.063199.2951-65.073999.1184-64.929799.0696-64.919099.2454
260MROHR_0001RDR/PSP/ORB_001300_001399/PSP_001390_2290/PSP_...MROHIRISEPSP_001390_2290PSP_001390_2290_RED2MARS1390Primary Science Phase...11574100.0-17349000.048.8086283.969048.7969283.815048.9486283.788048.9603283.9430
148555MROHR_0001RDR/ESP/ORB_075600_075699/ESP_075617_0955/ESP_...MROHIRISEESP_075617_0955ESP_075617_0955_RED1MARS75617Extended Science Phase...1299053.5-203581.5-84.520010.3353-84.56209.6666-84.45578.9553-84.41459.6167
+

5 rows × 54 columns

+
+## Instrument tools +### CTX +``` python +from planetarypy.ctx import CTX +``` + Unable to display output for mime type(s): application/javascript, application/vnd.holoviews_load.v0+json + Unable to display output for mime type(s): application/javascript, application/vnd.holoviews_load.v0+json + +``` python +pid = ctrindex.sample(random_state=42).squeeze().PRODUCT_ID +pid +``` + 'K09_056855_1472_XN_32S152W' +``` python +ctx = CTX(pid) +ctx +``` + PRODUCT_ID: K09_056855_1472_XN_32S152W + URL: https://pds-imaging.jpl.nasa.gov/data/mro/mars_reconnaissance_orbiter/ctx/mrox_3290/data/K09_056855_1472_XN_32S152W.IMG + source_path: /home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG + Shape: (7168, 5056) +``` python +ctx.source_path +``` + Path('/home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG') +``` python +ctx.download() +``` + File exists. Use `overwrite=True` to download fresh. +## Acknowledgements +The creation of this library was in part supported by: +- NASA Cassini UVIS mission +- NASA SSW grant NNX15AH36G +- NASA PDART grant 80NSSC20K0875 +- NASA SSW grant 80NSSC20K0748 +- German Space Agency (DLR Bonn), grant 50 OO 2204, on behalf of the + German Federal Ministry for Economic Affairs and Climate Action. +- This research has made use of the USGS Integrated Software for Imagers + and Spectrometers (ISIS)(Laura et al. 2022). +
+
+Laura, Jason, Alex Acosta, Travis Addair, Lauren Adoram-Kershner, James +Alexander, Oleg Alexandrov, Stacey Alley, et al. 2022. *Integrated +Software for Imagers and Spectrometers* (version 7.2.0_RC1). Zenodo. +. +
+
+ +%package -n python3-planetarypy +Summary: Python Tools for Planetary Science +Provides: python-planetarypy +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-planetarypy + +Potential +logo:![image.png](images/epilup_with_python_logo_with_axis.png) +## Install +``` bash +pip install planetarypy +``` +This will pull in these other dependencies and their dependencies: +`tomlkit pandas pvl numpy python-dateutil tqdm lxml yarl hirise-tools kalasiris` +## Suggested standard abbreviations: +- Inside these docs the package will be called `PLPY` for brevity. +- A standard Python import could be: `plp` or `plpy` + - because the last `p` in `plp` can be pronounced out, we consider + these equivalent for human conversation and pronounce these + “plippy”. +## General scope +First and foremost this package should provide support in working with +planetary science data. +With `working` we mean: +- locating +- retrieving +- reading +- further processing +of data. +### Locating +This library manages, via its `PDS tools`, multiple PDS3 index files per +instrument that can be used for identifying data of interest. These +index files are automatically downloaded and converted to the very +performant (and cloud-ready) +[parquet](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) +file format. \> Parquet is able to store advanced datatypes like +nan-capable integer and full datetime objects, as opposed to HDF5. +### Retrieving +The interface to getting data is via a path-retrieving function based on +a PDS product-id. If that product-id is available locally, the path will +be returned. If it is not, it will previously be downloaded, stored in a +systematic fashion organized by mission and instrument, and then the +local path will be returned. +### Reading +For now, the library only returns the path to the object and the user +needs to sort out the reading process. A recently funded NASA project +`Planetary Data Reader` will be integrated here, so that basic reading +into memory can be provided. +As such, we anticipate two classes of reading support: 1. basic reading +into numpy and/or xarray 1. added reader functionality like basic plots +and basic geospatial processing, as supported by interested parties +There will exist larger other packages that focus on working with a +given instrument’s data, in which case that package could become an +affiliated package with the `planetarypy` GitHub organization, if so +desired. +### Further processing +In the future, additional frequently used procedures will be added to +this library, e.g. \* frequently used GDAL/rasterio procedures \* +frequently used SPICE operations \* like surface illumination on a given +body +## PDS tools +Look at the `Apps` docs to see what `pds.apps` exist for easily getting +PDS indexes. The `find_index` app is specifically useful when you don’t +know what index files exist. +So far, the following indexes are supported (but not necessarily all +tested within PLPY): +- Cassini + - ISS (all) + - UVIS (all) +- MRO + - CTX EDR + - HiRISE + - EDR, RDR, DTM + - EDR index has a bug (as delivered by the team, reported), where + I need to activate an existing fix for it. +- LRO + - Diviner (DLRE) + - EDR, RDR + - LOLA + - EDR, RDR +### More indexes +More indexes of other instruments can be easily added by following the +existing structure of what has been copied into your config at +`~/.planetarypy_config.toml`. +Please consider submitting a pull request for adding further PDS index +files into the config file at its source: +https://github.com/michaelaye/nbplanetary/blob/master/planetarypy/data/planetarypy_config.toml +## Utils +Find something in `Utils` for working with NASA timestamps and a well +working URL download function +[`url_retrieve`](https://michaelaye.github.io/planetarypy/api/utils.html#url_retrieve), +among other stuff. +## Experiment/Instrument Specific +So far, `planetarypy` supports CTX EDR and HiRISE RGB.NOMAP data. Look +at the +[`CTX`](https://michaelaye.github.io/planetarypy/api/ctx.html#ctx) and +`HiRISE` pages for descriptions of classes for working with these data. +## Bug reports +Please submit bug reports at +https://github.com/michaelaye/nbplanetary/issues +## How to use +### Indexes +See [PDS apps](api/02c_pds.apps.ipynb) for more details. +``` python +from planetarypy.pds.apps import get_index +``` +``` python +ctrindex = get_index("mro.ctx", "edr") +ctrindex.sample(5, random_state=42) # setting random_state to always get same files for docs +``` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VOLUME_IDFILE_SPECIFICATION_NAMEORIGINAL_PRODUCT_IDPRODUCT_IDIMAGE_TIMEINSTRUMENT_IDINSTRUMENT_MODE_IDLINE_SAMPLESLINESSPATIAL_SUMMING...SUB_SOLAR_LATITUDESUB_SPACECRAFT_LONGITUDESUB_SPACECRAFT_LATITUDESOLAR_DISTANCESOLAR_LONGITUDELOCAL_TIMEIMAGE_SKEW_ANGLERATIONALE_DESCDATA_QUALITY_DESCORBIT_NUMBER
102927MROX_3290DATA/K09_056855_1472_XN_32S152W.IMG4A_04_112001B600K09_056855_1472_XN_32S152W2018-09-12 15:27:23.819CTXNIFL505671681...-23.61152.16-32.84206674590.7248.7015.1290.1Ride-along with HiRISEOK56855
116952MROX_3714DATA/N08_065442_0965_XN_83S191W.IMG4A_04_114C019800N08_065442_0965_XN_83S191W2020-07-12 17:31:23.962CTXNIFL5056337921...-21.24190.23-83.51207154930.4237.3717.1291.4Planum AustraleOK65442
16386MROX_0690DATA/B01_010083_2567_XI_76N181W.IMG4A_04_103101E100B01_010083_2567_XI_76N181W2008-09-20 04:33:05.584CTXITL5056522241...19.30180.8076.84237461101.1129.8014.7689.7North polar outlierOK10083
107515MROX_3450DATA/K15_059059_1434_XN_36S196W.IMG4A_04_112C004300K15_059059_1434_XN_36S196W2019-03-03 08:44:14.027CTXNIFL252892161...-4.38196.66-36.69229158765.3349.7914.2190.1Craters in Terra CimmeriaOK59059
57288MROX_1890DATA/D16_033513_1653_XI_14S108W.IMG4A_04_10A9016F00D16_033513_1653_XI_14S108W2013-09-19 20:45:34.363CTXITL5056153601...10.17108.53-14.83241359283.424.2114.6690.2Syria/Claritas dust-raising event monitoring siteOK33513
+

5 rows × 51 columns

+
+``` python +hirise_rdr = get_index("mro.hirise", "rdr") +hirise_rdr.sample(5, random_state=42) +``` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VOLUME_IDFILE_NAME_SPECIFICATIONINSTRUMENT_HOST_IDINSTRUMENT_IDOBSERVATION_IDPRODUCT_IDPRODUCT_VERSION_IDTARGET_NAMEORBIT_NUMBERMISSION_PHASE_NAME...LINE_PROJECTION_OFFSETSAMPLE_PROJECTION_OFFSETCORNER1_LATITUDECORNER1_LONGITUDECORNER2_LATITUDECORNER2_LONGITUDECORNER3_LATITUDECORNER3_LONGITUDECORNER4_LATITUDECORNER4_LONGITUDE
95782MROHR_0001RDR/ESP/ORB_049400_049499/ESP_049456_0945/ESP_...MROHIRISEESP_049456_0945ESP_049456_0945_COLOR1MARS49456Extended Science Phase...289555.51014477.5-85.6701286.4690-85.6815286.3020-85.5562284.8560-85.5452285.0210
142902MROHR_0001RDR/ESP/ORB_072700_072799/ESP_072755_2030/ESP_...MROHIRISEESP_072755_2030ESP_072755_2030_RED1MARS72755Extended Science Phase...5448057.5-36148404.022.8511342.471022.8408342.377022.9836342.359022.9940342.4520
114241MROHR_0001RDR/ESP/ORB_057400_057499/ESP_057400_1150/ESP_...MROHIRISEESP_057400_1150ESP_057400_1150_RED1MARS57400Extended Science Phase...-15324106.09551808.0-65.063199.2951-65.073999.1184-64.929799.0696-64.919099.2454
260MROHR_0001RDR/PSP/ORB_001300_001399/PSP_001390_2290/PSP_...MROHIRISEPSP_001390_2290PSP_001390_2290_RED2MARS1390Primary Science Phase...11574100.0-17349000.048.8086283.969048.7969283.815048.9486283.788048.9603283.9430
148555MROHR_0001RDR/ESP/ORB_075600_075699/ESP_075617_0955/ESP_...MROHIRISEESP_075617_0955ESP_075617_0955_RED1MARS75617Extended Science Phase...1299053.5-203581.5-84.520010.3353-84.56209.6666-84.45578.9553-84.41459.6167
+

5 rows × 54 columns

+
+## Instrument tools +### CTX +``` python +from planetarypy.ctx import CTX +``` + Unable to display output for mime type(s): application/javascript, application/vnd.holoviews_load.v0+json + Unable to display output for mime type(s): application/javascript, application/vnd.holoviews_load.v0+json + +``` python +pid = ctrindex.sample(random_state=42).squeeze().PRODUCT_ID +pid +``` + 'K09_056855_1472_XN_32S152W' +``` python +ctx = CTX(pid) +ctx +``` + PRODUCT_ID: K09_056855_1472_XN_32S152W + URL: https://pds-imaging.jpl.nasa.gov/data/mro/mars_reconnaissance_orbiter/ctx/mrox_3290/data/K09_056855_1472_XN_32S152W.IMG + source_path: /home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG + Shape: (7168, 5056) +``` python +ctx.source_path +``` + Path('/home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG') +``` python +ctx.download() +``` + File exists. Use `overwrite=True` to download fresh. +## Acknowledgements +The creation of this library was in part supported by: +- NASA Cassini UVIS mission +- NASA SSW grant NNX15AH36G +- NASA PDART grant 80NSSC20K0875 +- NASA SSW grant 80NSSC20K0748 +- German Space Agency (DLR Bonn), grant 50 OO 2204, on behalf of the + German Federal Ministry for Economic Affairs and Climate Action. +- This research has made use of the USGS Integrated Software for Imagers + and Spectrometers (ISIS)(Laura et al. 2022). +
+
+Laura, Jason, Alex Acosta, Travis Addair, Lauren Adoram-Kershner, James +Alexander, Oleg Alexandrov, Stacey Alley, et al. 2022. *Integrated +Software for Imagers and Spectrometers* (version 7.2.0_RC1). Zenodo. +. +
+
+ +%package help +Summary: Development documents and examples for planetarypy +Provides: python3-planetarypy-doc +%description help + +Potential +logo:![image.png](images/epilup_with_python_logo_with_axis.png) +## Install +``` bash +pip install planetarypy +``` +This will pull in these other dependencies and their dependencies: +`tomlkit pandas pvl numpy python-dateutil tqdm lxml yarl hirise-tools kalasiris` +## Suggested standard abbreviations: +- Inside these docs the package will be called `PLPY` for brevity. +- A standard Python import could be: `plp` or `plpy` + - because the last `p` in `plp` can be pronounced out, we consider + these equivalent for human conversation and pronounce these + “plippy”. +## General scope +First and foremost this package should provide support in working with +planetary science data. +With `working` we mean: +- locating +- retrieving +- reading +- further processing +of data. +### Locating +This library manages, via its `PDS tools`, multiple PDS3 index files per +instrument that can be used for identifying data of interest. These +index files are automatically downloaded and converted to the very +performant (and cloud-ready) +[parquet](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) +file format. \> Parquet is able to store advanced datatypes like +nan-capable integer and full datetime objects, as opposed to HDF5. +### Retrieving +The interface to getting data is via a path-retrieving function based on +a PDS product-id. If that product-id is available locally, the path will +be returned. If it is not, it will previously be downloaded, stored in a +systematic fashion organized by mission and instrument, and then the +local path will be returned. +### Reading +For now, the library only returns the path to the object and the user +needs to sort out the reading process. A recently funded NASA project +`Planetary Data Reader` will be integrated here, so that basic reading +into memory can be provided. +As such, we anticipate two classes of reading support: 1. basic reading +into numpy and/or xarray 1. added reader functionality like basic plots +and basic geospatial processing, as supported by interested parties +There will exist larger other packages that focus on working with a +given instrument’s data, in which case that package could become an +affiliated package with the `planetarypy` GitHub organization, if so +desired. +### Further processing +In the future, additional frequently used procedures will be added to +this library, e.g. \* frequently used GDAL/rasterio procedures \* +frequently used SPICE operations \* like surface illumination on a given +body +## PDS tools +Look at the `Apps` docs to see what `pds.apps` exist for easily getting +PDS indexes. The `find_index` app is specifically useful when you don’t +know what index files exist. +So far, the following indexes are supported (but not necessarily all +tested within PLPY): +- Cassini + - ISS (all) + - UVIS (all) +- MRO + - CTX EDR + - HiRISE + - EDR, RDR, DTM + - EDR index has a bug (as delivered by the team, reported), where + I need to activate an existing fix for it. +- LRO + - Diviner (DLRE) + - EDR, RDR + - LOLA + - EDR, RDR +### More indexes +More indexes of other instruments can be easily added by following the +existing structure of what has been copied into your config at +`~/.planetarypy_config.toml`. +Please consider submitting a pull request for adding further PDS index +files into the config file at its source: +https://github.com/michaelaye/nbplanetary/blob/master/planetarypy/data/planetarypy_config.toml +## Utils +Find something in `Utils` for working with NASA timestamps and a well +working URL download function +[`url_retrieve`](https://michaelaye.github.io/planetarypy/api/utils.html#url_retrieve), +among other stuff. +## Experiment/Instrument Specific +So far, `planetarypy` supports CTX EDR and HiRISE RGB.NOMAP data. Look +at the +[`CTX`](https://michaelaye.github.io/planetarypy/api/ctx.html#ctx) and +`HiRISE` pages for descriptions of classes for working with these data. +## Bug reports +Please submit bug reports at +https://github.com/michaelaye/nbplanetary/issues +## How to use +### Indexes +See [PDS apps](api/02c_pds.apps.ipynb) for more details. +``` python +from planetarypy.pds.apps import get_index +``` +``` python +ctrindex = get_index("mro.ctx", "edr") +ctrindex.sample(5, random_state=42) # setting random_state to always get same files for docs +``` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VOLUME_IDFILE_SPECIFICATION_NAMEORIGINAL_PRODUCT_IDPRODUCT_IDIMAGE_TIMEINSTRUMENT_IDINSTRUMENT_MODE_IDLINE_SAMPLESLINESSPATIAL_SUMMING...SUB_SOLAR_LATITUDESUB_SPACECRAFT_LONGITUDESUB_SPACECRAFT_LATITUDESOLAR_DISTANCESOLAR_LONGITUDELOCAL_TIMEIMAGE_SKEW_ANGLERATIONALE_DESCDATA_QUALITY_DESCORBIT_NUMBER
102927MROX_3290DATA/K09_056855_1472_XN_32S152W.IMG4A_04_112001B600K09_056855_1472_XN_32S152W2018-09-12 15:27:23.819CTXNIFL505671681...-23.61152.16-32.84206674590.7248.7015.1290.1Ride-along with HiRISEOK56855
116952MROX_3714DATA/N08_065442_0965_XN_83S191W.IMG4A_04_114C019800N08_065442_0965_XN_83S191W2020-07-12 17:31:23.962CTXNIFL5056337921...-21.24190.23-83.51207154930.4237.3717.1291.4Planum AustraleOK65442
16386MROX_0690DATA/B01_010083_2567_XI_76N181W.IMG4A_04_103101E100B01_010083_2567_XI_76N181W2008-09-20 04:33:05.584CTXITL5056522241...19.30180.8076.84237461101.1129.8014.7689.7North polar outlierOK10083
107515MROX_3450DATA/K15_059059_1434_XN_36S196W.IMG4A_04_112C004300K15_059059_1434_XN_36S196W2019-03-03 08:44:14.027CTXNIFL252892161...-4.38196.66-36.69229158765.3349.7914.2190.1Craters in Terra CimmeriaOK59059
57288MROX_1890DATA/D16_033513_1653_XI_14S108W.IMG4A_04_10A9016F00D16_033513_1653_XI_14S108W2013-09-19 20:45:34.363CTXITL5056153601...10.17108.53-14.83241359283.424.2114.6690.2Syria/Claritas dust-raising event monitoring siteOK33513
+

5 rows × 51 columns

+
+``` python +hirise_rdr = get_index("mro.hirise", "rdr") +hirise_rdr.sample(5, random_state=42) +``` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VOLUME_IDFILE_NAME_SPECIFICATIONINSTRUMENT_HOST_IDINSTRUMENT_IDOBSERVATION_IDPRODUCT_IDPRODUCT_VERSION_IDTARGET_NAMEORBIT_NUMBERMISSION_PHASE_NAME...LINE_PROJECTION_OFFSETSAMPLE_PROJECTION_OFFSETCORNER1_LATITUDECORNER1_LONGITUDECORNER2_LATITUDECORNER2_LONGITUDECORNER3_LATITUDECORNER3_LONGITUDECORNER4_LATITUDECORNER4_LONGITUDE
95782MROHR_0001RDR/ESP/ORB_049400_049499/ESP_049456_0945/ESP_...MROHIRISEESP_049456_0945ESP_049456_0945_COLOR1MARS49456Extended Science Phase...289555.51014477.5-85.6701286.4690-85.6815286.3020-85.5562284.8560-85.5452285.0210
142902MROHR_0001RDR/ESP/ORB_072700_072799/ESP_072755_2030/ESP_...MROHIRISEESP_072755_2030ESP_072755_2030_RED1MARS72755Extended Science Phase...5448057.5-36148404.022.8511342.471022.8408342.377022.9836342.359022.9940342.4520
114241MROHR_0001RDR/ESP/ORB_057400_057499/ESP_057400_1150/ESP_...MROHIRISEESP_057400_1150ESP_057400_1150_RED1MARS57400Extended Science Phase...-15324106.09551808.0-65.063199.2951-65.073999.1184-64.929799.0696-64.919099.2454
260MROHR_0001RDR/PSP/ORB_001300_001399/PSP_001390_2290/PSP_...MROHIRISEPSP_001390_2290PSP_001390_2290_RED2MARS1390Primary Science Phase...11574100.0-17349000.048.8086283.969048.7969283.815048.9486283.788048.9603283.9430
148555MROHR_0001RDR/ESP/ORB_075600_075699/ESP_075617_0955/ESP_...MROHIRISEESP_075617_0955ESP_075617_0955_RED1MARS75617Extended Science Phase...1299053.5-203581.5-84.520010.3353-84.56209.6666-84.45578.9553-84.41459.6167
+

5 rows × 54 columns

+
+## Instrument tools +### CTX +``` python +from planetarypy.ctx import CTX +``` + Unable to display output for mime type(s): application/javascript, application/vnd.holoviews_load.v0+json + Unable to display output for mime type(s): application/javascript, application/vnd.holoviews_load.v0+json + +``` python +pid = ctrindex.sample(random_state=42).squeeze().PRODUCT_ID +pid +``` + 'K09_056855_1472_XN_32S152W' +``` python +ctx = CTX(pid) +ctx +``` + PRODUCT_ID: K09_056855_1472_XN_32S152W + URL: https://pds-imaging.jpl.nasa.gov/data/mro/mars_reconnaissance_orbiter/ctx/mrox_3290/data/K09_056855_1472_XN_32S152W.IMG + source_path: /home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG + Shape: (7168, 5056) +``` python +ctx.source_path +``` + Path('/home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG') +``` python +ctx.download() +``` + File exists. Use `overwrite=True` to download fresh. +## Acknowledgements +The creation of this library was in part supported by: +- NASA Cassini UVIS mission +- NASA SSW grant NNX15AH36G +- NASA PDART grant 80NSSC20K0875 +- NASA SSW grant 80NSSC20K0748 +- German Space Agency (DLR Bonn), grant 50 OO 2204, on behalf of the + German Federal Ministry for Economic Affairs and Climate Action. +- This research has made use of the USGS Integrated Software for Imagers + and Spectrometers (ISIS)(Laura et al. 2022). +
+
+Laura, Jason, Alex Acosta, Travis Addair, Lauren Adoram-Kershner, James +Alexander, Oleg Alexandrov, Stacey Alley, et al. 2022. *Integrated +Software for Imagers and Spectrometers* (version 7.2.0_RC1). Zenodo. +. +
+
+ +%prep +%autosetup -n planetarypy-0.26.4 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-planetarypy -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot - 0.26.4-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..e3a9045 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +81c939bdec2348f87f8694e71deaa9c2 planetarypy-0.26.4.tar.gz -- cgit v1.2.3