Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion examples/Reconstruction/Reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from itk import RTK as rtk
from opengate.contrib.protonct.protonct import protonct

if len(sys.argv) < 1:
if len(sys.argv) < 2:
print("Usage: python Reconstruction.py <outputfolder>")
sys.exit(1)

Expand Down
2 changes: 1 addition & 1 deletion include/pctBetheBlochFunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BetheBlochProtonStoppingPower
if (particle != "proton")
{
// only implemented for protons
throw std::invalid_argument("Invalid particle type in Bethe Block Functor.");
throw std::invalid_argument("Invalid particle type \"" + particle + "\" in Bethe-Bloch functor.");
}
/** Physical constants */
static const double K = 4. * CLHEP::pi * CLHEP::classic_electr_radius * CLHEP::classic_electr_radius *
Expand Down
4 changes: 4 additions & 0 deletions test/pct_python_example_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ def run_example(tmp_path, rel_script, *args):
os.chdir(tmp_path)
sys.argv = [str(script), *map(str, args)]
runpy.run_path(str(script), run_name="__main__")


def test_Reconstruction(tmp_path):
run_example(tmp_path, "Reconstruction/Reconstruction.py", "Reconstruction")
Loading