This directory builds a library from C++ code to read/write PETSIRD data. You need to yardl generate in the model directory first.
The C++ code shows writing to and reading from an HDF5 file
-
Compile the code:
mkdir -p build cmake -G Ninja -S . -B build -DHDF5_ROOT=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=~/install cd build ninja install
If you did not use
condato install HDF5, do not add the-DHDF5_ROOT=$CONDA_PREFIXpart of thecmakeline. -
Run the generator:
./petsird_generator test.h5 -
Run the analyzer:
./petsird_analysis test.h5 -
You can inspect the HDF5 file by running
h5dump test.h5
See the example directory