Skip to content
Merged
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
fb2c0bf
Updated version to v1.1.0 beta
dobrienphd Nov 2, 2025
444fdbe
Removing old documentation
dobrienphd Nov 2, 2025
debd0a0
Explicit bool default values for FixedValues
dobrienphd Nov 2, 2025
faa640c
Added flip commands for directional cosines to PhaseSpaceFileWriter
dobrienphd Nov 2, 2025
2df4850
Refactor command line argument handling and add new options for parti…
dobrienphd Nov 2, 2025
c49b2a2
Update preserveConstants command to use explicit bool default value
dobrienphd Nov 2, 2025
12a995d
Updated version to v1.1.0 beta
dobrienphd Nov 2, 2025
f05bd88
Removing old documentation
dobrienphd Nov 2, 2025
dc9f3c3
Explicit bool default values for FixedValues
dobrienphd Nov 2, 2025
960ee86
Added flip commands for directional cosines to PhaseSpaceFileWriter
dobrienphd Nov 2, 2025
e6eeb29
Refactor command line argument handling and add new options for parti…
dobrienphd Nov 2, 2025
c27c80a
Update preserveConstants command to use explicit bool default value
dobrienphd Nov 2, 2025
395ba0e
Merge branch 'v1.1.0' of github.com:dobrienphd/ParticleZoo into v1.1.0
dobrienphd Nov 2, 2025
903eb2f
Add validation for energy filter and conflicting particle filter options
dobrienphd Nov 2, 2025
ed7bde5
Removed debugging code
dobrienphd Nov 2, 2025
3e5c40a
Extended UserOptions with helper methods to extract values
dobrienphd Nov 2, 2025
a4c7cf9
Refactor PHSPConvert to improve command line argument handling and va…
dobrienphd Nov 2, 2025
1927ab2
Refactor argument parsing to use std::string_view instead of std::string
dobrienphd Nov 2, 2025
cdadd75
Add overloads for PrintUsage and ParseArgs to support std::string for…
dobrienphd Nov 2, 2025
bcb4961
Moved CLI_POSITIONALS declaration to before UserOptions definition
dobrienphd Nov 2, 2025
6190e5c
Refactor PHSPConvert to enhance command line argument handling and va…
dobrienphd Nov 2, 2025
be86649
Refactor command registration in PHSPConvert to use RegisterCommands
dobrienphd Nov 2, 2025
eaf1f2f
Fixed patch version
dobrienphd Nov 5, 2025
6abc8ce
Enhance PHSPImage to support multiple scoring quantities and generati…
dobrienphd Nov 6, 2025
d686c06
Refactored PHSPImage for improved readability and maintainability
dobrienphd Nov 8, 2025
9c1a33e
Add support for unsigned integer command line arguments in argParse
dobrienphd Nov 9, 2025
7708b58
Add isEmpty flag to TiffImage for dynamic range validation
dobrienphd Nov 9, 2025
8e3f1a8
Implement LATCH interpretation options and integrate with particle re…
dobrienphd Nov 9, 2025
1b3ccd8
Refactor ILB handling in penEasyphspFile to utilize new ILBArray func…
dobrienphd Nov 9, 2025
e97a59d
Improved handling of read/write of ILB array values and EGS LATCH val…
dobrienphd Nov 9, 2025
f420273
Add support for EGS LATCH filtering in PHSPImage
dobrienphd Nov 9, 2025
e52ca51
Create C/C++ workflow
dobrienphd Nov 9, 2025
0eaed4e
Add .gitattributes to ignore GitHub workflows
dobrienphd Nov 9, 2025
034d23e
Remove branch restrictions from CI workflow
dobrienphd Nov 9, 2025
b47dc14
Update .gitattributes to export-ignore additional directories and files
dobrienphd Nov 9, 2025
6fe3e6d
Update .gitattributes to ensure dot files are export-ignored
dobrienphd Nov 9, 2025
aeaf920
Add windows testing to github workflow
dobrienphd Nov 9, 2025
2fde342
Refactor maxParticles parameter type from uint64_t to uint32_t in PHS…
dobrienphd Nov 9, 2025
aae9259
PHSPImage: Removed unnecessary UserOptions parameter in AppConfig::va…
dobrienphd Nov 9, 2025
6d0a5a1
Fix DEFAULT_IMAGE_SIDE type from float to int
dobrienphd Nov 9, 2025
378c60e
Update Windows build step to include installation of ParticleZoo library
dobrienphd Nov 9, 2025
5e308aa
Add verification steps for ParticleZoo installation in CI workflow
dobrienphd Nov 9, 2025
b139002
Fix for path setting in windows build workflow
dobrienphd Nov 9, 2025
0156d77
Add macOS build workflow for ParticleZoo installation and verification
dobrienphd Nov 9, 2025
944f444
Fix path setting for Windows build workflow to use environment variable
dobrienphd Nov 9, 2025
e3017cd
Attempt to add ROOT support in windows build script
dobrienphd Nov 9, 2025
17c8b4f
Revert "Attempt to add ROOT support in windows build script"
dobrienphd Nov 9, 2025
a86d701
Update to windows build script to add ROOT support
dobrienphd Nov 9, 2025
aba727e
Filter out -std: flags from ROOT compile flags to avoid conflicts wit…
dobrienphd Nov 9, 2025
5ce0af6
Add ROOT warning suppression flags and clean up ROOT function signature
dobrienphd Nov 9, 2025
cbeb2a2
Update Visual Studio command to specify architecture for x64
dobrienphd Nov 9, 2025
f042f96
Fix Windows ROOT library flag handling by stripping /link prefix in b…
dobrienphd Nov 9, 2025
4eb86f9
Enhance ROOT integration in build script by extracting include paths …
dobrienphd Nov 9, 2025
dcdca1a
Filter out /wd flags from ROOT compile flags to avoid conflicts with …
dobrienphd Nov 9, 2025
148f2e7
Fix ROOT compile flag handling by changing /wd to -wd
dobrienphd Nov 9, 2025
38fe0da
Refine type casting in Particle and IAEAHeader classes
dobrienphd Nov 9, 2025
1e10922
Add step to download and install ROOT framework for Windows CI
dobrienphd Nov 9, 2025
52dd461
Enhance ROOT framework installation step for Windows CI with progress…
dobrienphd Nov 9, 2025
14e41ad
Refactor ParticleZoo installation steps in CI workflows to include ve…
dobrienphd Nov 9, 2025
cc24791
Add caching for ROOT framework in Windows CI workflow
dobrienphd Nov 9, 2025
f8c3b14
Fix order of member initialization in Reader constructors
dobrienphd Nov 13, 2025
0296424
Add peek functionality for particles in PhaseSpaceFileReader
dobrienphd Nov 13, 2025
e7c0b26
Added initializer list constructor to UserOptions to match the API fr…
dobrienphd Nov 13, 2025
7b6b3fb
Adding python files to .gitignore until they are ready for merging
dobrienphd Nov 15, 2025
03da120
Merge branch 'v1.1.0' of github.com:dobrienphd/ParticleZoo into v1.1.0
dobrienphd Nov 15, 2025
928cc50
Adding tests to .gitignore
dobrienphd Nov 15, 2025
368a416
Call RegisterStandardFormats in FormatRegistry instance method
dobrienphd Nov 16, 2025
c5a3adf
Added getPDGCode convenience method to Particle class for PDG identif…
dobrienphd Nov 17, 2025
6c41b07
Added examples directory and included drop-in code for using Particle…
dobrienphd Nov 18, 2025
4649db8
Removed comment about deleted argument
dobrienphd Nov 18, 2025
c6923d4
Enhance particle filtering capabilities and improve argument parsing
dobrienphd Jan 29, 2026
f16c968
Add new command options for primary particle filtering in PHSPConvert
dobrienphd Jan 29, 2026
bafa74c
Removed unused variable in PHSPImage
dobrienphd Jan 29, 2026
6f7b9a3
Add radius filtering options to PHSPConvert for particle conversion
dobrienphd Jan 29, 2026
45707ed
Fix for invalid ILB1 value error
dobrienphd Jan 29, 2026
6909aa9
Added getNumberOfRepresentedHistories() function to PhaseSpaceFileReader
dobrienphd Jan 30, 2026
d87db39
Add multi-threaded phase space file reader implementation
dobrienphd Jan 30, 2026
1c92054
Fixed rare off by 1 bug in the particle count in MTPhaseSpaceReader
dobrienphd Jan 31, 2026
2c78f43
Added peekNextParticle() to MTPhaseSpaceReader
dobrienphd Jan 31, 2026
79cd46e
Remove totalHistoriesToRead parameter from MTPhaseSpaceReader constru…
dobrienphd Jan 31, 2026
5bea438
Added multi-threaded phase space readers for particle load-balanced u…
dobrienphd Jan 31, 2026
d945c20
Moved source files for parallel readers
dobrienphd Jan 31, 2026
f278fc2
Python bindings (#6)
dobrienphd Feb 3, 2026
1eab7f7
Fix .gitignore from merge conflict
dobrienphd Feb 3, 2026
7333c35
Restored IS_SECONDARY_PARTICLE flag but marked it as deprecated to pr…
dobrienphd Feb 5, 2026
3251bb8
Updated README.md
dobrienphd Feb 5, 2026
da47ce9
Update README.md to clarify optional dependencies and build process d…
dobrienphd Feb 5, 2026
834b084
Update README.md to fix mistakes in API examples
dobrienphd Feb 5, 2026
a45ffc1
Changed parallel processing example
dobrienphd Feb 5, 2026
c3a667d
Updated python bindings to include more of Particle's methods.
dobrienphd Feb 5, 2026
3ea20bf
Improved python documentation
dobrienphd Feb 5, 2026
fec2956
Fixed missing setGeneration function in Particle.h
dobrienphd Feb 5, 2026
32a0f8c
Removed redundant troubleshooting tip
dobrienphd Feb 5, 2026
7cfa69f
Changed parallel processing example
dobrienphd Feb 5, 2026
d45bb13
Removing direct referencing of the geant4 thread IDs from Geant4 exam…
dobrienphd Feb 6, 2026
d7c2dbb
Renamed the geant4 example and included MIT license explicitly inside…
dobrienphd Feb 6, 2026
288309d
Corrected doxygen comment
dobrienphd Feb 6, 2026
4344ba5
Add global rotation features to G4PHSPSourceAction
dobrienphd Feb 6, 2026
19bb7d0
Updated README to mention the examples folder
dobrienphd Feb 6, 2026
66d32d3
Updating documentation and version numbering prior to release
dobrienphd Feb 6, 2026
da0e548
Moved python examples into the dedicated examples folder
dobrienphd Feb 6, 2026
2e5f144
Minor corrections to readmes
dobrienphd Feb 6, 2026
36310c6
Removed patch number from reference manual as API patches don't affec…
dobrienphd Feb 6, 2026
a11472f
Added logo to readme
dobrienphd Feb 6, 2026
d3f7fec
Removed unnecessary line from example.
dobrienphd Feb 6, 2026
aac672d
Updated documentation
dobrienphd Feb 6, 2026
47bbfd0
Added test summary report
dobrienphd Feb 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github/workflows export-ignore
docs/assets export-ignore
docs/scripts export-ignore
ext export-ignore
Doxyfile export-ignore
.* export-ignore
198 changes: 198 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
name: C/C++ CI

on:
push:
pull_request:

jobs:
build-linux:
runs-on: ubuntu-latest

steps:
- name: Clone ParticleZoo repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install ROOT framework
run: sudo snap install root-framework

- name: Build and install ParticleZoo library without ROOT support
run: |
./configure --no-root
make
sudo make install

- name: Verify installation
run: |
PHSPImage --version
PHSPCombine --version
PHSPConvert --version
PHSPSplit --version
PHSPConvert -f

- name: Build and install ParticleZoo library with ROOT support
run: |
sudo make uninstall
make clean
./configure
make
sudo make install

- name: Verify installation
run: |
PHSPImage --version
PHSPCombine --version
PHSPConvert --version
PHSPSplit --version
PHSPConvert -f

- name: Install Python bindings
run: |
python -m venv .venv
source .venv/bin/activate
make install-python

- name: Run Python bindings smoke test
run: |
source .venv/bin/activate
cd examples/python
python write_phase_space.py test.egsphsp
python read_phase_space.py test.egsphsp

build-macos:
runs-on: macos-latest

steps:
- name: Clone ParticleZoo repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install ROOT framework
run: brew install root

- name: Build and install ParticleZoo library without ROOT support
run: |
./configure --no-root
make
sudo make install

- name: Verify installation
run: |
PHSPImage --version
PHSPCombine --version
PHSPConvert --version
PHSPSplit --version
PHSPConvert -f

- name: Build and install ParticleZoo library with ROOT support
run: |
sudo make uninstall
make clean
./configure
make
sudo make install

- name: Verify installation
run: |
PHSPImage --version
PHSPCombine --version
PHSPConvert --version
PHSPSplit --version
PHSPConvert -f

- name: Install Python bindings
run: |
python -m venv .venv
source .venv/bin/activate
make install-python

- name: Run Python bindings smoke test
run: |
source .venv/bin/activate
cd examples/python
python write_phase_space.py test.egsphsp
python read_phase_space.py test.egsphsp

build-windows:
runs-on: windows-latest

steps:
- name: Clone ParticleZoo repository
uses: actions/checkout@v4

- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Cache ROOT framework
id: cache-root
uses: actions/cache@v4
with:
path: C:\root
key: root-v6.36.04-win64-python311-vc17

- name: Download and install ROOT framework
if: steps.cache-root.outputs.cache-hit != 'true'
run: |
echo "Downloading and installing ROOT framework..."
curl -sL -o root.zip https://root.cern/download/root_v6.36.04.win64.python311.vc17.zip
echo "Extracting ROOT framework..."
Expand-Archive -Path root.zip -DestinationPath C:\
shell: pwsh

- name: Add ROOT to PATH
run: echo "C:\root\bin" >> $env:GITHUB_PATH
shell: pwsh

- name: Build and install ParticleZoo library without ROOT support
run: |
.\build.bat install --no-root
echo "$env:LOCALAPPDATA\particlezoo\bin" >> $env:GITHUB_PATH

- name: Verify installation
run: |
PHSPImage --version
PHSPCombine --version
PHSPConvert --version
PHSPSplit --version
PHSPConvert -f

- name: Build and install ParticleZoo library with ROOT support
run: |
.\build.bat install
echo "$env:LOCALAPPDATA\particlezoo\bin" >> $env:GITHUB_PATH

- name: Verify installation
run: |
PHSPImage --version
PHSPCombine --version
PHSPConvert --version
PHSPSplit --version
PHSPConvert -f

- name: Install Python bindings
run: |
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install python/
shell: pwsh

- name: Run Python bindings smoke test
run: |
.venv\Scripts\Activate.ps1
cd examples/python
python write_phase_space.py test.egsphsp
python read_phase_space.py test.egsphsp
shell: pwsh
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,24 @@ config.status
build
tests
.vscode
.venv
docs/latex
docs/html
docs/html
python/build/
python/dist/
python/**/*.egg-info/
python/**/__pycache__/
python/**/*.pyc
python/**/*.pyo
python/**/*.so
python/**/*.dylib
python/**/*.dll
python/.eggs/
python/*.egg
python/.pytest_cache/
python/.coverage
python/htmlcov/
python/.tox/
python/.venv/
python/venv/
python/ENV/
6 changes: 3 additions & 3 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "ParticleZoo"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v1.0.0
PROJECT_NUMBER = v1.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -2027,7 +2027,7 @@ LATEX_HEADER = docs/scripts/header.tex
# doing!
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_FOOTER =
LATEX_FOOTER = docs/scripts/footer.tex

# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# LaTeX style sheets that are included after the standard style sheets created
Expand All @@ -2046,7 +2046,7 @@ LATEX_EXTRA_STYLESHEET = docs/scripts/custom_doxygen.sty
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_EXTRA_FILES = docs/assets/particlezoo.png
LATEX_EXTRA_FILES = docs/assets/particlezoo.png docs/scripts/python_appendix.tex

# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
Expand Down
11 changes: 4 additions & 7 deletions PHSPCombine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ int main(int argc, char* argv[]) {
using namespace ParticleZoo;
int errorCode = 0;
uint64_t particlesSoFar = 0;
bool preserveConstants = false;

// Custom command line arguments
const CLICommand MAX_PARTICLES_COMMAND = CLICommand(NONE, "", "maxParticles", "Maximum number of particles to process (default: unlimited)", { CLI_INT });
const CLICommand MAX_PARTICLES_COMMAND = CLICommand(NONE, "", "maxParticles", "Maximum number of particles to process (default: unlimited)", { CLI_UINT });
const CLICommand INPUT_FORMAT_COMMAND = CLICommand(NONE, "", "inputFormat", "Force input file format (default: auto-detect from extension)", { CLI_STRING });
const CLICommand OUTPUT_FORMAT_COMMAND = CLICommand(NONE, "", "outputFormat", "Force output file format (default: auto-detect from extension)", { CLI_STRING });
const CLICommand OUTPUT_FILE_COMMAND = CLICommand(NONE, "", "outputFile", "Output file path", { CLI_STRING });
const CLICommand PRESERVE_CONSTANTS_COMMAND = CLICommand(NONE, "", "preserveConstants", "Preserve constant values from input files if present", { CLI_VALUELESS });
const CLICommand PRESERVE_CONSTANTS_COMMAND = CLICommand(NONE, "", "preserveConstants", "Preserve constant values from input files if present", { CLI_BOOL }, { true });
ArgParser::RegisterCommand(MAX_PARTICLES_COMMAND);
ArgParser::RegisterCommand(INPUT_FORMAT_COMMAND);
ArgParser::RegisterCommand(OUTPUT_FORMAT_COMMAND);
Expand All @@ -104,20 +103,18 @@ int main(int argc, char* argv[]) {
auto userOptions = ArgParser::ParseArgs(argc, argv, usageMessage, 1);

// Validate parameters
std::uint64_t maxParticles = userOptions.contains(MAX_PARTICLES_COMMAND) ? std::get<int>(userOptions.at(MAX_PARTICLES_COMMAND)[0]) : std::numeric_limits<uint64_t>::max();
std::uint64_t maxParticles = userOptions.contains(MAX_PARTICLES_COMMAND) ? (std::uint64_t)userOptions.extractUIntOption(MAX_PARTICLES_COMMAND) : std::numeric_limits<uint64_t>::max();
std::string inputFormat = userOptions.contains(INPUT_FORMAT_COMMAND) ? (userOptions.at(INPUT_FORMAT_COMMAND).empty() ? "" : std::get<std::string>(userOptions.at(INPUT_FORMAT_COMMAND)[0])) : "";
std::string outputFormat = userOptions.contains(OUTPUT_FORMAT_COMMAND) ? (userOptions.at(OUTPUT_FORMAT_COMMAND).empty() ? "" : std::get<std::string>(userOptions.at(OUTPUT_FORMAT_COMMAND)[0])) : "";
std::string outputFile = userOptions.contains(OUTPUT_FILE_COMMAND) ? (userOptions.at(OUTPUT_FILE_COMMAND).empty() ? "" : std::get<std::string>(userOptions.at(OUTPUT_FILE_COMMAND)[0])) : "";
std::vector<CLIValue> positionals = userOptions.contains(CLI_POSITIONALS) ? userOptions.at(CLI_POSITIONALS) : std::vector<CLIValue>{};
bool preserveConstants = userOptions.contains(PRESERVE_CONSTANTS_COMMAND) ? std::get<bool>(userOptions.at(PRESERVE_CONSTANTS_COMMAND)[0]) : false;
std::vector<std::string> inputFiles(positionals.size());
for (size_t i = 0; i < positionals.size(); i++) {
inputFiles[i] = std::get<std::string>(positionals[i]);
}
if (inputFiles.empty()) throw std::runtime_error("No input files provided.");
if (outputFile == "") throw std::runtime_error("No output file specified.");
if (userOptions.contains(PRESERVE_CONSTANTS_COMMAND)) {
preserveConstants = true;
}

FixedValues fixedValues; // start with default fixed values
if (preserveConstants) {
Expand Down
Loading
Loading