(bugfix) Do not set h-depth before applying min and max h
(cherry picked from commit 3d08262d)
Co-authored-by: Yolan Uyttenhove yolan.uyttenhove@ugent.be
Came across this is issue when testing some ICs consisting of a galaxy against a low resolution background.
We should only update the depth_h
of a particle after applying the upper and lower bounds to it during the drift. Else, the depth_h
can become invalid in some rare cases where the correction by the minimal and maximal values is quite large.
Edited by Yolan Uyttenhove