Skip to content

Commit

Permalink
misc linting
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 30, 2024
1 parent cd60b61 commit b86b88f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
.vscode

cpp/generated/
cpp/build/

python/petsird/
**/__pycache__/
/cpp/generated/
/cpp/build/
/python/petsird/
__pycache__/

# Common editor backups
/.vscode/
~$*
*~
*.bak
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The purpose of this repo is to have a simple working example of a data model for PET imaging (list mode data). This is **not complete**, and aspects do not follow the actual proposal of PETSIRD yet.

## Background

The [Emission Tomography Standardization Initiative (ETSI)](https://etsinitiative.org/)
is working towards establishing a standard for PET Raw Data, called PETSIRD ("PET ETSI Raw Data").

Expand All @@ -17,9 +18,11 @@ in a [VS Code devcontainer](https://code.visualstudio.com/docs/devcontainers/con
This codespace/container will contain all necessary tools, including `yardl` itself, as well as the current repository.
2. Browse the [`model`](./model/README.md) directory.
3. Use `yardl` to generate C++ and Python code for the model:
```sh
cd model
yardl generate
```

```sh
cd model
yardl generate
```

4. Have a look at (and try!) the examples in the [`cpp`](cpp/README.md) and/or
[`python`](python/README.md) directories.
10 changes: 5 additions & 5 deletions cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ This directory contains some C++ example code to read/write PETSIRD data. You ne
The C++ code shows writing to and reading from an HDF5 file

1. Compile the code:

```sh
cd /whereever/cpp
mkdir -p build && cd build`
cmake -G Ninja -S .. -DHDF5_ROOT=$CONDA_PREFIX
ninja`
mkdir -p build
cmake -G Ninja -S . -B build -DHDF5_ROOT=$CONDA_PREFIX
ninja
```

If you did not use `conda` to install HDF5, do not add the `-DHDF5_ROOT=$CONDA_PREFIX` part of the `cmake` line.

2. Run the generator: `./petsird_generator test.h5`
3. Run the analyzer: `./petsird_analysis test.h5`
4. You can inspect the HDF5 file by running `h5dump test.h5`

7 changes: 4 additions & 3 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ reading it from standard in. This can be used as follows:
1. `python petsird_generator.py | python petsird_analysis.py`

There is also a very basic utility to plot the scanner geometry. For instance
```
python petsird_generator.py > test.bin
python petsird_plot_scanner.py < test.bin`

```sh
python petsird_generator.py > test.bin
python petsird_plot_scanner.py < test.bin
```

0 comments on commit b86b88f

Please sign in to comment.