HERMES: High-speed Event Retrieval and Management for Enhanced Spectral neutron imaging with TPX3Cams
HERMES comprises a set of Python and C/C++ libraries (not a standalone program) designed to support the development of custom code for acquiring, processing, and analyzing data from the TPX3Cam manufactured by Amsterdam Scientific Instruments. HERMES' primary function is provide the foundational tools needed for users to create applications tailored to their specific requirements in energy-resolved neutron imaging with TPX3Cams, along with it's subsequent analysis. With HERMES users have access to a flexible framework that simplifies the integration of TPX3Cam's capabilities into their projects, while also providing the needed diagnostics for development and trouble shooting.
Before using HERMES, ensure your system meets the necessary requirements and set up the environment variable for a seamless experience.
Below are instructions for installing prerequisites on Linux/macOS and Windows.
Note HERMES has not been tested on any Windows systems directly, though it has been used successfully in WSL2 with ubuntu.
pyHERMES requires Python 3.8 or later. Python can be obtained directly via download or by a third party platform like Anaconda3, apt-get, Homebrew.
-
Direct Installation:
- Visit https://www.python.org/downloads/ to download and install Python. Ensure to select the option to 'Add Python to PATH' during installation.
-
Via Anaconda:
- Anaconda provides a convenient way to install Python and manage packages. Download and install Anaconda from https://www.anaconda.com/products/individual. After installation, you can create a new environment for HERMES with Python 3.8:
conda create --name hermes conda activate hermes
- Anaconda provides a convenient way to install Python and manage packages. Download and install Anaconda from https://www.anaconda.com/products/individual. After installation, you can create a new environment for HERMES with Python 3.8:
-
Via apt or homebrew
# Ubuntu/Debian sudo apt-get update sudo apt-get install python3.8
# macOS brew install [email protected]
cHERMES requires a C/C++ Compiler, along with CMake 3.15 or higher.
-
GCC/G++ (Linux) or Xcode Command Line Tools (macOS):
- Linux:
sudo apt-get install build-essential
- macOS:
- Install Xcode from the App Store, then open Terminal and run:
xcode-select --install
- Install Xcode from the App Store, then open Terminal and run:
- Linux:
-
CMake:
- Install CMake using your package manager or from https://cmake.org/download/.
# Ubuntu/Debian sudo apt-get install cmake
# macOS brew install cmake
- Install CMake using your package manager or from https://cmake.org/download/.
-
Microsoft C++ Build Tools:
- Download and install the Build Tools for Visual Studio from https://visualstudio.microsoft.com/visual-cpp-build-tools/. During installation, select the "C++ build tools" workload.
-
CMake:
- Download and install CMake from https://cmake.org/download/. During installation, ensure you add CMake to the system PATH.
HERMES requires setting up the HERMES_HOME
environment variable as well as additional variables for cHERMES
and pyHERMES
. These steps ensure that both the C/C++ libraries and Python modules are correctly recognized by your system.
macOS/Linux Users:
- Open your shell profile file (
.bashrc
,.zshrc
, etc.). - Add the following lines to set
HERMES_HOME
and the additional variables:export HERMES_HOME=/path/to/hermes export cHERMES_DIR=$HERMES_HOME/cHERMES export PYTHONPATH=$PYTHONPATH:$HERMES_HOME
- Replace /path/to/hermes with the actual installation path of HERMES on your machine.
- Save the file.
- Apply the changes by running
source ~/.bashrc # or the equivalent command for your shell
Windows Users:
- Search for "Edit the system environment variables" and open it.
- Click "Environment Variables."
- To set
HERMES_HOME
, under "User variables," click "New."- Set the Variable name to
HERMES_HOME
. - Set the Variable value to the path of your HERMES installation.
- Set the Variable name to
- To set
cHERMES_DIR
, repeat the process to add a new User variable:- Set the Variable name to
cHERMES_DIR
. - Set the Variable value to
%HERMES_HOME%\cHERMES
.
- Set the Variable name to
- To add
pyHERMES
to the Python path, find the Path variable under "User variables" (or "System variables" if you want it available system-wide) and edit it:- Click "New" and add
%HERMES_HOME%\pyHERMES
.
- Click "New" and add
- Click OK to save each variable.
These environment variable settings ensure that the system can properly locate and utilize the cHERMES
and pyHERMES
libraries. HERMES_HOME
serves as the base directory for the entire HERMES suite, while cHERMES_DIR
and the addition of pyHERMES
to the PYTHONPATH
enable specific functionality within the HERMES ecosystem
To verify the environment variable:
macOS/Linux Users:
echo $HERMES_HOME
Windows:
echo %HERMES_HOME%
HERMES is distributed as open-source software under an MIT License, with LANL open source approval (reference O4660). Please see LICENSE for more details.