-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.qmd
118 lines (76 loc) · 5.14 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# JupyterHub Guide {.unnumbered}
This is a short guide to create and run the notbooks and environments in the JupiterHub for the Master course Microwave Remote Sensing (120.030) at the TU Wien.
## Starting JupyterHub
In TUWEL, click on the JupyterHub icon ![JupyterHub Icon](assets/images/jupiterhub_icon.png){width=7em}, which redirects you to your own JupyterLab user environment. You should then select the Server for the **Desktop Notebook** from the **Microwave Remote Sensing** course. Be patient - this can take a couple of minutes.
<p style="text-align: center;">
<img src="assets/images/select_server.png" style="border: 1px solid black; width: 25em; "/>
</p>
Please note that all screenshots in this guide refer to the lecture 120.030 Microwave Remote Sensing (2024W), even if a few things are different for you, the overall functionality and interface remain the same.
## Exploring JupyterLab
When you start your server for the first time, your point of entry will be this starting page:
<p style="text-align: center;">
<img src="assets/images/startingpage.png" style="border: 1px solid black; width: 25em; "/>
</p>
In the center, you have the Launcher where you can create Python or other files, play around with Jupyter Notebooks, store intermediate data. You can also open a Python console, a terminal, a text file, and many more.
On the left, you can see your home directory where you have the folders `lectures` and `shared`. There might be other folders as well, but don't be concerned about them.
::: {.columns}
:::: {.column width="60%"}
After some intense coding and analysis, it can happen that you have many terminal and notebook tabs open. However, simply closing them does not quit the processes and running kernels in the background. Therefore, we recommend that you tidy up your running processes after some time, which can be done as marked by the top-left circle. As an overview, the number of running kernels and terminals are always shown at the bottom-left corner.
::::
:::: {.column width="40%"}
<p style="text-align: center;">
<img src="assets/images/quit_processes.png" style="border: 1px solid black; width: 12em; "/>
</p>
::::
:::
## Setup of Exercise Environment
To use the Notebooks from the course, the following steps need to be taken:
1. Navigate to the folder `~/shared/120.030-2024W/` where you should find a `Makefile` and a `README.md`.
<p style="text-align: center;">
<img src="assets/images/start_terminal.png" style="border: 1px solid black; width: 25em; "/>
</p>
2. At this level, you should open a Terminal using the Launcher and run the command
```bash
make notebooks
```
Wait until the installation is finished - this can take a couple of minutes.
3. The notebooks and an environment, where the important packages and all their dependencies are included, have been installed for you.
4. It might be necessary to re-login to the JupyterHub to see it coming into effect.
5. Now you should see a folder named `microwave-remote-sensing` containing the notebooks and additional kernels in the Launcher of JupyterLab.
<p style="text-align: center;">
<img src="assets/images/new_notebooks.png" style="border: 1px solid black; width: 25em; "/>
</p>
6. Select the kernel `mrs-env` kernel for execution of the code blocks in the notebook.
<p style="text-align: center;">
<img src="assets/images/select_kernel.png" style="border: 1px solid black; width: 25em; "/>
</p>
::: {.callout-note appearance="simple"}
In case you could not select the correct server and could not find the folder from step one, you might be in the wrong server. You can change your server by selecting
```
File -> Hub Control Panel
```
and clicking on `Stop My Server`.
<p style="text-align: center;">
<img src="assets/images/stop_server.png" style="border: 1px solid black; width: 25em; "/>
</p>
Then press `Start My Server` and you should be able to select the "**Desktop Notebook**" for the "120.030-2024W: 120.030 Microwave Remote Sensing" course.
:::
## Removing Exercise Environment
To remove the exercise notebooks as well as the Jupyter kernel Launch a terminal from `~/shared/120.030-2024W/` and type:
```bash
make delete
```
## Editing Jupyter Notebooks
The homework exercises of the course are labeled as `homework_exercise.ipynb`. You are supposed to use these notebooks for the homework assignments and the completed notebooks should be submitted through TUWEL. The notebooks consist of two types of cells: Python and Markdown cells. Python cells contain executable Python code, whereas Markdown cells are used for open text and multiple choice questions. Double click on an existing cell to alter its content. To add new cells click select the cell type from the drop-down menu and click on the plus sign, as follows for Python cells:
![](assets/images/code_cell.png)
And for Markdown cells:
![](assets/images/markdown_cell.png)
For the multiple choice questions double click on the Markdown cell and replace the correct answers, as follows:
```{markdown}
- [ ] Original
- [x] Selected answer
```
- [ ] Original
- [x] Selected answer
To save your work use the drop-down menu under `File` and select `Save Notebook` or use the shortcut `CTRL + S`.