Skip to content

Commit 8943ad7

Browse files
committed
Merge branch 'main' of github.com:PlasmaPy/PlasmaPy-Demos
2 parents ac5ef84 + 5ca88f4 commit 8943ad7

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

2023-SULI/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Notebooks for this workshop can be run in three ways:
1212

1313
3. On a **local installation of Python** that includes Jupyter notebook. (Advanced)
1414

15-
Note that some functionality, like interactive plots, may not work on Google Colaboratory. Instructions are included below for each option.
15+
Some functionality, like interactive plots, may not work on Google Colaboratory. Instructions are included below for each option.
16+
1617

1718
# Table of contents
1819

@@ -47,6 +48,11 @@ Once the Binder enviroment has initialized, navigate to the folder with the name
4748
# Running Examples on Jupyter Notebook Locally with Anaconda <a name="installation_anaconda"></a>
4849
1. Download the .ipynb file for the notebook(s)
4950

51+
The notebooks can be downloaded from Google Drive at the following links. Click on the link and select "Download".
52+
53+
- [Getting started with PlasmaPy](https://drive.google.com/file/d/1xf4M64Xp6e2tfo17W2Pm_6B1jzPy4L36/view?usp=sharing)
54+
- [Single particle drifts](https://drive.google.com/file/d/1tAXZOF3_TD5CBMsE_6eDdP_-M95_vcRD/view?usp=sharing)
55+
5056
2. Download and install [Anaconda](https://www.anaconda.com/download)
5157

5258
3. Open Anaconda and do the following to create a new enviroment with PlasmaPy and all its dependencies installed.
@@ -55,7 +61,7 @@ Once the Binder enviroment has initialized, navigate to the folder with the name
5561

5662
b) Left click on the green arrow.
5763

58-
c) Click'Open Terminal' to open a command prompt.
64+
c) Click 'Open Terminal' to open a command prompt.
5965

6066
![anaconda_open_terminal](https://github.com/PlasmaPy/PlasmaPy-Demos/assets/32618747/a3054200-13ff-4d85-937e-0b379976536f)
6167

@@ -73,11 +79,10 @@ Once the Binder enviroment has initialized, navigate to the folder with the name
7379

7480
![anaconda_open_enviroment](https://github.com/PlasmaPy/PlasmaPy-Demos/assets/32618747/cb23fa79-3f35-4f4b-8df1-7b6cb16d3af2)
7581

76-
6. Click 'Launch' on the Jupyter Notebook card. The program should open in your default web browser. Navigate to the downloaded .ipynb file and click on the title to open the notebook. ![anaconda_open_notebook](https://github.com/PlasmaPy/PlasmaPy-Demos/assets/32618747/67fa8cf0-4d92-4dc9-bee0-175dcd1d7f0f)
77-
78-
82+
6. Click 'Launch' on the Jupyter Notebook card. The program should open in your default web browser. Navigate to the downloaded `.ipynb` file and click on the title to open the notebook. ![anaconda_open_notebook](https://github.com/PlasmaPy/PlasmaPy-Demos/assets/32618747/67fa8cf0-4d92-4dc9-bee0-175dcd1d7f0f)
7983

8084
# Tips on Using Jupyter Notebook <a name="jupyter_tips"></a>
85+
8186
- Select "Runtime>Run All" to run the entire notebook.
8287
- To run a single cell, select the cell with your mouse and then press "Shift+Enter"
8388
- Create new cells using the "Insert" menu or the "+Code" button.

2023-SULI/plasmapy-tutorial-completed.ipynb

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "5b8f9968",
66
"metadata": {},
77
"source": [
8-
"# PlasmaPy"
8+
"# SULI Computational Workshop"
99
]
1010
},
1111
{
@@ -30,6 +30,12 @@
3030
"metadata": {},
3131
"outputs": [],
3232
"source": [
33+
"import sys\n",
34+
"\n",
35+
"if 'google.colab' in str(get_ipython()):\n",
36+
" if 'plasmapy' not in sys.modules:\n",
37+
" !pip install plasmapy==2023.5.1 requests==2.27.1\n",
38+
" \n",
3339
"import numpy as np\n",
3440
"import astropy.units as u\n",
3541
"from astropy import constants as const\n",
@@ -931,7 +937,11 @@
931937
"metadata": {},
932938
"outputs": [],
933939
"source": [
934-
"electron.is_category(require=\"lepton\", exclude=\"baryon\", any_of={\"boson\", \"fermion\"})"
940+
"electron.is_category(\n",
941+
" require=\"lepton\", \n",
942+
" exclude=\"baryon\", \n",
943+
" any_of={\"boson\", \"fermion\"},\n",
944+
")"
935945
]
936946
},
937947
{
@@ -1129,7 +1139,7 @@
11291139
"id": "0ba578e6",
11301140
"metadata": {},
11311141
"source": [
1132-
"When we calculate $β$ for the photosphere, we find that it is an order of magnitude larger than 1, so plasma pressure forces are more important than magnetic tension and pressure."
1142+
"When we calculate $β$ for the photosphere, we find that it is an order of magnitude larger than $1$, so plasma pressure forces are more important than magnetic tension and pressure."
11331143
]
11341144
},
11351145
{
@@ -1178,7 +1188,7 @@
11781188
"\n",
11791189
"[Magnetic reconnection] is the fundamental plasma process that converts stored magnetic energy into kinetic energy, thermal energy, and particle acceleration. Reconnection powers solar flares and is a key component of geomagnetic storms in Earth's magnetosphere. Reconnection can also degrade confinement in fusion devices such as tokamaks.\n",
11801190
"\n",
1181-
"The **inertial length** for a particle is the characteristic length scale for getting accelerated or decelerated by forces in a plasma. \n",
1191+
"The **inertial length** is the characteristic length scale for a particle to get accelerated or decelerated by electromagnetic forces in a plasma. \n",
11821192
"\n",
11831193
"When the reconnection layer thickness is shorter than the **ion inertial length**, $d_i ≡ c/ω_{pi}$, collisionless effects and the Hall effect enable reconnection to be **fast** (Zweibel & Yamada 2009). The inner electron diffusion region has a thickness of about the **electron inertial length**, $d_e≡c/ω_{pe}$. (Here, $ω_{pi}$ and $ω_{pe}$ are the ion and electron plasma frequencies.)\n",
11841194
"\n",
@@ -1367,7 +1377,7 @@
13671377
"name": "python",
13681378
"nbconvert_exporter": "python",
13691379
"pygments_lexer": "ipython3",
1370-
"version": "3.10.10"
1380+
"version": "3.11.3"
13711381
},
13721382
"widgets": {
13731383
"application/vnd.jupyter.widget-state+json": {

2023-SULI/plasmapy-tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@
10791079
"\n",
10801080
"[Magnetic reconnection] is the fundamental plasma process that converts stored magnetic energy into kinetic energy, thermal energy, and particle acceleration. Reconnection powers solar flares and is a key component of geomagnetic storms in Earth's magnetosphere. Reconnection can also degrade confinement in fusion devices such as tokamaks.\n",
10811081
"\n",
1082-
"The **inertial length** for a particle is the characteristic length scale for getting accelerated or decelerated by forces in a plasma. \n",
1082+
"The **inertial length** is the characteristic length scale for a particle to get accelerated or decelerated by electromagnetic forces in a plasma. \n",
10831083
"\n",
10841084
"When the reconnection layer thickness is shorter than the **ion inertial length**, $d_i ≡ c/ω_{pi}$, collisionless effects and the Hall effect enable reconnection to be **fast** (Zweibel & Yamada 2009). The inner electron diffusion region has a thickness of about the **electron inertial length**, $d_e≡c/ω_{pe}$. (Here, $ω_{pi}$ and $ω_{pe}$ are the ion and electron plasma frequencies.)\n",
10851085
"\n",

0 commit comments

Comments
 (0)