Skip to content

Commit 0ce9ef3

Browse files
Merge pull request #87 from NASA-PDS/python312
upgrade to python 3.12
2 parents 7e5c2df + ad958db commit 0ce9ef3

52 files changed

Lines changed: 6580 additions & 1190 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,42 @@ This repository contains example [JupyterLab notebooks](https://jupyter.org) for
55

66
## 🖥 Prerequisites
77

8-
To run these notebooks locally, you'll need [Python 3.7](https://python.org/) or later as well as a web browser.
8+
To run these notebooks locally, you'll need [Python 3.12](https://python.org/) or later as well as a web browser.
9+
Latest tests have been done with python3.12, but the notebooks should work with any version of python3.7 or later.
910

1011

1112
## 🏃‍♀️ Getting Started
1213

1314
Run the following commands from a terminal and your default web browser should launch:
1415

16+
Clone the current repository:
17+
18+
```console
19+
git clone https://github.com/NASA-PDS/search-api-notebook.git
20+
cd search-api-notebook
21+
```
22+
23+
Create a virtual environment and install the dependencies
24+
1525
```console
1626
$ # Create a virtual Python environment to isolate Jupyter and PDS dependencies
17-
$ python3 -m venv venv
27+
$ python3.12 -m venv venv
1828
$ source venv/bin/activate
1929
$ pip install --upgrade --quiet pip
2030
$ # Install the dependencies
2131
$ pip install --requirement requirements.txt
22-
$ # Start it up
23-
$ jupyter-lab
2432
```
25-
26-
At this point you'll have a locally running JupyterLab server and your browser opened to it. (If not, point your browser to http://localhost:8888/lab).
27-
28-
From here, you can try out the PDS API notebooks in the `/notebooks/` folder in the file tree on the left side:
2933

30-
- `ovirs` contains demonstration notebooks for the [OSIRIS-REx Visible and InfraRed Spectrometer, OVIRS](https://www.asteroidmission.org). Within this folder are two sub-folders with the actual demonstration notebooks:
31-
- `part1` has the notebook `explore-a-collection.ipynb` that shows how to get a get and explore a data collection with the API.
32-
- `part2` has a notebook `find-data-standalone.ipynb` that extracts a specific data collection subset. A [demo video](https://www.youtube.com/watch?v=jTclsXR713Y) of this notebook is available.
33-
- `galileo magnetometer` exhibits using PDS data in [WWT](https://pywwt.readthedocs.io/) via the PDS API. Run the following commands to configure your notebook to run pyWWT.
34+
And start JupyterLab where your code will run:
3435

3536
```console
36-
$ jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager
37-
$ jupyter labextension install --no-build @wwtelescope/jupyterlab
38-
$ jupyter lab build
39-
$ # To start up
4037
$ jupyter-lab
4138
```
39+
40+
At this point you'll have a locally running JupyterLab server and your browser opened to it. (If not, point your browser to http://localhost:8888/lab).
41+
42+
From here, you can try out the PDS API notebooks in the `/notebooks/` folder in the file tree on the left side.
43+
4244
Note that to interact with the pyWWT window, you must open a new tab in the jupyter notebook and select the AAS WorldWide Telescope icon. For further instructions and troubleshooting, see the [pyWWT installation page](https://pywwt.readthedocs.io/en/stable/installation.html#install-pywwt-with-pip).
4345

4446
## 👥 Contributing

notebooks/discipline/geo/BepiColombo_FlybyVisualization.ipynb

Lines changed: 336 additions & 0 deletions
Large diffs are not rendered by default.

notebooks/discipline/geo/DEM_MapVisualization.ipynb

Lines changed: 1253 additions & 0 deletions
Large diffs are not rendered by default.

notebooks/geo/messenger-radio-science-with-pdr.ipynb renamed to notebooks/discipline/geo/messenger-radio-science-with-pdr.ipynb

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 1,
15+
"execution_count": 2,
1616
"id": "6f88e5fe-99ed-4330-959f-bd783c1419e0",
1717
"metadata": {
1818
"tags": []
1919
},
2020
"outputs": [],
2121
"source": [
22-
"import pds.peppi as peppi\n",
22+
"import pds.peppi as pep\n",
2323
"import pandas as pd\n",
2424
"import pdr\n",
2525
"import os\n",
@@ -39,17 +39,17 @@
3939
},
4040
{
4141
"cell_type": "code",
42-
"execution_count": 2,
42+
"execution_count": 3,
4343
"id": "a0aba1d5-2f87-4383-9174-0621983112f9",
4444
"metadata": {
4545
"tags": []
4646
},
4747
"outputs": [],
4848
"source": [
49-
"client = peppi.PDSRegistryClient()\n",
49+
"client = pep.PDSRegistryClient()\n",
5050
"start_date = datetime.fromisoformat(\"2012-03-02\")\n",
5151
"end_date = datetime.fromisoformat(\"2012-03-05\")\n",
52-
"products = peppi.Products(client).of_collection(\"urn:nasa:pds:mess-rs-raw:data-rsr::1.0\") \\\n",
52+
"products = pep.Products(client).of_collection(\"urn:nasa:pds:mess-rs-raw:data-rsr::1.0\") \\\n",
5353
" .after(start_date).before(end_date)"
5454
]
5555
},
@@ -65,7 +65,7 @@
6565
},
6666
{
6767
"cell_type": "code",
68-
"execution_count": 3,
68+
"execution_count": 5,
6969
"id": "9663ca2c-2bfa-46ff-98c6-d8f2bf003df9",
7070
"metadata": {
7171
"tags": []
@@ -98,7 +98,7 @@
9898
},
9999
{
100100
"cell_type": "code",
101-
"execution_count": 4,
101+
"execution_count": 6,
102102
"id": "e85ef9f5-cbd0-4f9e-95ac-4148a13ae4aa",
103103
"metadata": {
104104
"tags": []
@@ -157,21 +157,21 @@
157157
" <td>12336</td>\n",
158158
" <td>C997</td>\n",
159159
" <td>0</td>\n",
160-
" <td>16240</td>\n",
160+
" <td>4240</td>\n",
161161
" <td>1</td>\n",
162162
" <td>232</td>\n",
163163
" <td>2</td>\n",
164164
" <td>...</td>\n",
165-
" <td>796.0</td>\n",
166-
" <td>65450.0</td>\n",
167-
" <td>60631.0</td>\n",
168-
" <td>1443.0</td>\n",
169-
" <td>7544.0</td>\n",
170-
" <td>3094.0</td>\n",
171-
" <td>64285.0</td>\n",
172-
" <td>60389.0</td>\n",
173-
" <td>3853.0</td>\n",
174-
" <td>10843.0</td>\n",
165+
" <td>NaN</td>\n",
166+
" <td>NaN</td>\n",
167+
" <td>NaN</td>\n",
168+
" <td>NaN</td>\n",
169+
" <td>NaN</td>\n",
170+
" <td>NaN</td>\n",
171+
" <td>NaN</td>\n",
172+
" <td>NaN</td>\n",
173+
" <td>NaN</td>\n",
174+
" <td>NaN</td>\n",
175175
" </tr>\n",
176176
" <tr>\n",
177177
" <th>1</th>\n",
@@ -181,21 +181,21 @@
181181
" <td>12336</td>\n",
182182
" <td>C997</td>\n",
183183
" <td>0</td>\n",
184-
" <td>16240</td>\n",
184+
" <td>4240</td>\n",
185185
" <td>1</td>\n",
186186
" <td>232</td>\n",
187187
" <td>2</td>\n",
188188
" <td>...</td>\n",
189-
" <td>60129.0</td>\n",
190-
" <td>57308.0</td>\n",
191-
" <td>61522.0</td>\n",
192-
" <td>63473.0</td>\n",
193-
" <td>58466.0</td>\n",
194-
" <td>64058.0</td>\n",
195-
" <td>2596.0</td>\n",
196-
" <td>58943.0</td>\n",
197-
" <td>60094.0</td>\n",
198-
" <td>5559.0</td>\n",
189+
" <td>NaN</td>\n",
190+
" <td>NaN</td>\n",
191+
" <td>NaN</td>\n",
192+
" <td>NaN</td>\n",
193+
" <td>NaN</td>\n",
194+
" <td>NaN</td>\n",
195+
" <td>NaN</td>\n",
196+
" <td>NaN</td>\n",
197+
" <td>NaN</td>\n",
198+
" <td>NaN</td>\n",
199199
" </tr>\n",
200200
" <tr>\n",
201201
" <th>2</th>\n",
@@ -205,21 +205,21 @@
205205
" <td>12336</td>\n",
206206
" <td>C997</td>\n",
207207
" <td>0</td>\n",
208-
" <td>16240</td>\n",
208+
" <td>4240</td>\n",
209209
" <td>1</td>\n",
210210
" <td>232</td>\n",
211211
" <td>2</td>\n",
212212
" <td>...</td>\n",
213-
" <td>64285.0</td>\n",
214-
" <td>57983.0</td>\n",
215-
" <td>54239.0</td>\n",
216-
" <td>2332.0</td>\n",
217-
" <td>59676.0</td>\n",
218-
" <td>62370.0</td>\n",
219-
" <td>3356.0</td>\n",
220-
" <td>60638.0</td>\n",
221-
" <td>61218.0</td>\n",
222-
" <td>61666.0</td>\n",
213+
" <td>NaN</td>\n",
214+
" <td>NaN</td>\n",
215+
" <td>NaN</td>\n",
216+
" <td>NaN</td>\n",
217+
" <td>NaN</td>\n",
218+
" <td>NaN</td>\n",
219+
" <td>NaN</td>\n",
220+
" <td>NaN</td>\n",
221+
" <td>NaN</td>\n",
222+
" <td>NaN</td>\n",
223223
" </tr>\n",
224224
" <tr>\n",
225225
" <th>3</th>\n",
@@ -229,21 +229,21 @@
229229
" <td>12336</td>\n",
230230
" <td>C997</td>\n",
231231
" <td>0</td>\n",
232-
" <td>16240</td>\n",
232+
" <td>4240</td>\n",
233233
" <td>1</td>\n",
234234
" <td>232</td>\n",
235235
" <td>2</td>\n",
236236
" <td>...</td>\n",
237-
" <td>8053.0</td>\n",
238-
" <td>1458.0</td>\n",
239-
" <td>15883.0</td>\n",
240-
" <td>48.0</td>\n",
241-
" <td>1924.0</td>\n",
242-
" <td>5033.0</td>\n",
243-
" <td>3614.0</td>\n",
244-
" <td>60679.0</td>\n",
245-
" <td>59099.0</td>\n",
246-
" <td>65488.0</td>\n",
237+
" <td>NaN</td>\n",
238+
" <td>NaN</td>\n",
239+
" <td>NaN</td>\n",
240+
" <td>NaN</td>\n",
241+
" <td>NaN</td>\n",
242+
" <td>NaN</td>\n",
243+
" <td>NaN</td>\n",
244+
" <td>NaN</td>\n",
245+
" <td>NaN</td>\n",
246+
" <td>NaN</td>\n",
247247
" </tr>\n",
248248
" <tr>\n",
249249
" <th>4</th>\n",
@@ -253,21 +253,21 @@
253253
" <td>12336</td>\n",
254254
" <td>C997</td>\n",
255255
" <td>0</td>\n",
256-
" <td>16240</td>\n",
256+
" <td>4240</td>\n",
257257
" <td>1</td>\n",
258258
" <td>232</td>\n",
259259
" <td>2</td>\n",
260260
" <td>...</td>\n",
261-
" <td>7044.0</td>\n",
262-
" <td>61457.0</td>\n",
263-
" <td>63778.0</td>\n",
264-
" <td>12412.0</td>\n",
265-
" <td>65533.0</td>\n",
266-
" <td>4966.0</td>\n",
267-
" <td>5867.0</td>\n",
268-
" <td>56465.0</td>\n",
269-
" <td>7863.0</td>\n",
270-
" <td>2461.0</td>\n",
261+
" <td>NaN</td>\n",
262+
" <td>NaN</td>\n",
263+
" <td>NaN</td>\n",
264+
" <td>NaN</td>\n",
265+
" <td>NaN</td>\n",
266+
" <td>NaN</td>\n",
267+
" <td>NaN</td>\n",
268+
" <td>NaN</td>\n",
269+
" <td>NaN</td>\n",
270+
" <td>NaN</td>\n",
271271
" </tr>\n",
272272
" <tr>\n",
273273
" <th>...</th>\n",
@@ -433,11 +433,11 @@
433433
"180 NJPL 2 I 12336 \n",
434434
"\n",
435435
" SFDU Data Description ID SFDU RSR Length Pad SFDU RSR Length \\\n",
436-
"0 C997 0 16240 \n",
437-
"1 C997 0 16240 \n",
438-
"2 C997 0 16240 \n",
439-
"3 C997 0 16240 \n",
440-
"4 C997 0 16240 \n",
436+
"0 C997 0 4240 \n",
437+
"1 C997 0 4240 \n",
438+
"2 C997 0 4240 \n",
439+
"3 C997 0 4240 \n",
440+
"4 C997 0 4240 \n",
441441
".. ... ... ... \n",
442442
"176 C997 0 4240 \n",
443443
"177 C997 0 4240 \n",
@@ -459,11 +459,11 @@
459459
"180 1 232 \n",
460460
"\n",
461461
" Primary Header CHDO Type ... I/Q Pair, I_3990 I/Q Pair, I_3991 \\\n",
462-
"0 2 ... 796.0 65450.0 \n",
463-
"1 2 ... 60129.0 57308.0 \n",
464-
"2 2 ... 64285.0 57983.0 \n",
465-
"3 2 ... 8053.0 1458.0 \n",
466-
"4 2 ... 7044.0 61457.0 \n",
462+
"0 2 ... NaN NaN \n",
463+
"1 2 ... NaN NaN \n",
464+
"2 2 ... NaN NaN \n",
465+
"3 2 ... NaN NaN \n",
466+
"4 2 ... NaN NaN \n",
467467
".. ... ... ... ... \n",
468468
"176 2 ... NaN NaN \n",
469469
"177 2 ... NaN NaN \n",
@@ -472,11 +472,11 @@
472472
"180 2 ... NaN NaN \n",
473473
"\n",
474474
" I/Q Pair, I_3992 I/Q Pair, I_3993 I/Q Pair, I_3994 I/Q Pair, I_3995 \\\n",
475-
"0 60631.0 1443.0 7544.0 3094.0 \n",
476-
"1 61522.0 63473.0 58466.0 64058.0 \n",
477-
"2 54239.0 2332.0 59676.0 62370.0 \n",
478-
"3 15883.0 48.0 1924.0 5033.0 \n",
479-
"4 63778.0 12412.0 65533.0 4966.0 \n",
475+
"0 NaN NaN NaN NaN \n",
476+
"1 NaN NaN NaN NaN \n",
477+
"2 NaN NaN NaN NaN \n",
478+
"3 NaN NaN NaN NaN \n",
479+
"4 NaN NaN NaN NaN \n",
480480
".. ... ... ... ... \n",
481481
"176 NaN NaN NaN NaN \n",
482482
"177 NaN NaN NaN NaN \n",
@@ -485,11 +485,11 @@
485485
"180 NaN NaN NaN NaN \n",
486486
"\n",
487487
" I/Q Pair, I_3996 I/Q Pair, I_3997 I/Q Pair, I_3998 I/Q Pair, I_3999 \n",
488-
"0 64285.0 60389.0 3853.0 10843.0 \n",
489-
"1 2596.0 58943.0 60094.0 5559.0 \n",
490-
"2 3356.0 60638.0 61218.0 61666.0 \n",
491-
"3 3614.0 60679.0 59099.0 65488.0 \n",
492-
"4 5867.0 56465.0 7863.0 2461.0 \n",
488+
"0 NaN NaN NaN NaN \n",
489+
"1 NaN NaN NaN NaN \n",
490+
"2 NaN NaN NaN NaN \n",
491+
"3 NaN NaN NaN NaN \n",
492+
"4 NaN NaN NaN NaN \n",
493493
".. ... ... ... ... \n",
494494
"176 NaN NaN NaN NaN \n",
495495
"177 NaN NaN NaN NaN \n",
@@ -500,7 +500,7 @@
500500
"[905 rows x 8071 columns]"
501501
]
502502
},
503-
"execution_count": 4,
503+
"execution_count": 6,
504504
"metadata": {},
505505
"output_type": "execute_result"
506506
}

0 commit comments

Comments
 (0)