# Tutorials

There are eight short tutorials, a little over two hours end to end. They run
on data that ships with the WISER source, so there is nothing to download. Work
through them in order and you will have used every major tool in the
application on a real scene. If WISER is not installed yet, start with
{doc}`Installation <../installation>`.

```{admonition} What you are working with
:class: note
A GIS layer stores one value per pixel, or three if it is a color image. The
scenes here store up to several hundred. Every pixel holds a spectrum: a
measurement of how much light that patch of ground reflected at each of 4, 15
or 425 wavelengths. WISER is built to read those spectra.

So instead of arranging layers to make a picture, you read a measurement out of
any pixel you click ({doc}`Tutorial 2 <02-spectra>`), average it over an area to
get a signature you can trust ({doc}`Tutorial 3 <03-regions-of-interest>`),
compare it against a laboratory reference to identify what is on the ground
({doc}`Tutorial 7 <07-detection>`), and let the shapes of those spectra sort the
scene into classes on their own ({doc}`Tutorial 5 <05-classification>`).

Keep the Spectrum Plot pane open throughout. Most of what makes a result
believable is visible there and nowhere else.
```

```{list-table}
:header-rows: 1
:widths: 6 32 42 20

* - #
  - Tutorial
  - What you learn
  - Data
* - 1
  - {doc}`Your First Scene <01-first-look>`
  - Open a file, arrange the panes, choose bands, apply a contrast stretch
  - `caltech_4_100_150_nm`
* - 2
  - {doc}`Reading Spectra <02-spectra>`
  - Pull spectra from pixels, collect and compare them, load a mineral library, remove the continuum
  - `caltech_425_7_7_nm`
* - 3
  - {doc}`Regions of Interest <03-regions-of-interest>`
  - Define classes, extract mean signatures, export spectra and geometry
  - `caltech_4_100_150_nm`
* - 4
  - {doc}`Band Math: Mapping Vegetation <04-band-math-ndvi>`
  - Write and bind an expression, build a vegetation index, threshold it
  - `caltech_4_100_150_nm`
* - 5
  - {doc}`Classifying a Scene <05-classification>`
  - Read feature space in the scatter plot, run K-means, identify clusters
  - `caltech_4_100_150_nm`
* - 6
  - {doc}`PCA and MNF <06-pca-mnf>`
  - Reduce dimensions, read a scree plot, choose between variance and SNR ordering
  - `caltech_4_100_150_nm`
* - 7
  - {doc}`Finding a Known Material <07-detection>`
  - SAM, SFF, MTMF and linear unmixing, and which to reach for
  - `caltech_15_20_22_bb`
* - 8
  - {doc}`Bench and Close-Range Data <08-bench-and-close-range>`
  - The same tools on a laboratory cube, and what a bench instrument needs from you
  - `circuit_4_100_150_um`
```

## The data

Everything these tutorials need is already in your WISER checkout:

```
src/test_utils/test_datasets/     rasters
src/test_utils/test_spectra/      spectral libraries
```

These are the project's unit-test fixtures, so they are small on purpose — a
150 × 150 pixel campus scene, a 7 × 7 pixel 425-band cube, a 20 × 22 pixel
short-wave infrared subset with a bad-band list. They are real data, and they
are enough to exercise every tool.

If you installed WISER from a release rather than from source, get them by
cloning the repository:

```bash
git clone https://github.com/Ehlmann-research-group/WISER.git
```

Without git, open the repository page on GitHub and choose **Code ▸ Download
ZIP**.

Every screenshot in the tutorials was taken from WISER by a script that runs
the steps described, not mocked up.

## Where to go from here

- {doc}`User Manual <../user-content/user-manual>`: the reference for every
  tool, dialog and option
- {doc}`Data Analysis Tools <../user-content/data-analysis-tools/data-analysis-tools>`:
  what each algorithm does and how it is implemented
- {doc}`Extending WISER <../extending-wiser/index>`: add your own analysis as
  a plugin

---

**Next:** start with {doc}`Tutorial 1 <01-first-look>`.

```{toctree}
:hidden:

01-first-look
02-spectra
03-regions-of-interest
04-band-math-ndvi
05-classification
06-pca-mnf
07-detection
08-bench-and-close-range
```
