MCFlowMace / CRESana

Analytic CRES signal modeling
2 stars 1 forks source link

Add z_max function #4

Closed renereimann closed 8 months ago

renereimann commented 9 months ago

For the trajectory calculation the z_max is calculated in this line: https://github.com/MCFlowMace/CRESana/blob/a8b3dac53f8ba6278bd0968bf249fb5f5522905d/cresana/trap.py#L615

While the root_guess is a public function to guess the maximum, it would be a nice enhancement to make the z_max also a public function, so that the user can calculate the length or size of the trap by the same algorithm used here. At this place the public function can be used to avoid code duplication.