Skip to content

Commit 6baa663

Browse files
authored
reorganise and expand setup instructions
Fixes #172 by re-ordering to place data setup before software setup, and adding more details about how to run code in Jupyter.
1 parent 5767ca0 commit 6baa663

File tree

1 file changed

+42
-20
lines changed

1 file changed

+42
-20
lines changed

setup.md

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@ title: Setup
44
permalink: /setup/
55
---
66

7-
Before joining the workshop or following the lesson, please complete the software and data setup described in this page.
7+
Before joining the workshop or following the lesson, please complete the data and software setup described in this page.
8+
9+
10+
## Data
11+
12+
The example images used in this lesson are available on [FigShare](https://figshare.com/).
13+
To download the data, please visit [the dataset page for this workshop][figshare-data]
14+
and click the "Download all" button.
15+
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again,
16+
e.g. your Desktop or a folder you have created for using in this workshop.
17+
(The name `data` is optional but recommended, as this is the name we will use to refer to the folder throughout the lesson.)
18+
19+
[figshare-data]: https://figshare.com/articles/dataset/Data_Carpentry_Image_Processing_Data_beta_/19260677
20+
821

922
## Software
1023

@@ -43,14 +56,28 @@ Before joining the workshop or following the lesson, please complete the softwar
4356
> package.
4457
{: .callout}
4558
46-
To test your environment, open a Jupyter notebook and copy the following lines into a cell:
59+
3. Open a Jupyter notebook:
60+
61+
> ## Instructions for Linux & Mac
62+
>
63+
> Open a terminal and type `jupyter notebook`.
64+
{: .solution }
65+
66+
> ## Instructions for Windows
67+
>
68+
> Launch the Anaconda Prompt program and type `jupyter notebook`.
69+
> (Running this command on the standard Command Prompt will return an error:
70+
> `'conda' is not recognized as an internal or external command, operable program or batch file.`
71+
{: .solution }
72+
73+
4. To test your environment, run the following lines in a cell of the notebook:
4774
~~~
4875
import skimage.io
4976
import matplotlib.pyplot as plt
5077
%matplotlib widget
5178

5279
# load an image
53-
image = skimage.io.imread(fname='fig/00-colonies01.jpg')
80+
image = skimage.io.imread(fname='data/colonies-01.tif')
5481

5582
# display the image
5683
fig, ax = plt.subplots()
@@ -59,20 +86,15 @@ Before joining the workshop or following the lesson, please complete the softwar
5986
~~~
6087
{: .language-python}
6188
Upon execution of the cell, an image should be displayed in an interactive widget. When hovering over the image with the mouse pointer, the pixel coordinates and color values are displayed below the image.
62-
63-
3. The example image files are available through Figshare. Learners
64-
can download the images from [FIXME
65-
figshare](https://figshare.com/). We recommend to create a
66-
directory for the Jupyter notebooks/code created during the
67-
lesson. The images should be located in a subfolder named `images/`.
68-
69-
70-
## Data
71-
72-
The example images used in this lesson are available on [FigShare](https://figshare.com/).
73-
To download the data, please visit [the dataset page for this workshop][figshare-data]
74-
and click the "Download all" button.
75-
Unzip the downloaded file, and save the contents as a folder somewhere you will easily find it again,
76-
e.g. your Desktop or a folder you have created for using in this workshop.
77-
78-
[figshare-data]: https://figshare.com/articles/dataset/Data_Carpentry_Image_Processing_Data_beta_/19260677
89+
90+
> ## Running Cells in a Notebook
91+
>
92+
> To run Python code in a Jupyter notebook cell, click on a cell in the notebook
93+
> (or add a new one by clicking the `+` button in the toolbar),
94+
> make sure that the cell type is set to "Code" (check the dropdown in the toolbar),
95+
> and add the Python code in that cell.
96+
> After you have added the code,
97+
> you can run the cell by selecting "Run" -> "Run selected cell" in the top menu,
98+
> or pressing <kdb>Shift</kbd>+<kbd>Enter</kbd>.
99+
{: .solution }
100+

0 commit comments

Comments
 (0)