diff --git a/notebooks/tutorials/PDW2023_Demo.ipynb b/notebooks/tutorials/PDW2023_Demo.ipynb new file mode 100644 index 0000000..4511d32 --- /dev/null +++ b/notebooks/tutorials/PDW2023_Demo.ipynb @@ -0,0 +1,4427 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "64edae5d-7c65-4fcb-bb0b-67bf55809abd", + "metadata": {}, + "source": [ + "# Demo of PlanetaryPy\n", + "\n", + "We support Python 3.9+, so I'm running this demo in Python 3.9.\n", + "\n", + "## Installation\n", + "\n", + "The package isn't streamlined for dependencies, so we need to install a fair bit of them:\n", + "\n", + "```\n", + "tomlkit pandas pvl numpy python-dateutil tqdm lxml yarl kalasiris dask fastparquet rioxarray matplotlib hvplot requests astropy fastcore datashader ipywidgets gdal spiceypy rasterio\n", + "```\n", + "\n", + "It's fastest to install these with conda first, and then to install `planetarypy` with pip. (no conda package yet)\n", + "\n", + "Current version: 0.27.5" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5cd9250a-c0bd-4522-9c96-c252da7112a0", + "metadata": {}, + "outputs": [], + "source": [ + "import planetarypy as plpy" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3e309eca-8f0c-4df1-a16d-193892c4ff8e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'0.27.5'" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plpy.__version__" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "58a59e97-c0c1-422a-bd89-e0b88cdf2a89", + "metadata": {}, + "outputs": [], + "source": [ + "from planetarypy.pds.apps import get_index, find_indexes" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "60c8b54f-8dda-4668-817f-ba6e1060c397", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "storage_root = \"/Users/maye/planetarypy_data\"\n", + "\n", + "[missions.cassini.iss.indexes.index]\n", + "# 'index' is the ID of the originally delivered index\n", + "# inventory, moon_summary, ring_summary, and saturn_summary are other indexes produced\n", + "# by the Rings-Moons Systems PDS node\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_index.lbl\"\n", + "timestamp = \"2023-06-19T20:55:45.702690\"\n", + "\n", + "[missions.cassini.iss.indexes.inventory]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_inventory.lbl\"\n", + "\n", + "[missions.cassini.iss.indexes.moon_summary]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_moon_summary.lbl\"\n", + "timestamp = \"\"\n", + "\n", + "[missions.cassini.iss.indexes.ring_summary]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_ring_summary.lbl\"\n", + "timestamp = \"\"\n", + "\n", + "[missions.cassini.iss.indexes.saturn_summary]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_saturn_summary.lbl\"\n", + "timestamp = \"\"\n", + "\n", + "\n", + "[missions.cassini.uvis.indexes.index]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COUVIS_0xxx/COUVIS_0999/COUVIS_0999_index.lbl\"\n", + "timestamp = \"\"\n", + "\n", + "[missions.cassini.uvis.indexes.moon_summary]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COUVIS_0xxx/COUVIS_0999/COUVIS_0999_moon_summary.lbl\"\n", + "\n", + "[missions.cassini.uvis.indexes.ring_summary]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COUVIS_0xxx/COUVIS_0999/COUVIS_0999_ring_summary.lbl\"\n", + "timestamp = \"\"\n", + "\n", + "[missions.cassini.uvis.indexes.saturn_summary]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COUVIS_0xxx/COUVIS_0999/COUVIS_0999_saturn_summary.lbl\"\n", + "\n", + "[missions.cassini.uvis.indexes.supplemental_index]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COUVIS_0xxx/COUVIS_0999/COUVIS_0999_supplemental_index.lbl\"\n", + "\n", + "[missions.cassini.uvis.indexes.versions]\n", + "url = \"https://pds-rings.seti.org/holdings/metadata/COUVIS_0xxx/COUVIS_0999/COUVIS_0999_versions.lbl\"\n", + "\n", + "\n", + "\n", + "[missions.mro.hirise.indexes.dtm]\n", + "url = \"https://hirise-pds.lpl.arizona.edu/PDS/INDEX/DTMCUMINDEX.LBL\"\n", + "\n" + ] + } + ], + "source": [ + "!head -n 50 $HOME/.planetarypy_config.toml" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4b8fc614-b3a2-43a0-a1da-a7ade1371e64", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['index', 'inventory', 'moon_summary', 'ring_summary', 'saturn_summary']" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "find_indexes(\"cassini.iss\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d5492c59-7d55-4d64-8719-7f841aa52ac7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['index',\n", + " 'moon_summary',\n", + " 'ring_summary',\n", + " 'saturn_summary',\n", + " 'supplemental_index',\n", + " 'versions']" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "find_indexes(\"cassini.uvis\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ae6bb854-216a-4d6b-a9bf-0a6fb212e331", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
FILE_NAMEFILE_SPECIFICATION_NAMEVOLUME_IDANTIBLOOMING_STATE_FLAGBIAS_STRIP_MEANCALIBRATION_LAMP_STATE_FLAGCOMMAND_FILE_NAMECOMMAND_SEQUENCE_NUMBERDARK_STRIP_MEANDATA_CONVERSION_TYPE...TWIST_ANGLETARGET_LISTUPPER_LEFT_LATITUDEUPPER_LEFT_LONGITUDEUPPER_RIGHT_LATITUDEUPPER_RIGHT_LONGITUDEDATA_SET_NAMEINSTRUMENT_HOST_IDPRODUCT_TYPESTANDARD_DATA_PRODUCT_ID
0N1454725799_1.IMGdata/1454725799_1455008789/N1454725799_1.IMGCOISS_2001OFF14.869863<NA>OPNAV_848_3.ioi80.012BIT...89.513591S2_2004,HELENE,TELESTO,RHEA-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
1N1454726579_1.IMGdata/1454725799_1455008789/N1454726579_1.IMGCOISS_2001OFF14.860078<NA>OPNAV_864_3.ioi80.012BIT...89.647635TITAN-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2N1454727359_1.IMGdata/1454725799_1455008789/N1454727359_1.IMGCOISS_2001OFF14.87867<NA>OPNAV_880_3.ioi80.012BIT...89.679084HYPERION-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
3N1454728139_1.IMGdata/1454725799_1455008789/N1454728139_1.IMGCOISS_2001OFF14.842465<NA>OPNAV_912_3.ioi80.012BIT...88.677516PHOEBE-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
4N1454728919_1.IMGdata/1454725799_1455008789/N1454728919_1.IMGCOISS_2001OFF14.86497<NA>OPNAV_896_3.ioi80.012BIT...89.79891IAPETUS-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
\n", + "

5 rows × 140 columns

\n", + "
" + ], + "text/plain": [ + " FILE_NAME FILE_SPECIFICATION_NAME \\\n", + "0 N1454725799_1.IMG data/1454725799_1455008789/N1454725799_1.IMG \n", + "1 N1454726579_1.IMG data/1454725799_1455008789/N1454726579_1.IMG \n", + "2 N1454727359_1.IMG data/1454725799_1455008789/N1454727359_1.IMG \n", + "3 N1454728139_1.IMG data/1454725799_1455008789/N1454728139_1.IMG \n", + "4 N1454728919_1.IMG data/1454725799_1455008789/N1454728919_1.IMG \n", + "\n", + " VOLUME_ID ANTIBLOOMING_STATE_FLAG BIAS_STRIP_MEAN \\\n", + "0 COISS_2001 OFF 14.869863 \n", + "1 COISS_2001 OFF 14.860078 \n", + "2 COISS_2001 OFF 14.87867 \n", + "3 COISS_2001 OFF 14.842465 \n", + "4 COISS_2001 OFF 14.86497 \n", + "\n", + " CALIBRATION_LAMP_STATE_FLAG COMMAND_FILE_NAME COMMAND_SEQUENCE_NUMBER \\\n", + "0 OPNAV_848_3.ioi 8 \n", + "1 OPNAV_864_3.ioi 8 \n", + "2 OPNAV_880_3.ioi 8 \n", + "3 OPNAV_912_3.ioi 8 \n", + "4 OPNAV_896_3.ioi 8 \n", + "\n", + " DARK_STRIP_MEAN DATA_CONVERSION_TYPE ... TWIST_ANGLE \\\n", + "0 0.0 12BIT ... 89.513591 \n", + "1 0.0 12BIT ... 89.647635 \n", + "2 0.0 12BIT ... 89.679084 \n", + "3 0.0 12BIT ... 88.677516 \n", + "4 0.0 12BIT ... 89.79891 \n", + "\n", + " TARGET_LIST UPPER_LEFT_LATITUDE \\\n", + "0 S2_2004,HELENE,TELESTO,RHEA -100000000000000005366162204393472.0 \n", + "1 TITAN -100000000000000005366162204393472.0 \n", + "2 HYPERION -100000000000000005366162204393472.0 \n", + "3 PHOEBE -100000000000000005366162204393472.0 \n", + "4 IAPETUS -100000000000000005366162204393472.0 \n", + "\n", + " UPPER_LEFT_LONGITUDE UPPER_RIGHT_LATITUDE \\\n", + "0 -100000000000000005366162204393472.0 -100000000000000005366162204393472.0 \n", + "1 -100000000000000005366162204393472.0 -100000000000000005366162204393472.0 \n", + "2 -100000000000000005366162204393472.0 -100000000000000005366162204393472.0 \n", + "3 -100000000000000005366162204393472.0 -100000000000000005366162204393472.0 \n", + "4 -100000000000000005366162204393472.0 -100000000000000005366162204393472.0 \n", + "\n", + " UPPER_RIGHT_LONGITUDE \\\n", + "0 -100000000000000005366162204393472.0 \n", + "1 -100000000000000005366162204393472.0 \n", + "2 -100000000000000005366162204393472.0 \n", + "3 -100000000000000005366162204393472.0 \n", + "4 -100000000000000005366162204393472.0 \n", + "\n", + " DATA_SET_NAME INSTRUMENT_HOST_ID \\\n", + "0 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... CO \n", + "1 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... CO \n", + "2 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... CO \n", + "3 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... CO \n", + "4 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... CO \n", + "\n", + " PRODUCT_TYPE STANDARD_DATA_PRODUCT_ID \n", + "0 EDR ISS_EDR \n", + "1 EDR ISS_EDR \n", + "2 EDR ISS_EDR \n", + "3 EDR ISS_EDR \n", + "4 EDR ISS_EDR \n", + "\n", + "[5 rows x 140 columns]" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = get_index(\"cassini.iss.index\")\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca970118-581d-4a0a-aeb4-e7ed0c70de79", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['FILE_NAME', 'FILE_SPECIFICATION_NAME', 'VOLUME_ID',\n", + " 'ANTIBLOOMING_STATE_FLAG', 'BIAS_STRIP_MEAN',\n", + " 'CALIBRATION_LAMP_STATE_FLAG', 'COMMAND_FILE_NAME',\n", + " 'COMMAND_SEQUENCE_NUMBER', 'DARK_STRIP_MEAN', 'DATA_CONVERSION_TYPE',\n", + " ...\n", + " 'TWIST_ANGLE', 'TARGET_LIST', 'UPPER_LEFT_LATITUDE',\n", + " 'UPPER_LEFT_LONGITUDE', 'UPPER_RIGHT_LATITUDE', 'UPPER_RIGHT_LONGITUDE',\n", + " 'DATA_SET_NAME', 'INSTRUMENT_HOST_ID', 'PRODUCT_TYPE',\n", + " 'STANDARD_DATA_PRODUCT_ID'],\n", + " dtype='object', length=140)" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.columns" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b5f88187-5e5a-4eca-91ea-144c51496661", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
FILE_NAMEFILE_SPECIFICATION_NAMEVOLUME_IDANTIBLOOMING_STATE_FLAGBIAS_STRIP_MEANCALIBRATION_LAMP_STATE_FLAGCOMMAND_FILE_NAMECOMMAND_SEQUENCE_NUMBERDARK_STRIP_MEANDATA_CONVERSION_TYPE...TWIST_ANGLETARGET_LISTUPPER_LEFT_LATITUDEUPPER_LEFT_LONGITUDEUPPER_RIGHT_LATITUDEUPPER_RIGHT_LONGITUDEDATA_SET_NAMEINSTRUMENT_HOST_IDPRODUCT_TYPESTANDARD_DATA_PRODUCT_ID
IMAGE_MID_TIME
2017-09-14 13:26:59.927N1884091007_1.IMGdata/1884017637_1884113741/N1884091007_1.IMGCOISS_2116OFF21.611872<NA>trigger_25245_3.ioi252451.21844412BIT...4.868274<NA>-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2017-09-14 13:31:18.910N1884091266_1.IMGdata/1884017637_1884113741/N1884091266_1.IMGCOISS_2116OFF21.594259<NA>trigger_25245_3.ioi252451.22223612BIT...4.812541<NA>-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2017-09-14 13:35:41.908N1884091529_1.IMGdata/1884017637_1884113741/N1884091529_1.IMGCOISS_2116OFF21.87019<NA>trigger_25245_3.ioi252451.22957412BIT...4.77302DAPHNIS-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2017-09-14 13:40:04.906N1884091792_1.IMGdata/1884017637_1884113741/N1884091792_1.IMGCOISS_2116OFF21.843445<NA>trigger_25245_3.ioi252451.25403612BIT...4.748047<NA>-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2017-09-14 13:44:27.905N1884092055_1.IMGdata/1884017637_1884113741/N1884092055_1.IMGCOISS_2116OFF21.885845<NA>trigger_25245_3.ioi252451.26320912BIT...4.736484<NA>-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2017-09-14 13:48:50.903N1884092318_1.IMGdata/1884017637_1884113741/N1884092318_1.IMGCOISS_2116OFF21.558872<NA>trigger_25245_3.ioi252451.26002912BIT...4.737905<NA>-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
2017-09-14 13:53:13.901N1884092581_1.IMGdata/1884017637_1884113741/N1884092581_1.IMGCOISS_2116OFF21.606491<NA>trigger_25245_3.ioi252451.24828812BIT...4.750201<NA>-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0-100000000000000005366162204393472.0CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI...COEDRISS_EDR
\n", + "

7 rows × 139 columns

\n", + "
" + ], + "text/plain": [ + " FILE_NAME \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 N1884091007_1.IMG \n", + "2017-09-14 13:31:18.910 N1884091266_1.IMG \n", + "2017-09-14 13:35:41.908 N1884091529_1.IMG \n", + "2017-09-14 13:40:04.906 N1884091792_1.IMG \n", + "2017-09-14 13:44:27.905 N1884092055_1.IMG \n", + "2017-09-14 13:48:50.903 N1884092318_1.IMG \n", + "2017-09-14 13:53:13.901 N1884092581_1.IMG \n", + "\n", + " FILE_SPECIFICATION_NAME \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 data/1884017637_1884113741/N1884091007_1.IMG \n", + "2017-09-14 13:31:18.910 data/1884017637_1884113741/N1884091266_1.IMG \n", + "2017-09-14 13:35:41.908 data/1884017637_1884113741/N1884091529_1.IMG \n", + "2017-09-14 13:40:04.906 data/1884017637_1884113741/N1884091792_1.IMG \n", + "2017-09-14 13:44:27.905 data/1884017637_1884113741/N1884092055_1.IMG \n", + "2017-09-14 13:48:50.903 data/1884017637_1884113741/N1884092318_1.IMG \n", + "2017-09-14 13:53:13.901 data/1884017637_1884113741/N1884092581_1.IMG \n", + "\n", + " VOLUME_ID ANTIBLOOMING_STATE_FLAG BIAS_STRIP_MEAN \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 COISS_2116 OFF 21.611872 \n", + "2017-09-14 13:31:18.910 COISS_2116 OFF 21.594259 \n", + "2017-09-14 13:35:41.908 COISS_2116 OFF 21.87019 \n", + "2017-09-14 13:40:04.906 COISS_2116 OFF 21.843445 \n", + "2017-09-14 13:44:27.905 COISS_2116 OFF 21.885845 \n", + "2017-09-14 13:48:50.903 COISS_2116 OFF 21.558872 \n", + "2017-09-14 13:53:13.901 COISS_2116 OFF 21.606491 \n", + "\n", + " CALIBRATION_LAMP_STATE_FLAG COMMAND_FILE_NAME \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 trigger_25245_3.ioi \n", + "2017-09-14 13:31:18.910 trigger_25245_3.ioi \n", + "2017-09-14 13:35:41.908 trigger_25245_3.ioi \n", + "2017-09-14 13:40:04.906 trigger_25245_3.ioi \n", + "2017-09-14 13:44:27.905 trigger_25245_3.ioi \n", + "2017-09-14 13:48:50.903 trigger_25245_3.ioi \n", + "2017-09-14 13:53:13.901 trigger_25245_3.ioi \n", + "\n", + " COMMAND_SEQUENCE_NUMBER DARK_STRIP_MEAN \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 25245 1.218444 \n", + "2017-09-14 13:31:18.910 25245 1.222236 \n", + "2017-09-14 13:35:41.908 25245 1.229574 \n", + "2017-09-14 13:40:04.906 25245 1.254036 \n", + "2017-09-14 13:44:27.905 25245 1.263209 \n", + "2017-09-14 13:48:50.903 25245 1.260029 \n", + "2017-09-14 13:53:13.901 25245 1.248288 \n", + "\n", + " DATA_CONVERSION_TYPE ... TWIST_ANGLE TARGET_LIST \\\n", + "IMAGE_MID_TIME ... \n", + "2017-09-14 13:26:59.927 12BIT ... 4.868274 \n", + "2017-09-14 13:31:18.910 12BIT ... 4.812541 \n", + "2017-09-14 13:35:41.908 12BIT ... 4.77302 DAPHNIS \n", + "2017-09-14 13:40:04.906 12BIT ... 4.748047 \n", + "2017-09-14 13:44:27.905 12BIT ... 4.736484 \n", + "2017-09-14 13:48:50.903 12BIT ... 4.737905 \n", + "2017-09-14 13:53:13.901 12BIT ... 4.750201 \n", + "\n", + " UPPER_LEFT_LATITUDE \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:31:18.910 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:35:41.908 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:40:04.906 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:44:27.905 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:48:50.903 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:53:13.901 -100000000000000005366162204393472.0 \n", + "\n", + " UPPER_LEFT_LONGITUDE \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:31:18.910 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:35:41.908 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:40:04.906 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:44:27.905 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:48:50.903 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:53:13.901 -100000000000000005366162204393472.0 \n", + "\n", + " UPPER_RIGHT_LATITUDE \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:31:18.910 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:35:41.908 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:40:04.906 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:44:27.905 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:48:50.903 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:53:13.901 -100000000000000005366162204393472.0 \n", + "\n", + " UPPER_RIGHT_LONGITUDE \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:31:18.910 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:35:41.908 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:40:04.906 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:44:27.905 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:48:50.903 -100000000000000005366162204393472.0 \n", + "2017-09-14 13:53:13.901 -100000000000000005366162204393472.0 \n", + "\n", + " DATA_SET_NAME \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "2017-09-14 13:31:18.910 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "2017-09-14 13:35:41.908 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "2017-09-14 13:40:04.906 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "2017-09-14 13:44:27.905 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "2017-09-14 13:48:50.903 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "2017-09-14 13:53:13.901 CASSINI ORBITER SATURN ISSNA/ISSWA 2 EDR VERSI... \n", + "\n", + " INSTRUMENT_HOST_ID PRODUCT_TYPE \\\n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 CO EDR \n", + "2017-09-14 13:31:18.910 CO EDR \n", + "2017-09-14 13:35:41.908 CO EDR \n", + "2017-09-14 13:40:04.906 CO EDR \n", + "2017-09-14 13:44:27.905 CO EDR \n", + "2017-09-14 13:48:50.903 CO EDR \n", + "2017-09-14 13:53:13.901 CO EDR \n", + "\n", + " STANDARD_DATA_PRODUCT_ID \n", + "IMAGE_MID_TIME \n", + "2017-09-14 13:26:59.927 ISS_EDR \n", + "2017-09-14 13:31:18.910 ISS_EDR \n", + "2017-09-14 13:35:41.908 ISS_EDR \n", + "2017-09-14 13:40:04.906 ISS_EDR \n", + "2017-09-14 13:44:27.905 ISS_EDR \n", + "2017-09-14 13:48:50.903 ISS_EDR \n", + "2017-09-14 13:53:13.901 ISS_EDR \n", + "\n", + "[7 rows x 139 columns]" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.set_index(\"IMAGE_MID_TIME\").loc['20170914 00':'20170914 15']" + ] + }, + { + "cell_type": "markdown", + "id": "183c34ca-f1ca-4bd5-a1c4-dd9029100960", + "metadata": {}, + "source": [ + "# Cassini ISS" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f4f3d52b-62b0-4ee1-ab9a-fa775d00b85d", + "metadata": {}, + "outputs": [], + "source": [ + "from planetarypy.ciss import ISS" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9553b271-7cf8-4933-92ba-b34ddc330334", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found 1 obsids.\n" + ] + } + ], + "source": [ + "iss = ISS(\"N1884091529_1\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8e9335e9-2629-4446-a7b8-35fa52ca93b8", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "997a5f856dbc40dca0b108448a8677d1", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "N1884091529_1.IMG: 0%| | 0/2127944 [00:00" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "do.show(\"IMAGE\")" + ] + }, + { + "cell_type": "markdown", + "id": "de4581da-a59b-441a-9541-a08aabc239e5", + "metadata": {}, + "source": [ + "# CTX" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0770a2aa-e212-4ef8-8b4d-a50b593eb30b", + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "(function(root) {\n", + " function now() {\n", + " return new Date();\n", + " }\n", + "\n", + " var force = true;\n", + " var py_version = '3.1.1'.replace('rc', '-rc.').replace('.dev', '-dev.');\n", + " var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n", + " var reloading = false;\n", + " var Bokeh = root.Bokeh;\n", + " var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n", + "\n", + " if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n", + " root._bokeh_timeout = Date.now() + 5000;\n", + " root._bokeh_failed_load = false;\n", + " }\n", + "\n", + " function run_callbacks() {\n", + " try {\n", + " root._bokeh_onload_callbacks.forEach(function(callback) {\n", + " if (callback != null)\n", + " callback();\n", + " });\n", + " } finally {\n", + " delete root._bokeh_onload_callbacks;\n", + " }\n", + " console.debug(\"Bokeh: all callbacks have finished\");\n", + " }\n", + "\n", + " function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n", + " if (css_urls == null) css_urls = [];\n", + " if (js_urls == null) js_urls = [];\n", + " if (js_modules == null) js_modules = [];\n", + " if (js_exports == null) js_exports = {};\n", + "\n", + " root._bokeh_onload_callbacks.push(callback);\n", + "\n", + " if (root._bokeh_is_loading > 0) {\n", + " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", + " return null;\n", + " }\n", + " if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n", + " run_callbacks();\n", + " return null;\n", + " }\n", + " if (!reloading) {\n", + " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", + " }\n", + "\n", + " function on_load() {\n", + " root._bokeh_is_loading--;\n", + " if (root._bokeh_is_loading === 0) {\n", + " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", + " run_callbacks()\n", + " }\n", + " }\n", + " window._bokeh_on_load = on_load\n", + "\n", + " function on_error() {\n", + " console.error(\"failed to load \" + url);\n", + " }\n", + "\n", + " var skip = [];\n", + " if (window.requirejs) {\n", + " window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n", + " require([\"jspanel\"], function(jsPanel) {\n", + "\twindow.jsPanel = jsPanel\n", + "\ton_load()\n", + " })\n", + " require([\"jspanel-modal\"], function() {\n", + "\ton_load()\n", + " })\n", + " require([\"jspanel-tooltip\"], function() {\n", + "\ton_load()\n", + " })\n", + " require([\"jspanel-hint\"], function() {\n", + "\ton_load()\n", + " })\n", + " require([\"jspanel-layout\"], function() {\n", + "\ton_load()\n", + " })\n", + " require([\"jspanel-contextmenu\"], function() {\n", + "\ton_load()\n", + " })\n", + " require([\"jspanel-dock\"], function() {\n", + "\ton_load()\n", + " })\n", + " require([\"gridstack\"], function(GridStack) {\n", + "\twindow.GridStack = GridStack\n", + "\ton_load()\n", + " })\n", + " require([\"notyf\"], function() {\n", + "\ton_load()\n", + " })\n", + " root._bokeh_is_loading = css_urls.length + 9;\n", + " } else {\n", + " root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n", + " }\n", + "\n", + " var existing_stylesheets = []\n", + " var links = document.getElementsByTagName('link')\n", + " for (var i = 0; i < links.length; i++) {\n", + " var link = links[i]\n", + " if (link.href != null) {\n", + "\texisting_stylesheets.push(link.href)\n", + " }\n", + " }\n", + " for (var i = 0; i < css_urls.length; i++) {\n", + " var url = css_urls[i];\n", + " if (existing_stylesheets.indexOf(url) !== -1) {\n", + "\ton_load()\n", + "\tcontinue;\n", + " }\n", + " const element = document.createElement(\"link\");\n", + " element.onload = on_load;\n", + " element.onerror = on_error;\n", + " element.rel = \"stylesheet\";\n", + " element.type = \"text/css\";\n", + " element.href = url;\n", + " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", + " document.body.appendChild(element);\n", + " } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n", + " var urls = ['https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n", + " for (var i = 0; i < urls.length; i++) {\n", + " skip.push(urls[i])\n", + " }\n", + " } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n", + " var urls = ['https://cdn.holoviz.org/panel/1.1.1/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n", + " for (var i = 0; i < urls.length; i++) {\n", + " skip.push(urls[i])\n", + " }\n", + " } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n", + " var urls = ['https://cdn.holoviz.org/panel/1.1.1/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n", + " for (var i = 0; i < urls.length; i++) {\n", + " skip.push(urls[i])\n", + " }\n", + " } var existing_scripts = []\n", + " var scripts = document.getElementsByTagName('script')\n", + " for (var i = 0; i < scripts.length; i++) {\n", + " var script = scripts[i]\n", + " if (script.src != null) {\n", + "\texisting_scripts.push(script.src)\n", + " }\n", + " }\n", + " for (var i = 0; i < js_urls.length; i++) {\n", + " var url = js_urls[i];\n", + " if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n", + "\tif (!window.requirejs) {\n", + "\t on_load();\n", + "\t}\n", + "\tcontinue;\n", + " }\n", + " var element = document.createElement('script');\n", + " element.onload = on_load;\n", + " element.onerror = on_error;\n", + " element.async = false;\n", + " element.src = url;\n", + " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", + " document.head.appendChild(element);\n", + " }\n", + " for (var i = 0; i < js_modules.length; i++) {\n", + " var url = js_modules[i];\n", + " if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n", + "\tif (!window.requirejs) {\n", + "\t on_load();\n", + "\t}\n", + "\tcontinue;\n", + " }\n", + " var element = document.createElement('script');\n", + " element.onload = on_load;\n", + " element.onerror = on_error;\n", + " element.async = false;\n", + " element.src = url;\n", + " element.type = \"module\";\n", + " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", + " document.head.appendChild(element);\n", + " }\n", + " for (const name in js_exports) {\n", + " var url = js_exports[name];\n", + " if (skip.indexOf(url) >= 0 || root[name] != null) {\n", + "\tif (!window.requirejs) {\n", + "\t on_load();\n", + "\t}\n", + "\tcontinue;\n", + " }\n", + " var element = document.createElement('script');\n", + " element.onerror = on_error;\n", + " element.async = false;\n", + " element.type = \"module\";\n", + " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", + " element.textContent = `\n", + " import ${name} from \"${url}\"\n", + " window.${name} = ${name}\n", + " window._bokeh_on_load()\n", + " `\n", + " document.head.appendChild(element);\n", + " }\n", + " if (!js_urls.length && !js_modules.length) {\n", + " on_load()\n", + " }\n", + " };\n", + "\n", + " function inject_raw_css(css) {\n", + " const element = document.createElement(\"style\");\n", + " element.appendChild(document.createTextNode(css));\n", + " document.body.appendChild(element);\n", + " }\n", + "\n", + " var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.1.1.min.js\", \"https://cdn.holoviz.org/panel/1.1.1/dist/panel.min.js\"];\n", + " var js_modules = [];\n", + " var js_exports = {};\n", + " var css_urls = [];\n", + " var inline_js = [ function(Bokeh) {\n", + " Bokeh.set_log_level(\"info\");\n", + " },\n", + "function(Bokeh) {} // ensure no trailing comma for IE\n", + " ];\n", + "\n", + " function run_inline_js() {\n", + " if ((root.Bokeh !== undefined) || (force === true)) {\n", + " for (var i = 0; i < inline_js.length; i++) {\n", + " inline_js[i].call(root, root.Bokeh);\n", + " }\n", + " // Cache old bokeh versions\n", + " if (Bokeh != undefined && !reloading) {\n", + "\tvar NewBokeh = root.Bokeh;\n", + "\tif (Bokeh.versions === undefined) {\n", + "\t Bokeh.versions = new Map();\n", + "\t}\n", + "\tif (NewBokeh.version !== Bokeh.version) {\n", + "\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n", + "\t}\n", + "\troot.Bokeh = Bokeh;\n", + " }} else if (Date.now() < root._bokeh_timeout) {\n", + " setTimeout(run_inline_js, 100);\n", + " } else if (!root._bokeh_failed_load) {\n", + " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", + " root._bokeh_failed_load = true;\n", + " }\n", + " root._bokeh_is_initializing = false\n", + " }\n", + "\n", + " function load_or_wait() {\n", + " // Implement a backoff loop that tries to ensure we do not load multiple\n", + " // versions of Bokeh and its dependencies at the same time.\n", + " // In recent versions we use the root._bokeh_is_initializing flag\n", + " // to determine whether there is an ongoing attempt to initialize\n", + " // bokeh, however for backward compatibility we also try to ensure\n", + " // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n", + " // before older versions are fully initialized.\n", + " if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n", + " root._bokeh_is_initializing = false;\n", + " root._bokeh_onload_callbacks = undefined;\n", + " console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n", + " load_or_wait();\n", + " } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n", + " setTimeout(load_or_wait, 100);\n", + " } else {\n", + " Bokeh = root.Bokeh;\n", + " bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n", + " root._bokeh_is_initializing = true\n", + " root._bokeh_onload_callbacks = []\n", + " if (!reloading && (!bokeh_loaded || is_dev)) {\n", + "\troot.Bokeh = undefined;\n", + " }\n", + " load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n", + "\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", + "\trun_inline_js();\n", + " });\n", + " }\n", + " }\n", + " // Give older versions of the autoload script a head-start to ensure\n", + " // they initialize before we start loading newer version.\n", + " setTimeout(load_or_wait, 100)\n", + "}(window));" + ], + "application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.1.1'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n var reloading = false;\n var Bokeh = root.Bokeh;\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.1.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.1.1/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.1.1/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.1.1.min.js\", \"https://cdn.holoviz.org/panel/1.1.1/dist/panel.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n Bokeh = root.Bokeh;\n bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n if (!reloading && (!bokeh_loaded || is_dev)) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));" + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\n", + "if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n", + " window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n", + "}\n", + "\n", + "\n", + " function JupyterCommManager() {\n", + " }\n", + "\n", + " JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n", + " if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", + " var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", + " comm_manager.register_target(comm_id, function(comm) {\n", + " comm.on_msg(msg_handler);\n", + " });\n", + " } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", + " window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n", + " comm.onMsg = msg_handler;\n", + " });\n", + " } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", + " google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n", + " var messages = comm.messages[Symbol.asyncIterator]();\n", + " function processIteratorResult(result) {\n", + " var message = result.value;\n", + " console.log(message)\n", + " var content = {data: message.data, comm_id};\n", + " var buffers = []\n", + " for (var buffer of message.buffers || []) {\n", + " buffers.push(new DataView(buffer))\n", + " }\n", + " var metadata = message.metadata || {};\n", + " var msg = {content, buffers, metadata}\n", + " msg_handler(msg);\n", + " return messages.next().then(processIteratorResult);\n", + " }\n", + " return messages.next().then(processIteratorResult);\n", + " })\n", + " }\n", + " }\n", + "\n", + " JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n", + " if (comm_id in window.PyViz.comms) {\n", + " return window.PyViz.comms[comm_id];\n", + " } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", + " var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", + " var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n", + " if (msg_handler) {\n", + " comm.on_msg(msg_handler);\n", + " }\n", + " } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", + " var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n", + " comm.open();\n", + " if (msg_handler) {\n", + " comm.onMsg = msg_handler;\n", + " }\n", + " } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", + " var comm_promise = google.colab.kernel.comms.open(comm_id)\n", + " comm_promise.then((comm) => {\n", + " window.PyViz.comms[comm_id] = comm;\n", + " if (msg_handler) {\n", + " var messages = comm.messages[Symbol.asyncIterator]();\n", + " function processIteratorResult(result) {\n", + " var message = result.value;\n", + " var content = {data: message.data};\n", + " var metadata = message.metadata || {comm_id};\n", + " var msg = {content, metadata}\n", + " msg_handler(msg);\n", + " return messages.next().then(processIteratorResult);\n", + " }\n", + " return messages.next().then(processIteratorResult);\n", + " }\n", + " }) \n", + " var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n", + " return comm_promise.then((comm) => {\n", + " comm.send(data, metadata, buffers, disposeOnDone);\n", + " });\n", + " };\n", + " var comm = {\n", + " send: sendClosure\n", + " };\n", + " }\n", + " window.PyViz.comms[comm_id] = comm;\n", + " return comm;\n", + " }\n", + " window.PyViz.comm_manager = new JupyterCommManager();\n", + " \n", + "\n", + "\n", + "var JS_MIME_TYPE = 'application/javascript';\n", + "var HTML_MIME_TYPE = 'text/html';\n", + "var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n", + "var CLASS_NAME = 'output';\n", + "\n", + "/**\n", + " * Render data to the DOM node\n", + " */\n", + "function render(props, node) {\n", + " var div = document.createElement(\"div\");\n", + " var script = document.createElement(\"script\");\n", + " node.appendChild(div);\n", + " node.appendChild(script);\n", + "}\n", + "\n", + "/**\n", + " * Handle when a new output is added\n", + " */\n", + "function handle_add_output(event, handle) {\n", + " var output_area = handle.output_area;\n", + " var output = handle.output;\n", + " if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + " var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + " if (id !== undefined) {\n", + " var nchildren = toinsert.length;\n", + " var html_node = toinsert[nchildren-1].children[0];\n", + " html_node.innerHTML = output.data[HTML_MIME_TYPE];\n", + " var scripts = [];\n", + " var nodelist = html_node.querySelectorAll(\"script\");\n", + " for (var i in nodelist) {\n", + " if (nodelist.hasOwnProperty(i)) {\n", + " scripts.push(nodelist[i])\n", + " }\n", + " }\n", + "\n", + " scripts.forEach( function (oldScript) {\n", + " var newScript = document.createElement(\"script\");\n", + " var attrs = [];\n", + " var nodemap = oldScript.attributes;\n", + " for (var j in nodemap) {\n", + " if (nodemap.hasOwnProperty(j)) {\n", + " attrs.push(nodemap[j])\n", + " }\n", + " }\n", + " attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n", + " newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n", + " oldScript.parentNode.replaceChild(newScript, oldScript);\n", + " });\n", + " if (JS_MIME_TYPE in output.data) {\n", + " toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n", + " }\n", + " output_area._hv_plot_id = id;\n", + " if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n", + " window.PyViz.plot_index[id] = Bokeh.index[id];\n", + " } else {\n", + " window.PyViz.plot_index[id] = null;\n", + " }\n", + " } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " var bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " var script_attrs = bk_div.children[0].attributes;\n", + " for (var i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + "function handle_clear_output(event, handle) {\n", + " var id = handle.cell.output_area._hv_plot_id;\n", + " var server_id = handle.cell.output_area._bokeh_server_id;\n", + " if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n", + " var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n", + " if (server_id !== null) {\n", + " comm.send({event_type: 'server_delete', 'id': server_id});\n", + " return;\n", + " } else if (comm !== null) {\n", + " comm.send({event_type: 'delete', 'id': id});\n", + " }\n", + " delete PyViz.plot_index[id];\n", + " if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n", + " var doc = window.Bokeh.index[id].model.document\n", + " doc.clear();\n", + " const i = window.Bokeh.documents.indexOf(doc);\n", + " if (i > -1) {\n", + " window.Bokeh.documents.splice(i, 1);\n", + " }\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Handle kernel restart event\n", + " */\n", + "function handle_kernel_cleanup(event, handle) {\n", + " delete PyViz.comms[\"hv-extension-comm\"];\n", + " window.PyViz.plot_index = {}\n", + "}\n", + "\n", + "/**\n", + " * Handle update_display_data messages\n", + " */\n", + "function handle_update_output(event, handle) {\n", + " handle_clear_output(event, {cell: {output_area: handle.output_area}})\n", + " handle_add_output(event, handle)\n", + "}\n", + "\n", + "function register_renderer(events, OutputArea) {\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " var toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[0]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " events.on('output_added.OutputArea', handle_add_output);\n", + " events.on('output_updated.OutputArea', handle_update_output);\n", + " events.on('clear_output.CodeCell', handle_clear_output);\n", + " events.on('delete.Cell', handle_clear_output);\n", + " events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n", + "\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " safe: true,\n", + " index: 0\n", + " });\n", + "}\n", + "\n", + "if (window.Jupyter !== undefined) {\n", + " try {\n", + " var events = require('base/js/events');\n", + " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\n", + " }\n", + " } catch(err) {\n", + " }\n", + "}\n" + ], + "application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n" + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from planetarypy.ctx import CTX" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8b42e91d-909d-48e2-a11d-7d5cd85adc5c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "An updated index is available.\n", + "Call `get_index` with `refresh=True` to get the updated version.\n" + ] + } + ], + "source": [ + "edrs = get_index('mro.ctx.edr', check_update=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "afc9e349-38eb-40a6-bc66-c6e611b82f34", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
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
132418MROX_4238DATA/U08_074275_2042_XN_24N114W.IMG4A_04_1178029600U08_074275_2042_XN_24N114W2022-05-31 20:34:40.250CTXNIFL5056522241...-21.41114.3324.19207100837.4238.0815.4189.9Olympica FossaeOK74275
132419MROX_4238DATA/U08_074276_1370_XI_43S133W.IMG4A_04_1179029700U08_074276_1370_XI_43S133W2022-05-31 22:06:07.945CTXITL5056491521...-21.42132.87-43.09207097154.5238.1215.6290.4Landforms in Terra SirenumOK74276
132420MROX_4238DATA/U08_074276_1808_XI_00N138W.IMG4A_04_1179029800U08_074276_1808_XI_00N138W2022-05-31 22:20:18.890CTXITL505671681...-21.42138.70.83207097007.7238.1315.590.1Candidate impact site formed at most between N...OK74276
132421MROX_4238DATA/U08_074277_1426_XN_37S161W.IMG4A_04_1178029900U08_074277_1426_XN_37S161W2022-06-01 00:00:42.414CTXNIFL252881921...-21.43161.11-37.53207093626.0238.1715.6290.1Craters in Terra SirenumOK74277
132422MROX_4238DATA/U08_074277_2154_XI_35N170W.IMG4A_04_1179029A00U08_074277_2154_XI_35N170W2022-06-01 00:23:16.886CTXITL505671681...-21.44170.4335.37207094216.0238.1815.3990.0Fresh impact crater in Amazonis PlanitiaOK74277
\n", + "

5 rows × 51 columns

\n", + "
" + ], + "text/plain": [ + " VOLUME_ID FILE_SPECIFICATION_NAME ORIGINAL_PRODUCT_ID \\\n", + "132418 MROX_4238 DATA/U08_074275_2042_XN_24N114W.IMG 4A_04_1178029600 \n", + "132419 MROX_4238 DATA/U08_074276_1370_XI_43S133W.IMG 4A_04_1179029700 \n", + "132420 MROX_4238 DATA/U08_074276_1808_XI_00N138W.IMG 4A_04_1179029800 \n", + "132421 MROX_4238 DATA/U08_074277_1426_XN_37S161W.IMG 4A_04_1178029900 \n", + "132422 MROX_4238 DATA/U08_074277_2154_XI_35N170W.IMG 4A_04_1179029A00 \n", + "\n", + " PRODUCT_ID IMAGE_TIME INSTRUMENT_ID \\\n", + "132418 U08_074275_2042_XN_24N114W 2022-05-31 20:34:40.250 CTX \n", + "132419 U08_074276_1370_XI_43S133W 2022-05-31 22:06:07.945 CTX \n", + "132420 U08_074276_1808_XI_00N138W 2022-05-31 22:20:18.890 CTX \n", + "132421 U08_074277_1426_XN_37S161W 2022-06-01 00:00:42.414 CTX \n", + "132422 U08_074277_2154_XI_35N170W 2022-06-01 00:23:16.886 CTX \n", + "\n", + " INSTRUMENT_MODE_ID LINE_SAMPLES LINES SPATIAL_SUMMING ... \\\n", + "132418 NIFL 5056 52224 1 ... \n", + "132419 ITL 5056 49152 1 ... \n", + "132420 ITL 5056 7168 1 ... \n", + "132421 NIFL 2528 8192 1 ... \n", + "132422 ITL 5056 7168 1 ... \n", + "\n", + " SUB_SOLAR_LATITUDE SUB_SPACECRAFT_LONGITUDE SUB_SPACECRAFT_LATITUDE \\\n", + "132418 -21.41 114.33 24.19 \n", + "132419 -21.42 132.87 -43.09 \n", + "132420 -21.42 138.7 0.83 \n", + "132421 -21.43 161.11 -37.53 \n", + "132422 -21.44 170.43 35.37 \n", + "\n", + " SOLAR_DISTANCE SOLAR_LONGITUDE LOCAL_TIME IMAGE_SKEW_ANGLE \\\n", + "132418 207100837.4 238.08 15.41 89.9 \n", + "132419 207097154.5 238.12 15.62 90.4 \n", + "132420 207097007.7 238.13 15.5 90.1 \n", + "132421 207093626.0 238.17 15.62 90.1 \n", + "132422 207094216.0 238.18 15.39 90.0 \n", + "\n", + " RATIONALE_DESC DATA_QUALITY_DESC \\\n", + "132418 Olympica Fossae OK \n", + "132419 Landforms in Terra Sirenum OK \n", + "132420 Candidate impact site formed at most between N... OK \n", + "132421 Craters in Terra Sirenum OK \n", + "132422 Fresh impact crater in Amazonis Planitia OK \n", + "\n", + " ORBIT_NUMBER \n", + "132418 74275 \n", + "132419 74276 \n", + "132420 74276 \n", + "132421 74277 \n", + "132422 74277 \n", + "\n", + "[5 rows x 51 columns]" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "edrs.tail()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b2f1a9b0-c78c-422e-aa2a-496733e63b77", + "metadata": {}, + "outputs": [], + "source": [ + "pid = \"U08_074276_1370_XI_43S133W\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4441d9b3-035e-4b98-aaaa-af8a1cf4c14e", + "metadata": {}, + "outputs": [], + "source": [ + "ctx = CTX(pid)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "256e4bc1-8edf-448a-9793-093373d65934", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "File exists. Use `overwrite=True` to download fresh.\n" + ] + } + ], + "source": [ + "ctx.download()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7f2d98e2-de14-4ba9-82b5-df9c46701959", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "volume_id MROX_4238\n", + "file_specification_name DATA/U08_074276_1370_XI_43S133W.IMG\n", + "original_product_id 4A_04_1179029700\n", + "product_id U08_074276_1370_XI_43S133W\n", + "image_time 2022-05-31 22:06:07.945000\n", + "instrument_id CTX\n", + "instrument_mode_id ITL\n", + "line_samples 5056\n", + "lines 49152\n", + "spatial_summing 1\n", + "scaled_pixel_width 5.13\n", + "pixel_aspect_ratio 1.18\n", + "emission_angle 5.34\n", + "incidence_angle 50.01\n", + "phase_angle 55.16\n", + "center_longitude 133.38\n", + "center_latitude -43.14\n", + "upper_left_longitude 133.3\n", + "upper_left_latitude -45.66\n", + "upper_right_longitude 132.68\n", + "upper_right_latitude -45.61\n", + "lower_left_longitude 134.04\n", + "lower_left_latitude -40.68\n", + "lower_right_longitude 133.48\n", + "lower_right_latitude -40.63\n", + "mission_phase_name ESP\n", + "target_name MARS\n", + "spacecraft_clock_start_count 1338502024:229\n", + "focal_plane_temperature 294.5\n", + "line_exposure_duration 1.877\n", + "offset_mode_id 196/215/209\n", + "sample_first_pixel 0\n", + "scaled_image_width 25.66\n", + "scaled_image_height 297.15\n", + "spacecraft_altitude 254.75\n", + "target_center_distance 3641.68\n", + "slant_distance 255.78\n", + "usage_note N\n", + "north_azimuth 276.51\n", + "sub_solar_azimuth 194.3\n", + "sub_solar_longitude 187.84\n", + "sub_solar_latitude -21.42\n", + "sub_spacecraft_longitude 132.87\n", + "sub_spacecraft_latitude -43.09\n", + "solar_distance 207097154.5\n", + "solar_longitude 238.12\n", + "local_time 15.62\n", + "image_skew_angle 90.4\n", + "rationale_desc Landforms in Terra Sirenum\n", + "data_quality_desc OK\n", + "orbit_number 74276\n", + "short_pid U08_074276_1370\n", + "month_col U08\n", + "Name: 132419, dtype: object" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ctx.meta" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "41851f46-6247-4965-8594-bf168e2e4cba", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.DataArray 'U08_074276_1370 EDR' (y: 49152, x: 5056)>\n",
+       "[248512512 values with dtype=uint8]\n",
+       "Coordinates:\n",
+       "  * x        (x) float64 0.5 1.5 2.5 3.5 ... 5.054e+03 5.054e+03 5.056e+03\n",
+       "  * y        (y) float64 0.5 1.5 2.5 3.5 ... 4.915e+04 4.915e+04 4.915e+04\n",
+       "Attributes: (12/19)\n",
+       "    BANDWIDTH:                  \n",
+       "    CENTER_FILTER_WAVELENGTH:   \n",
+       "    DATA_SET_ID:                "MRO-M-CTX-2-EDR-L0-V1.0"\n",
+       "    FILTER_NAME:                \n",
+       "    INSTRUMENT_ID:              CTX\n",
+       "    INSTRUMENT_NAME:            "CONTEXT CAMERA"\n",
+       "    ...                         ...\n",
+       "    START_TIME:                 2022-05-31T22:06:07.945\n",
+       "    STOP_TIME:                  2022-05-31T22:07:40.191\n",
+       "    TARGET_NAME:                MARS\n",
+       "    _FillValue:                 0\n",
+       "    scale_factor:               1.0\n",
+       "    add_offset:                 0.0
" + ], + "text/plain": [ + "\n", + "[248512512 values with dtype=uint8]\n", + "Coordinates:\n", + " * x (x) float64 0.5 1.5 2.5 3.5 ... 5.054e+03 5.054e+03 5.056e+03\n", + " * y (y) float64 0.5 1.5 2.5 3.5 ... 4.915e+04 4.915e+04 4.915e+04\n", + "Attributes: (12/19)\n", + " BANDWIDTH: \n", + " CENTER_FILTER_WAVELENGTH: \n", + " DATA_SET_ID: \"MRO-M-CTX-2-EDR-L0-V1.0\"\n", + " FILTER_NAME: \n", + " INSTRUMENT_ID: CTX\n", + " INSTRUMENT_NAME: \"CONTEXT CAMERA\"\n", + " ... ...\n", + " START_TIME: 2022-05-31T22:06:07.945\n", + " STOP_TIME: 2022-05-31T22:07:40.191\n", + " TARGET_NAME: MARS\n", + " _FillValue: 0\n", + " scale_factor: 1.0\n", + " add_offset: 0.0" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ctx.edr_da" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a9181ee4-3e44-4dab-a1eb-2ca6f0c5ccd4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Driver: PDS/NASA Planetary Data System\n", + "Files: /Users/maye/planetarypy_data/missions/mro/ctx/edr/U08_074276_1370_XI_43S133W.IMG\n", + "Size is 5056, 49152\n", + "Metadata:\n", + " BANDWIDTH=\n", + " CENTER_FILTER_WAVELENGTH=\n", + " DATA_SET_ID=\"MRO-M-CTX-2-EDR-L0-V1.0\"\n", + " FILTER_NAME=\n", + " INSTRUMENT_ID=CTX\n", + " INSTRUMENT_NAME=\"CONTEXT CAMERA\"\n", + " MISSION_NAME=\n", + " NOTE=\n", + " PRODUCER_INSTITUTION_NAME=\n", + " PRODUCT_CREATION_TIME=2022-11-04T18:18:50\n", + " PRODUCT_ID=\"U08_074276_1370_XI_43S133W\"\n", + " PRODUCT_TYPE=\n", + " SPACECRAFT_NAME=MARS_RECONNAISSANCE_ORBITER\n", + " START_TIME=2022-05-31T22:06:07.945\n", + " STOP_TIME=2022-05-31T22:07:40.191\n", + " TARGET_NAME=MARS\n", + "Corner Coordinates:\n", + "Upper Left ( 0.0, 0.0)\n", + "Lower Left ( 0.0,49152.0)\n", + "Upper Right ( 5056.0, 0.0)\n", + "Lower Right ( 5056.0,49152.0)\n", + "Center ( 2528.0,24576.0)\n", + "Band 1 Block=5056x1 Type=Byte, ColorInterp=Undefined\n", + " NoData Value=0\n" + ] + } + ], + "source": [ + "!gdalinfo {ctx.source_path}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7d9ff61a-6d53-4975-88a5-d59ccc8e6bb0", + "metadata": {}, + "outputs": [ + { + "data": {}, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.holoviews_exec.v0+json": "", + "text/html": [ + "
\n", + "
\n", + "
\n", + "" + ], + "text/plain": [ + ":DynamicMap []\n", + " :Image [y,x] (U08_074276_1370 EDR)" + ] + }, + "execution_count": null, + "metadata": { + "application/vnd.holoviews_exec.v0+json": { + "id": "p1258" + } + }, + "output_type": "execute_result" + } + ], + "source": [ + "ctx.plot_edr()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8267aeb1-6edc-49ac-9b66-7cd1e6a5e19c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.DataArray 'U08_074276_1370 EDR' (y: 49152, x: 5056)>\n",
+       "[248512512 values with dtype=uint8]\n",
+       "Coordinates:\n",
+       "  * x        (x) float64 0.5 1.5 2.5 3.5 ... 5.054e+03 5.054e+03 5.056e+03\n",
+       "  * y        (y) float64 0.5 1.5 2.5 3.5 ... 4.915e+04 4.915e+04 4.915e+04\n",
+       "Attributes: (12/19)\n",
+       "    BANDWIDTH:                  \n",
+       "    CENTER_FILTER_WAVELENGTH:   \n",
+       "    DATA_SET_ID:                "MRO-M-CTX-2-EDR-L0-V1.0"\n",
+       "    FILTER_NAME:                \n",
+       "    INSTRUMENT_ID:              CTX\n",
+       "    INSTRUMENT_NAME:            "CONTEXT CAMERA"\n",
+       "    ...                         ...\n",
+       "    START_TIME:                 2022-05-31T22:06:07.945\n",
+       "    STOP_TIME:                  2022-05-31T22:07:40.191\n",
+       "    TARGET_NAME:                MARS\n",
+       "    _FillValue:                 0\n",
+       "    scale_factor:               1.0\n",
+       "    add_offset:                 0.0
" + ], + "text/plain": [ + "\n", + "[248512512 values with dtype=uint8]\n", + "Coordinates:\n", + " * x (x) float64 0.5 1.5 2.5 3.5 ... 5.054e+03 5.054e+03 5.056e+03\n", + " * y (y) float64 0.5 1.5 2.5 3.5 ... 4.915e+04 4.915e+04 4.915e+04\n", + "Attributes: (12/19)\n", + " BANDWIDTH: \n", + " CENTER_FILTER_WAVELENGTH: \n", + " DATA_SET_ID: \"MRO-M-CTX-2-EDR-L0-V1.0\"\n", + " FILTER_NAME: \n", + " INSTRUMENT_ID: CTX\n", + " INSTRUMENT_NAME: \"CONTEXT CAMERA\"\n", + " ... ...\n", + " START_TIME: 2022-05-31T22:06:07.945\n", + " STOP_TIME: 2022-05-31T22:07:40.191\n", + " TARGET_NAME: MARS\n", + " _FillValue: 0\n", + " scale_factor: 1.0\n", + " add_offset: 0.0" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ctx.edr_da" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "30eb3d0b-17b6-4dde-84da-6eb999c43aaa", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "An updated index is available.\n", + "Call `get_index` with `refresh=True` to get the updated version.\n" + ] + } + ], + "source": [ + "from planetarypy.hirise import RGB_NOMAP" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4246e499-fc3f-48d5-83cc-80d0be07df42", + "metadata": {}, + "outputs": [], + "source": [ + "obsid = \"ESP_039983_1390\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ccbb5d37-f404-4f36-b79b-767972f8444a", + "metadata": {}, + "outputs": [], + "source": [ + "rgb = RGB_NOMAP(obsid)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "76f22727-44a6-4482-a26b-e8762e96f95d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "File exists. Use `overwrite=True` to download fresh.\n" + ] + } + ], + "source": [ + "rgb.download()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4e68cb06-dd94-4ff8-882b-dc64877ff19c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "URL('https://hirise-pds.lpl.arizona.edu/PDS/EXTRAS/RDR/ESP/ORB_039900_039999/ESP_039983_1390/ESP_039983_1390_RGB.NOMAP.JP2')" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "rgb.url" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b0eb56ca-5599-47dd-8bc5-df1683a0aa19", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "8c92164753024c758e260ecc60859b8e", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "ESP_039983_1390_RGB.NOMAP.JP2: 0%| | 0/84129800 [00:00 1\u001b[0m \u001b[43mrgb\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdownload\u001b[49m\u001b[43m(\u001b[49m\u001b[43moverwrite\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/planetarypy/hirise.py:326\u001b[0m, in \u001b[0;36mCOLOR_PRODUCT.download\u001b[0;34m(self, overwrite)\u001b[0m\n\u001b[1;32m 324\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mFile exists. Use `overwrite=True` to download fresh.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 325\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[0;32m--> 326\u001b[0m \u001b[43murl_retrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlocal_path\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/planetarypy/utils.py:216\u001b[0m, in \u001b[0;36murl_retrieve\u001b[0;34m(url, outfile, chunk_size, user, passwd)\u001b[0m\n\u001b[1;32m 208\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mConnectionError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCould not download \u001b[39m\u001b[38;5;132;01m{\u001b[39;00murl\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mError code: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mR\u001b[38;5;241m.\u001b[39mstatus_code\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 209\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m tqdm\u001b[38;5;241m.\u001b[39mwrapattr(\n\u001b[1;32m 210\u001b[0m \u001b[38;5;28mopen\u001b[39m(outfile, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mwb\u001b[39m\u001b[38;5;124m\"\u001b[39m),\n\u001b[1;32m 211\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mwrite\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 214\u001b[0m desc\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mstr\u001b[39m(Path(outfile)\u001b[38;5;241m.\u001b[39mname),\n\u001b[1;32m 215\u001b[0m ) \u001b[38;5;28;01mas\u001b[39;00m fd:\n\u001b[0;32m--> 216\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m chunk \u001b[38;5;129;01min\u001b[39;00m R\u001b[38;5;241m.\u001b[39miter_content(chunk_size\u001b[38;5;241m=\u001b[39mchunk_size):\n\u001b[1;32m 217\u001b[0m fd\u001b[38;5;241m.\u001b[39mwrite(chunk)\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/requests/models.py:816\u001b[0m, in \u001b[0;36mResponse.iter_content..generate\u001b[0;34m()\u001b[0m\n\u001b[1;32m 814\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mraw, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstream\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m 815\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 816\u001b[0m \u001b[38;5;28;01myield from\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mraw\u001b[38;5;241m.\u001b[39mstream(chunk_size, decode_content\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 817\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m ProtocolError \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 818\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ChunkedEncodingError(e)\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/urllib3/response.py:940\u001b[0m, in \u001b[0;36mHTTPResponse.stream\u001b[0;34m(self, amt, decode_content)\u001b[0m\n\u001b[1;32m 938\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 939\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m is_fp_closed(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_fp) \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_decoded_buffer) \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m--> 940\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[43mamt\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mamt\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdecode_content\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdecode_content\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 942\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m data:\n\u001b[1;32m 943\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m data\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/urllib3/response.py:879\u001b[0m, in \u001b[0;36mHTTPResponse.read\u001b[0;34m(self, amt, decode_content, cache_content)\u001b[0m\n\u001b[1;32m 876\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_decoded_buffer) \u001b[38;5;241m>\u001b[39m\u001b[38;5;241m=\u001b[39m amt:\n\u001b[1;32m 877\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_decoded_buffer\u001b[38;5;241m.\u001b[39mget(amt)\n\u001b[0;32m--> 879\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_raw_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mamt\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 881\u001b[0m flush_decoder \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 882\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m amt \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/urllib3/response.py:814\u001b[0m, in \u001b[0;36mHTTPResponse._raw_read\u001b[0;34m(self, amt)\u001b[0m\n\u001b[1;32m 811\u001b[0m fp_closed \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mgetattr\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_fp, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mclosed\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mFalse\u001b[39;00m)\n\u001b[1;32m 813\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_error_catcher():\n\u001b[0;32m--> 814\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_fp_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mamt\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m fp_closed \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 815\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m amt \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m amt \u001b[38;5;241m!=\u001b[39m \u001b[38;5;241m0\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m data:\n\u001b[1;32m 816\u001b[0m \u001b[38;5;66;03m# Platform-specific: Buggy versions of Python.\u001b[39;00m\n\u001b[1;32m 817\u001b[0m \u001b[38;5;66;03m# Close the connection when no data is returned\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 822\u001b[0m \u001b[38;5;66;03m# not properly close the connection in all cases. There is\u001b[39;00m\n\u001b[1;32m 823\u001b[0m \u001b[38;5;66;03m# no harm in redundantly calling close.\u001b[39;00m\n\u001b[1;32m 824\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_fp\u001b[38;5;241m.\u001b[39mclose()\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/site-packages/urllib3/response.py:799\u001b[0m, in \u001b[0;36mHTTPResponse._fp_read\u001b[0;34m(self, amt)\u001b[0m\n\u001b[1;32m 796\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m buffer\u001b[38;5;241m.\u001b[39mgetvalue()\n\u001b[1;32m 797\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 798\u001b[0m \u001b[38;5;66;03m# StringIO doesn't like amt=None\u001b[39;00m\n\u001b[0;32m--> 799\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_fp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[43mamt\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mif\u001b[39;00m amt \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_fp\u001b[38;5;241m.\u001b[39mread()\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/http/client.py:463\u001b[0m, in \u001b[0;36mHTTPResponse.read\u001b[0;34m(self, amt)\u001b[0m\n\u001b[1;32m 460\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m amt \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 461\u001b[0m \u001b[38;5;66;03m# Amount is given, implement using readinto\u001b[39;00m\n\u001b[1;32m 462\u001b[0m b \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mbytearray\u001b[39m(amt)\n\u001b[0;32m--> 463\u001b[0m n \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mreadinto\u001b[49m\u001b[43m(\u001b[49m\u001b[43mb\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 464\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mmemoryview\u001b[39m(b)[:n]\u001b[38;5;241m.\u001b[39mtobytes()\n\u001b[1;32m 465\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 466\u001b[0m \u001b[38;5;66;03m# Amount is not given (unbounded read) so we must check self.length\u001b[39;00m\n\u001b[1;32m 467\u001b[0m \u001b[38;5;66;03m# and self.chunked\u001b[39;00m\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/http/client.py:507\u001b[0m, in \u001b[0;36mHTTPResponse.readinto\u001b[0;34m(self, b)\u001b[0m\n\u001b[1;32m 502\u001b[0m b \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mmemoryview\u001b[39m(b)[\u001b[38;5;241m0\u001b[39m:\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlength]\n\u001b[1;32m 504\u001b[0m \u001b[38;5;66;03m# we do not use _safe_read() here because this may be a .will_close\u001b[39;00m\n\u001b[1;32m 505\u001b[0m \u001b[38;5;66;03m# connection, and the user is reading more bytes than will be provided\u001b[39;00m\n\u001b[1;32m 506\u001b[0m \u001b[38;5;66;03m# (for example, reading in 1k chunks)\u001b[39;00m\n\u001b[0;32m--> 507\u001b[0m n \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mreadinto\u001b[49m\u001b[43m(\u001b[49m\u001b[43mb\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 508\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m n \u001b[38;5;129;01mand\u001b[39;00m b:\n\u001b[1;32m 509\u001b[0m \u001b[38;5;66;03m# Ideally, we would raise IncompleteRead if the content-length\u001b[39;00m\n\u001b[1;32m 510\u001b[0m \u001b[38;5;66;03m# wasn't satisfied, but it might break compatibility.\u001b[39;00m\n\u001b[1;32m 511\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_close_conn()\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/socket.py:704\u001b[0m, in \u001b[0;36mSocketIO.readinto\u001b[0;34m(self, b)\u001b[0m\n\u001b[1;32m 702\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[1;32m 703\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 704\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_sock\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrecv_into\u001b[49m\u001b[43m(\u001b[49m\u001b[43mb\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 705\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m timeout:\n\u001b[1;32m 706\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_timeout_occurred \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/ssl.py:1242\u001b[0m, in \u001b[0;36mSSLSocket.recv_into\u001b[0;34m(self, buffer, nbytes, flags)\u001b[0m\n\u001b[1;32m 1238\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m flags \u001b[38;5;241m!=\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 1239\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 1240\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnon-zero flags not allowed in calls to recv_into() on \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m%\u001b[39m\n\u001b[1;32m 1241\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__class__\u001b[39m)\n\u001b[0;32m-> 1242\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[43mnbytes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbuffer\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1243\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1244\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mrecv_into(buffer, nbytes, flags)\n", + "File \u001b[0;32m~/mambaforge/envs/py39_pdw2023/lib/python3.9/ssl.py:1100\u001b[0m, in \u001b[0;36mSSLSocket.read\u001b[0;34m(self, len, buffer)\u001b[0m\n\u001b[1;32m 1098\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1099\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m buffer \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m-> 1100\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_sslobj\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mlen\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbuffer\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1101\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1102\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_sslobj\u001b[38;5;241m.\u001b[39mread(\u001b[38;5;28mlen\u001b[39m)\n", + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], + "source": [ + "rgb.download(overwrite=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4fe49f8d-811f-4256-b065-8347a9e0a8a1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.DataArray (band: 3, y: 20000, x: 2024)>\n",
+       "dask.array<open_rasterio-b470a6e0ac41466679f9516f677878bb<this-array>, shape=(3, 20000, 2024), dtype=uint16, chunksize=(1, 2024, 2024), chunktype=numpy.ndarray>\n",
+       "Coordinates:\n",
+       "  * band         (band) int64 1 2 3\n",
+       "  * x            (x) float64 0.5 1.5 2.5 3.5 ... 2.022e+03 2.022e+03 2.024e+03\n",
+       "  * y            (y) float64 0.5 1.5 2.5 3.5 4.5 ... 2e+04 2e+04 2e+04 2e+04\n",
+       "    spatial_ref  int64 0\n",
+       "Attributes:\n",
+       "    scale_factor:  1.0\n",
+       "    add_offset:    0.0
" + ], + "text/plain": [ + "\n", + "dask.array, shape=(3, 20000, 2024), dtype=uint16, chunksize=(1, 2024, 2024), chunktype=numpy.ndarray>\n", + "Coordinates:\n", + " * band (band) int64 1 2 3\n", + " * x (x) float64 0.5 1.5 2.5 3.5 ... 2.022e+03 2.022e+03 2.024e+03\n", + " * y (y) float64 0.5 1.5 2.5 3.5 4.5 ... 2e+04 2e+04 2e+04 2e+04\n", + " spatial_ref int64 0\n", + "Attributes:\n", + " scale_factor: 1.0\n", + " add_offset: 0.0" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "rgb.read()" + ] + }, + { + "cell_type": "markdown", + "id": "1e985283-4b3f-4f95-8e00-a895e172616a", + "metadata": {}, + "source": [ + "# SPICE\n", + "## Archived kernels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a762d690-3e7c-494c-9bf3-5f0af7edfde4", + "metadata": {}, + "outputs": [], + "source": [ + "from planetarypy.spice import kernels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5672432b-3960-494f-9f95-ea6e75fe6b3d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
pathMission NamePDS3 or PDS4Data Size (GB)Start TimeStop Time
shorthand
bcbc/bc_spiceBepiColombo41.12018-10-202023-01-01
cassinico-s_j_e_v-spice-6-v1.0/cosp_1000Cassini Orbiter362.51997-10-152017-09-15
clementineclem1-l-spice-6-v1.0/clsp_1000Clementine30.81994-01-261994-05-07
dartdart/dart_spiceDART49.12021-11-092050-01-01
dawndawn-m_a-spice-6-v1.0/dawnsp_1000DAWN386.42007-09-272018-10-31
didi-c-spice-6-v1.0/disp_1000Deep Impact30.72005-01-122005-08-09
ds1ds1-a_c-spice-6-v1.0/ds1sp_1000Deep Space 130.91998-10-242001-12-18
epoxidif-c_e_x-spice-6-v1.0/epxsp_1000EPOXI31.02005-08-232011-03-01
em16em16/em16_spiceExoMars TGO 201649.82016-03-142023-05-21
grailgrail-l-spice-6-v1.0/grlsp_1000GRAIL34.32011-09-102012-12-17
hayabusahay-a-spice-6-v1.0/haysp_1000Hayabusa30.32005-09-112005-11-19
insightinsight/insight_spiceInSight40.92018-05-052022-12-15
junojno-j_e_ss-spice-6-v1.0/jnosp_1000JUNO347.62011-08-052022-12-15
ladeeladee/ladee_spiceLADEE40.62013-09-072050-01-01
lrolro-l-spice-6-v1.0/lrosp_1000Lunar Reconnaissance Orbiter3595.72009-06-182023-03-15
mavenmaven/maven_spiceMAVEN454.42013-11-182023-04-01
opportunitymer1-m-spice-6-v1.0/mer1sp_1000MER 1 (Opportunity)34.12003-07-072018-06-10
spiritmer2-m-spice-6-v1.0/mer2sp_1000MER 2 (Spirit)32.62003-06-102010-05-03
messengermess-e_v_h-spice-6-v1.0/messsp_1000MESSENGER344.82004-08-032015-04-30
mars2020mars2020/mars2020_spiceMars 202040.62020-07-302022-12-28
mexmex-e_m-spice-6-v2.0/mexsp_2000Mars Express38.52003-06-022022-11-30
mgsmgs-m-spice-6-v1.0/mgsp_1000Mars Global Surveyor315.41996-11-062006-11-02
odyody-m-spice-6-v1.0/odsp_1000Mars Odyssey333.92001-04-072023-01-01
mromro-m-spice-6-v1.0/mrosp_1000Mars Reconnaissance Orbiter3314.92005-08-122023-04-01
mslmsl-m-spice-6-v1.0/mslsp_1000Mars Science Laboratory30.62011-11-262022-11-06
nearnear-a-spice-6-v1.0/nearsp_1000NEAR32.41996-05-302001-02-28
nhnh-j_p_ss-spice-6-v1.0/nhsp_1000New Horizons31.62006-01-192019-12-30
orexorex/orex_spiceOSIRIS-REx4418.42016-09-082021-02-22
rosettaro_rl-e_m_a_c-spice-6-v1.0/rossp_1000Rosetta35.92004-03-022017-01-01
stardustsdu-c-spice-6-v1.0/sdsp_1000Stardust31.91999-02-072011-05-01
venus_climate_orbitervco/vco_spiceVenus Climate Orbiter41.72010-05-212022-01-01
vexvex-e_v-spice-6-v2.0/vexsp_2000Venus Express35.02005-11-092015-02-06
vovo1_vo2-m-spice-6-v1.0/vosp_1000Viking Orbiter30.11976-06-161980-07-30
\n", + "
" + ], + "text/plain": [ + " path \\\n", + "shorthand \n", + "bc bc/bc_spice \n", + "cassini co-s_j_e_v-spice-6-v1.0/cosp_1000 \n", + "clementine clem1-l-spice-6-v1.0/clsp_1000 \n", + "dart dart/dart_spice \n", + "dawn dawn-m_a-spice-6-v1.0/dawnsp_1000 \n", + "di di-c-spice-6-v1.0/disp_1000 \n", + "ds1 ds1-a_c-spice-6-v1.0/ds1sp_1000 \n", + "epoxi dif-c_e_x-spice-6-v1.0/epxsp_1000 \n", + "em16 em16/em16_spice \n", + "grail grail-l-spice-6-v1.0/grlsp_1000 \n", + "hayabusa hay-a-spice-6-v1.0/haysp_1000 \n", + "insight insight/insight_spice \n", + "juno jno-j_e_ss-spice-6-v1.0/jnosp_1000 \n", + "ladee ladee/ladee_spice \n", + "lro lro-l-spice-6-v1.0/lrosp_1000 \n", + "maven maven/maven_spice \n", + "opportunity mer1-m-spice-6-v1.0/mer1sp_1000 \n", + "spirit mer2-m-spice-6-v1.0/mer2sp_1000 \n", + "messenger mess-e_v_h-spice-6-v1.0/messsp_1000 \n", + "mars2020 mars2020/mars2020_spice \n", + "mex mex-e_m-spice-6-v2.0/mexsp_2000 \n", + "mgs mgs-m-spice-6-v1.0/mgsp_1000 \n", + "ody ody-m-spice-6-v1.0/odsp_1000 \n", + "mro mro-m-spice-6-v1.0/mrosp_1000 \n", + "msl msl-m-spice-6-v1.0/mslsp_1000 \n", + "near near-a-spice-6-v1.0/nearsp_1000 \n", + "nh nh-j_p_ss-spice-6-v1.0/nhsp_1000 \n", + "orex orex/orex_spice \n", + "rosetta ro_rl-e_m_a_c-spice-6-v1.0/rossp_1000 \n", + "stardust sdu-c-spice-6-v1.0/sdsp_1000 \n", + "venus_climate_orbiter vco/vco_spice \n", + "vex vex-e_v-spice-6-v2.0/vexsp_2000 \n", + "vo vo1_vo2-m-spice-6-v1.0/vosp_1000 \n", + "\n", + " Mission Name PDS3 or PDS4 \\\n", + "shorthand \n", + "bc BepiColombo 4 \n", + "cassini Cassini Orbiter 3 \n", + "clementine Clementine 3 \n", + "dart DART 4 \n", + "dawn DAWN 3 \n", + "di Deep Impact 3 \n", + "ds1 Deep Space 1 3 \n", + "epoxi EPOXI 3 \n", + "em16 ExoMars TGO 2016 4 \n", + "grail GRAIL 3 \n", + "hayabusa Hayabusa 3 \n", + "insight InSight 4 \n", + "juno JUNO 3 \n", + "ladee LADEE 4 \n", + "lro Lunar Reconnaissance Orbiter 3 \n", + "maven MAVEN 4 \n", + "opportunity MER 1 (Opportunity) 3 \n", + "spirit MER 2 (Spirit) 3 \n", + "messenger MESSENGER 3 \n", + "mars2020 Mars 2020 4 \n", + "mex Mars Express 3 \n", + "mgs Mars Global Surveyor 3 \n", + "ody Mars Odyssey 3 \n", + "mro Mars Reconnaissance Orbiter 3 \n", + "msl Mars Science Laboratory 3 \n", + "near NEAR 3 \n", + "nh New Horizons 3 \n", + "orex OSIRIS-REx 4 \n", + "rosetta Rosetta 3 \n", + "stardust Stardust 3 \n", + "venus_climate_orbiter Venus Climate Orbiter 4 \n", + "vex Venus Express 3 \n", + "vo Viking Orbiter 3 \n", + "\n", + " Data Size (GB) Start Time Stop Time \n", + "shorthand \n", + "bc 1.1 2018-10-20 2023-01-01 \n", + "cassini 62.5 1997-10-15 2017-09-15 \n", + "clementine 0.8 1994-01-26 1994-05-07 \n", + "dart 9.1 2021-11-09 2050-01-01 \n", + "dawn 86.4 2007-09-27 2018-10-31 \n", + "di 0.7 2005-01-12 2005-08-09 \n", + "ds1 0.9 1998-10-24 2001-12-18 \n", + "epoxi 1.0 2005-08-23 2011-03-01 \n", + "em16 9.8 2016-03-14 2023-05-21 \n", + "grail 4.3 2011-09-10 2012-12-17 \n", + "hayabusa 0.3 2005-09-11 2005-11-19 \n", + "insight 0.9 2018-05-05 2022-12-15 \n", + "juno 47.6 2011-08-05 2022-12-15 \n", + "ladee 0.6 2013-09-07 2050-01-01 \n", + "lro 595.7 2009-06-18 2023-03-15 \n", + "maven 54.4 2013-11-18 2023-04-01 \n", + "opportunity 4.1 2003-07-07 2018-06-10 \n", + "spirit 2.6 2003-06-10 2010-05-03 \n", + "messenger 44.8 2004-08-03 2015-04-30 \n", + "mars2020 0.6 2020-07-30 2022-12-28 \n", + "mex 8.5 2003-06-02 2022-11-30 \n", + "mgs 15.4 1996-11-06 2006-11-02 \n", + "ody 33.9 2001-04-07 2023-01-01 \n", + "mro 314.9 2005-08-12 2023-04-01 \n", + "msl 0.6 2011-11-26 2022-11-06 \n", + "near 2.4 1996-05-30 2001-02-28 \n", + "nh 1.6 2006-01-19 2019-12-30 \n", + "orex 418.4 2016-09-08 2021-02-22 \n", + "rosetta 5.9 2004-03-02 2017-01-01 \n", + "stardust 1.9 1999-02-07 2011-05-01 \n", + "venus_climate_orbiter 1.7 2010-05-21 2022-01-01 \n", + "vex 5.0 2005-11-09 2015-02-06 \n", + "vo 0.1 1976-06-16 1980-07-30 " + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "kernels.datasets" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a269e703-4c2d-4843-a82c-9f6056b2925d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['ck/bc_mmo_sc_cruise_v01.bc',\n", + " 'ck/bc_mpo_magboom_v01.bc',\n", + " 'ck/bc_mtm_sc_cruise_v01.bc',\n", + " 'fk/bc_dsk_surfaces_v02.tf',\n", + " 'fk/bc_mmo_v11.tf',\n", + " 'fk/bc_mpo_v33.tf',\n", + " 'fk/bc_mtm_v11.tf',\n", + " 'fk/bc_sci_v12.tf',\n", + " 'fk/earth_topo_201023.tf',\n", + " 'fk/estrack_v04.tf',\n", + " 'fk/rssd0002.tf',\n", + " 'ik/bc_mmo_mppe_v04.ti',\n", + " 'ik/bc_mmo_msasi_v03.ti',\n", + " 'ik/bc_mpo_aux_v01.ti',\n", + " 'ik/bc_mpo_bela_v07.ti',\n", + " 'ik/bc_mpo_mertis_v08.ti',\n", + " 'ik/bc_mpo_mgns_v02.ti',\n", + " 'ik/bc_mpo_mixs_v06.ti',\n", + " 'ik/bc_mpo_phebus_v06.ti',\n", + " 'ik/bc_mpo_serena_v08.ti',\n", + " 'ik/bc_mpo_simbio-sys_v09.ti',\n", + " 'ik/bc_mpo_sixs_v08.ti',\n", + " 'ik/bc_mpo_str_v02.ti',\n", + " 'ik/bc_mtm_mcam_v05.ti',\n", + " 'lsk/naif0012.tls',\n", + " 'pck/earth_000101_230328_230102.bpc',\n", + " 'pck/gm_de431.tpc',\n", + " 'pck/pck00010.tpc',\n", + " 'sclk/bc_mmo_fict_20170228.tsc',\n", + " 'sclk/bc_mpo_fict_20181127.tsc',\n", + " 'sclk/bc_mpo_step_20221229.tsc',\n", + " 'spk/bc_mmo_cruise_v01.bsp',\n", + " 'spk/bc_mmo_struct_v01.bsp',\n", + " 'spk/bc_mpo_cog_v03.bsp',\n", + " 'spk/bc_mpo_struct_v08.bsp',\n", + " 'spk/bc_mtm_cruise_v01.bsp',\n", + " 'spk/bc_mtm_struct_v06.bsp',\n", + " 'spk/bc_sci_v02.bsp',\n", + " 'spk/de432s.bsp',\n", + " 'spk/earthstns_itrf93_201023.bsp',\n", + " 'spk/estrack_v04.bsp']" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "kernels.list_kernels_for_day('bc', '2019-01-01')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "33018f2f-4036-42e1-af2d-516981e9f767", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "5080d64cc2f14fed9f5e5adaa8f8a447", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Kernels downloaded: 0%| | 0/50 [00:00" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "moon.F_aspect" + ] + }, { "cell_type": "code", "execution_count": null, @@ -252,14 +276,214 @@ "id": "2b031942-e4cf-4b50-93cf-839d6b2febb6", "metadata": {}, "outputs": [], + "source": [ + "mars = MarsSpicer()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c6604bc-7b22-4d1d-91f2-b1c65ced4293", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'2023-06-27T18:37:50.876055'" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.utc" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "28f74fc3-a514-42b4-8a63-4d26e06e1510", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "83.31658188802474" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.l_s" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "008a65b2-b576-44e2-8791-a55128d73c2e", + "metadata": {}, + "outputs": [], + "source": [ + "mars.goto('inca')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ac3c28c4-fb32-48dc-987b-67883b5162fb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(220.09830399469547, -440.60853011059214, -3340.5081261541495)" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.spoint" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a81c102e-5701-4c85-92ab-e44b8c56b71d", + "metadata": {}, + "outputs": [], + "source": [ + "mars.aspect=180\n", + "mars.tilt=30" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e467885d-a57b-4dd8-a3f9-c0a3d54d45b6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$0 \\; \\mathrm{\\frac{W}{m^{2}}}$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.F_flat" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d75386f1-8c3d-4fae-8db2-7d4baa60f8c2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$0 \\; \\mathrm{\\frac{W}{m^{2}}}$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.F_aspect" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f3ee6a0c-c2ff-4e9e-83ae-cb825a81dc46", + "metadata": {}, + "outputs": [], + "source": [ + "mars.set_spoint_by(lat=0, lon=0)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e30d64ee-f7ee-46d7-b9cf-3a447bd55958", + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$339.2043 \\; \\mathrm{\\frac{W}{m^{2}}}$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.F_flat" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e069b261-5acd-4db6-a6df-de5fc078bae3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$397.92501 \\; \\mathrm{\\frac{W}{m^{2}}}$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mars.F_tilt" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cbab5bf0-7f6d-4a96-9775-0d686fdca622", + "metadata": {}, + "outputs": [], "source": [] } ], "metadata": { "kernelspec": { - "display_name": "python3", + "display_name": "conda-env-py39_pdw2023-py", "language": "python", - "name": "python3" + "name": "conda-env-py39_pdw2023-py" } }, "nbformat": 4,