improve naming of integrated count calculation function

This commit is contained in:
Pim Nelissen
2026-03-11 09:51:11 +01:00
parent 7dec54fa1c
commit 09e74051f0
2 changed files with 6 additions and 5 deletions

View File

@ -100,13 +100,13 @@ def calculate_count_rate_per_second(
return total_phi
def calculate_fluence_along_path(
def calculate_counts_along_path(
landscape: "Landscape",
detector: "IsotropicDetector | AngularDetector",
acquisition_time: int,
points_per_segment: int = 10,
) -> Tuple[np.ndarray, np.ndarray]:
"""Compute the fluence along a full path in the landscape.
"""Compute the counts recorded in each acquisition period in the landscape.
Args:
landscape (Landscape): _description_
@ -114,7 +114,8 @@ def calculate_fluence_along_path(
points_per_segment (int, optional): _description_. Defaults to 100.
Returns:
Tuple[np.ndarray, np.ndarray]: _description_
Tuple[np.ndarray, np.ndarray]: Array of acquisition points and
integrated count rates.
"""
path = landscape.path

View File

@ -7,7 +7,7 @@ from pg_rad.simulator.outputs import (
SourceOutput
)
from pg_rad.detector.detectors import IsotropicDetector, AngularDetector
from pg_rad.physics.fluence import calculate_fluence_along_path
from pg_rad.physics.fluence import calculate_counts_along_path
from pg_rad.utils.projection import minimal_distance_to_path
from pg_rad.inputparser.specs import RuntimeSpec, SimulationOptionsSpec
@ -40,7 +40,7 @@ class SimulationEngine:
)
def _calculate_count_rate_along_path(self) -> CountRateOutput:
arc_length, phi = calculate_fluence_along_path(
arc_length, phi = calculate_counts_along_path(
self.landscape,
self.detector,
acquisition_time=self.runtime_spec.acquisition_time