diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4b9760c..69adda2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -48,7 +48,7 @@ RUN script=$(curl -fsSL "https://raw.githubusercontent.com/microsoft/vscode-dev- ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] CMD [ "sleep", "infinity" ] -ARG MAMBAFORGE_VERSION=22.9.0-2 +ARG MAMBAFORGE_VERSION=24.9.0-0 # Based on https://github.com/conda-forge/miniforge-images/blob/master/ubuntu/Dockerfile RUN wget --no-hsts --quiet https://github.com/conda-forge/miniforge/releases/download/${MAMBAFORGE_VERSION}/Mambaforge-${MAMBAFORGE_VERSION}-Linux-$(uname -m).sh -O /tmp/miniforge.sh \ @@ -91,7 +91,7 @@ RUN mkdir -p /home/vscode/.local/share/CMakeTools \ && chown vscode:conda /home/vscode/.local/share/CMakeTools/cmake-tools-kits.json # Install the yardl tool -ARG YARDL_VERSION=0.3.2 +ARG YARDL_VERSION=0.6.2 RUN wget --quiet "https://github.com/microsoft/yardl/releases/download/v${YARDL_VERSION}/yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" \ && tar -xzf "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" \ && mv yardl "/opt/conda/envs/${CONDA_ENVIRONMENT_NAME}/bin/" \ diff --git a/environment.yml b/environment.yml index 71ad798..9e85d4b 100644 --- a/environment.yml +++ b/environment.yml @@ -15,6 +15,7 @@ dependencies: - nlohmann_json>=3.11.2 - numpy>=1.24.3 - python>=3.11.3 + - matplotlib - shellcheck>=0.8.0 - xtensor-fftw>=0.2.5 - xtensor>=0.24.2 diff --git a/model/ScannerInformation.yml b/model/ScannerInformation.yml index 48515f0..942cec8 100644 --- a/model/ScannerInformation.yml +++ b/model/ScannerInformation.yml @@ -42,7 +42,8 @@ ScannerInformation: !record tofBinEdges: !array items: float dimensions: 1 - # TOF resolution in mm + # TOF resolution (as FWHM) in mm + # Scanner coincidence timing resolution (CTR) without tof-binning tofResolution: float # Edge information for energy windows in keV (given as from first to last edge, so there is one more edge than the number of bins) diff --git a/python/petsird_analysis.py b/python/petsird_analysis.py index 64ca5f5..4dee032 100644 --- a/python/petsird_analysis.py +++ b/python/petsird_analysis.py @@ -11,7 +11,8 @@ if __name__ == "__main__": with petsird.BinaryPETSIRDReader(sys.stdin.buffer) as reader: header = reader.read_header() - print(f"Subject ID: {header.exam.subject.id}") + if header.exam is not None: + print(f"Subject ID: {header.exam.subject.id}") print(f"Scanner name: { header.scanner.model_name}") print( f"Types of modules: {len(header.scanner.scanner_geometry.replicated_modules)}"