Skip to content

Commit

Permalink
Update instrument guide
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Apr 24, 2024
1 parent 2af19e6 commit ad2ca30
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 90 deletions.
32 changes: 2 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
# `c_therm_tci.py`
# C-Therm TCi instrument usage and data process

Process data exported from the C-Therm TCi thermal conductivity analyzer.

## Usage

First install Python 3.11 and `pipx`. See the [quick setup guide](#windows-quick-setup) for details on Windows machine setup. The `c_therm_tci.py` script processes the TCi C-Therm instrument's XML data exports into CSV files. For instance, to process the [example data](#example-data) locally, download [`c_therm_tci.py`](src/c_therm_tci.py), [`data.xml`](example/data.xml) and [`data.xlsx`](example/data.xlsx) to your Desktop. Then, right-click on your Desktop, click "Open in Terminal", and run

```Shell
py -3.11 -m pipx run c_therm_tci.py
```

which processes `data.xml` into `data.csv`. Now, open `data.xlsx`, click to enable data connections, then click `Refresh all` in the `Data` ribbon *twice* to refresh the Power Queries and PivotTable. This example data and the Excel workbook illustrates how to process arbitrary data exports from the C-Therm TCi instrument.

## Example data

The example data folder in this repo has `data.xml`, a simplified representation of the shape of data exported from the C-Therm TCi instrument and `data.csv` represents the result of processing with `c_therm_tci.py`.

The `data.xlsx` workbook ingests and post-processes `data.csv`. The `setup` sheet programmatically finds `data.csv` for Power Query, `raw_data` shows CSV data, `grouped_averages` groups and averages results by test run, and `results` further digests the data. `grouped_averages` also allows overriding the "validity" of a test result and to provide a comment about each test.

## Windows quick setup

This is the quickest way to get set up on Windows for running this Python script, and for Python scripts in general. Install [App Installer (`winget`)](https://apps.microsoft.com/detail/9nblggh4nns1). If this fails you may need to go to the Microsoft Store app, click `Library`, then `Get Updates`, then `Update all`, then try installing `winget` again. Also install [Windows Terminal](https://apps.microsoft.com/detail/9mz1snwt0n5d), then open Windows Terminal from the Start menu. Run

```Shell
winget install --id 'Python.Python.3.11' --override '/quiet PrependPath=0'
py -3.11 -m pip install pipx
py -3.11 -m pipx ensurepath
```

which will install Python 3.11 and `pipx`, and configure `pipx`.
Process data exported from the C-Therm TCi thermal conductivity analyzer. See the how to [process data](https://blakenaccarato.github.io/c-therm-tci/) exported from the instrument or [the tutorial](https://blakenaccarato.github.io/c-therm-tci/tutorial.html) to learn how to use the instrument.

## Project information

Expand Down
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def dpath(path: Path, rel: Path = DOCS) -> str:
# ! Autodoc2
nitpicky = True
autodoc2_packages = [
f"../src/{PACKAGE}",
f"../src/{PACKAGE}.py",
f"{PACKAGE}_docs",
f"../tests/{PACKAGE}_tests",
f"../scripts/{PACKAGE}_tools",
Expand All @@ -185,12 +185,17 @@ def dpath(path: Path, rel: Path = DOCS) -> str:
autodoc2_docstring_parser_regexes = [(".*", f"{PACKAGE}_docs.docstrings")]
# ! Intersphinx
intersphinx_mapping = ISPX_MAPPING
nitpick_ignore = []
nitpick_ignore = [
# ? Not found
("py:class", "parsel.Selector")
]
nitpick_ignore_regex = [
# ? Missing inventory
("py:class", r"docutils\..+"),
("py:class", r"numpydoc\.docscrape\..+"),
("py:class", r"_pytest\..+"),
# ? Missing target
("py:class", r"parsel\.Selector.+"),
# ? TypeAlias: https://github.com/sphinx-doc/sphinx/issues/10785
("py:class", rf"{PACKAGE}.*\.types\..+"),
]
Expand Down
40 changes: 38 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# [`c_therm_tci.py`](https://github.com/blakeNaccarato/c-therm-tci)

:::{toctree}
:hidden:
tutorial
Expand All @@ -8,3 +6,41 @@ changelog
apidocs/index
references
:::

# C-Therm TCi instrument usage and data process

Process data exported from the C-Therm TCi thermal conductivity analyzer. See below for processing data exported from the instrument, or <project:#tutorial> to learn how to use the instrument.

## Usage

First install Python 3.11 and `pipx`. See the [quick setup guide](#windows-quick-setup) for details on Windows machine setup. The `c_therm_tci.py` script processes the TCi C-Therm instrument's XML data exports into CSV files. For instance, to process the [example data](#example-data) locally, download [`c_therm_tci.py`](../src/c_therm_tci.py), [`data.xml`](../example/data.xml) and [`data.xlsx`](../example/data.xlsx) to your Desktop. Then, right-click on your Desktop, click "Open in Terminal", and run

```Shell
py -3.11 -m pipx run c_therm_tci.py
```

which processes `data.xml` into `data.csv`. Now, open `data.xlsx`, click to enable data connections, then click `Refresh all` in the `Data` ribbon *twice* to refresh the Power Queries and PivotTable. This example data and the Excel workbook illustrates how to process arbitrary data exports from the C-Therm TCi instrument.

## Example data

The example data folder in this repo has `data.xml`, a simplified representation of the shape of data exported from the C-Therm TCi instrument and `data.csv` represents the result of processing with `c_therm_tci.py`.

The `data.xlsx` workbook ingests and post-processes `data.csv`. The `setup` sheet programmatically finds `data.csv` for Power Query, `raw_data` shows CSV data, `grouped_averages` groups and averages results by test run, and `results` further digests the data. `grouped_averages` also allows overriding the "validity" of a test result and to provide a comment about each test.

## Windows quick setup

This is the quickest way to get set up on Windows for running this Python script, and for Python scripts in general. Install [App Installer (`winget`)](https://apps.microsoft.com/detail/9nblggh4nns1). If this fails you may need to go to the Microsoft Store app, click `Library`, then `Get Updates`, then `Update all`, then try installing `winget` again. Also install [Windows Terminal](https://apps.microsoft.com/detail/9mz1snwt0n5d), then open Windows Terminal from the Start menu. Run

```Shell
winget install --id 'Python.Python.3.11' --override '/quiet PrependPath=0'
py -3.11 -m pip install pipx
py -3.11 -m pipx ensurepath
```

which will install Python 3.11 and `pipx`, and configure `pipx`.

## Project information

- [Changes](<https://blakeNaccarato.github.io/c-therm-tci/changelog.html>)
- [Docs](<https://blakeNaccarato.github.io/c-therm-tci>)
- [Contributing](<https://blakeNaccarato.github.io/c-therm-tci/contributing.html>)
210 changes: 163 additions & 47 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,211 @@
# Tutorial

![](_static/00.png)
```{figure} _static/01.png
:alt:
![](_static/01.png)
```

![](_static/02.png)
```{figure} _static/02.png
:alt:
![](_static/03.png)
```

![](_static/04.png)
```{figure} _static/03.png
:alt:
![](_static/05.png)
```

![](_static/06.png)
```{figure} _static/04.png
:alt:
![](_static/07.png)
```

![](_static/08.png)
```{figure} _static/05.png
:alt:
![](_static/09.png)
```

![](_static/10.png)
```{figure} _static/06.png
:alt:
![](_static/11.png)
```

![](_static/12.png)
```{figure} _static/07.png
:alt:
![](_static/13.png)
```

![](_static/14.png)
```{figure} _static/08.png
:alt:
![](_static/15.png)
```

![](_static/16.png)
```{figure} _static/09.png
:alt:
![](_static/17.png)
```

![](_static/18.png)
```{figure} _static/10.png
:alt:
![](_static/19.png)
```

![](_static/20.png)
```{figure} _static/11.png
:alt:
![](_static/21.png)
```

![](_static/22.png)
```{figure} _static/12.png
:alt:
![](_static/23.png)
```

![](_static/24.png)
```{figure} _static/13.png
:alt:
![](_static/25.png)
```

![](_static/26.png)
```{figure} _static/14.png
:alt:
![](_static/27.png)
```

![](_static/28.png)
```{figure} _static/15.png
:alt:
![](_static/29.png)
```

![](_static/30.png)
```{figure} _static/16.png
:alt:
![](_static/31.png)
```

![](_static/32.png)
```{figure} _static/17.png
:alt:
![](_static/33.png)
```

![](_static/34.png)
```{figure} _static/18.png
:alt:
![](_static/35.png)
```

![](_static/36.png)
```{figure} _static/19.png
:alt:
![](_static/37.png)
```

![](_static/38.png)
```{figure} _static/20.png
:alt:
![](_static/39.png)
```

![](_static/40.png)
```{figure} _static/21.png
:alt:
![](_static/41.png)
```

![](_static/42.png)
```{figure} _static/22.png
:alt:
![](_static/43.png)
```

![](_static/44.png)
```{figure} _static/23.png
:alt:
![](_static/45.png)
```

![](_static/46.png)
```{figure} _static/24.png
:alt:
```

```{figure} _static/25.png
:alt:
```

```{figure} _static/26.png
:alt:
```

```{figure} _static/27.png
:alt:
```

```{figure} _static/28.png
:alt:
```

```{figure} _static/29.png
:alt:
```

```{figure} _static/30.png
:alt:
```

```{figure} _static/31.png
:alt:
```

```{figure} _static/32.png
:alt:
```

```{figure} _static/33.png
:alt:
```

```{figure} _static/34.png
:alt:
```

```{figure} _static/35.png
:alt:
```

```{figure} _static/36.png
:alt:
```

```{figure} _static/37.png
:alt:
```

```{figure} _static/38.png
:alt:
```

```{figure} _static/39.png
:alt:
```

```{figure} _static/40.png
:alt:
```

```{figure} _static/41.png
:alt:
```

```{figure} _static/42.png
:alt:
```
6 changes: 0 additions & 6 deletions scripts/c_therm_tci_tools/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from subprocess import run
from sys import version_info

from ruamel.yaml import YAML

from c_therm_tci_tools.types import Platform, PythonVersion

# ! For local dev config tooling
Expand All @@ -32,10 +30,6 @@
"""Dependencies appended to locks without compiling their dependencies."""
OVERRIDE = REQS / "override.txt"
"""Overrides to satisfy otherwise incompatible combinations."""
SYS_PYTHON_VERSION = YAML().load(COPIER_ANSWERS.read_text(encoding="utf-8"))[
"python_version"
]
"""Python version."""

# ! Platforms and Python versions
SYS_PLATFORM: Platform = platform(terse=True).casefold().split("-")[0] # pyright: ignore[reportAssignmentType] 1.1.356
Expand Down
Loading

0 comments on commit ad2ca30

Please sign in to comment.