Skip to content

Commit c7831b6

Browse files
authored
Merge pull request #202 from datacarpentry/166-figshare
Add FigShare link to setup
2 parents f9b5427 + f6adccb commit c7831b6

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

fig/jupyter_overview.png

61.7 KB
Loading

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ This lesson shows how to use Python and skimage to do basic image processing.
2323
> to be familiar with.
2424
{: .prereq}
2525

26+
Before following the lesson, please [make sure you have the software and data required]({{ page.root }}/{% link setup.md %}.

setup.md

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

7-
## Setup instructions for the Image Processing workshop
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+
21+
22+
## Software
823

924
1. Download and install the latest [Anaconda
1025
distribution](https://www.anaconda.com/distribution/) for your
@@ -41,15 +56,32 @@ permalink: /setup/
4156
> package.
4257
{: .callout}
4358
44-
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 lab`.
64+
{: .solution }
65+
66+
> ## Instructions for Windows
67+
>
68+
> Launch the Anaconda Prompt program and type `jupyter lab`.
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+
After Jupyter Lab has launched, click the "Python 3" button under "Notebook" in the launcher window,
74+
or use the "File" menu, to open a new Python 3 notebook.
75+
76+
4. To test your environment, run the following lines in a cell of the notebook:
4577
~~~
4678
import skimage.io
4779
import matplotlib.pyplot as plt
4880
%matplotlib widget
49-
81+
5082
# load an image
51-
image = skimage.io.imread(fname='fig/00-colonies01.jpg')
52-
83+
image = skimage.io.imread(fname='data/colonies-01.tif')
84+
5385
# display the image
5486
fig, ax = plt.subplots()
5587
plt.imshow(image, cmap='gray')
@@ -58,8 +90,15 @@ permalink: /setup/
5890
{: .language-python}
5991
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.
6092
61-
3. The example image files are available through Figshare. Learners
62-
can download the images from [FIXME
63-
figshare](https://figshare.com/). We recommend to create a
64-
directory for the Jupyter notebooks/code created during the
65-
lesson. The images should be located in a subfolder named `images/`.
93+
> ## Running Cells in a Notebook
94+
>
95+
>
96+
> ![Overview of the Jupyter Notebook graphical user interface]({{ page.source}}{% link fig/jupyter_overview.png %})
97+
> To run Python code in a Jupyter notebook cell, click on a cell in the notebook
98+
> (or add a new one by clicking the `+` button in the toolbar),
99+
> make sure that the cell type is set to "Code" (check the dropdown in the toolbar),
100+
> and add the Python code in that cell.
101+
> After you have added the code,
102+
> you can run the cell by selecting "Run" -> "Run selected cell" in the top menu,
103+
> or pressing <kbd>Shift</kbd>+<kbd>Enter</kbd>.
104+
{: .solution }

0 commit comments

Comments
 (0)