Package: planetarypy
PlanetaryPyPotential
logo:InstallpipinstallplanetarypyThis will pull in these other dependencies and their dependencies:tomlkit pandas pvl numpy python-dateutil tqdm lxml yarl hirise-tools kalasirisSuggested standard abbreviations:Inside these docs the package will be calledPLPYfor brevity.A standard Python import could be:plporplpybecause the lastpinplpcan be pronounced out, we consider
these equivalent for human conversation and pronounce these
“plippy”.General scopeFirst and foremost this package should provide support in working with
planetary science data.Withworkingwe mean:locatingretrievingreadingfurther processingof data.LocatingThis library manages, via itsPDS 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)parquetfile format. > Parquet is able to store advanced datatypes like
nan-capable integer and full datetime objects, as opposed to HDF5.RetrievingThe 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.ReadingFor now, the library only returns the path to the object and the user
needs to sort out the reading process. A recently funded NASA projectPlanetary Data Readerwill 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 partiesThere 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 theplanetarypyGitHub organization, if so
desired.Further processingIn 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
bodyPDS toolsLook at theAppsdocs to see whatpds.appsexist for easily getting
PDS indexes. Thefind_indexapp 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):CassiniISS (all)UVIS (all)MROCTX EDRHiRISEEDR, RDR, DTMEDR index has a bug (as delivered by the team, reported), where
I need to activate an existing fix for it.LRODiviner (DLRE)EDR, RDRLOLAEDR, RDRMore indexesMore 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.tomlUtilsFind something inUtilsfor working with NASA timestamps and a well
working URL download functionurl_retrieve,
among other stuff.Experiment/Instrument SpecificSo far,planetarypysupports CTX EDR and HiRISE RGB.NOMAP data. Look
at theCTXandHiRISEpages for descriptions of classes for working with these data.Bug reportsPlease submit bug reports athttps://github.com/michaelaye/nbplanetary/issuesHow to useIndexesSeePDS appsfor more details.fromplanetarypy.pds.appsimportget_indexctrindex=get_index("mro.ctx","edr")ctrindex.sample(5,random_state=42)# setting random_state to always get same files for docs<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}</style>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_NUMBER102927MROX_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 HiRISEOK56855116952MROX_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 AustraleOK6544216386MROX_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 outlierOK10083107515MROX_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 CimmeriaOK5905957288MROX_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 siteOK335135 rows × 51 columnshirise_rdr=get_index("mro.hirise","rdr")hirise_rdr.sample(5,random_state=42)<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}</style>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_LONGITUDE95782MROHR_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.0210142902MROHR_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.4520114241MROHR_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.2454260MROHR_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.9430148555MROHR_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.61675 rows × 54 columnsInstrument toolsCTXfromplanetarypy.ctximportCTXUnable 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<style>.bk-root, .bk-root .bk:before, .bk-root .bk:after {
  font-family: var(--jp-ui-font-size1);
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color1);
}
</style>pid=ctrindex.sample(random_state=42).squeeze().PRODUCT_IDpid'K09_056855_1472_XN_32S152W'ctx=CTX(pid)ctxPRODUCT_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)ctx.source_pathPath('/home/ayek72/mnt/troveplanets/pds/mrox_3290/K09_056855_1472_XN_32S152W.IMG')ctx.download()File exists. Use `overwrite=True` to download fresh.AcknowledgementsThe creation of this library was in part supported by:NASA Cassini UVIS missionNASA SSW grant NNX15AH36GNASA PDART grant 80NSSC20K0875NASA SSW grant 80NSSC20K0748German 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.https://doi.org/10.5281/zenodo.7443567.