# Tutorials

This section provides basic tutorials for loading, saving and post-processing your indentation tests.

## Pre-Processing (`examples/pre_processing`)

```{hint}
To run this tutorial locally, download the following files to a working directory of your choice:
- {download}`pre_processing.ipynb <examples/pre_processing.ipynb>`
- {download}`Hysitron_TI950 <_static/Hysitron_TI950.zip>` and unzip it.
```

- **Goal**: turn raw instrument exports into a structured `Batch`.
- **Workflow**: define the indenter tip and test protocol; select files (CLI or widget UI) with correct `file_format`/`encoding`; fill metadata (date, operators, sample, device); build the `Batch`; export artifacts.
- **Outputs**: `my_batch.toml` (metadata) and `my_batch.csv` (tabular data) created via `batch.dump("my_batch")`.
- **Notes**:
    - example targets Hysitron TI-950 data;
    - enable widgets with `%matplotlib widget`.



## Post-Processing (`examples/post_processing`)

```{hint}
To run this tutorial locally,
- run the pre-processing tutorial (above) first to create `my_batch`.
- {download}`post_processing.ipynb <examples/post_processing.ipynb>`
```

- **Workflow**: load the saved `Batch`; inspect tip and test data; plot force–displacement; extract features per step — loading (`parabolic_fit`) and unloading (`unloading_fit`); compute indentation modulus using Oliver–Pharr and convert to sample modulus (needs Poisson’s ratio); run inverse analysis demos (`GIAN99`, `DAO01`, `CASA05`) for parameter back-out.
- **Outputs**: per-test data frames and interactive plots for quick validation.


```{toctree}
---
caption: Links to tutorial preview
maxdepth: 1
---

examples/pre_processing
examples/post_processing
```


{download}`example.ipynb <examples/pre_processing.ipynb>`
