From 7238d3978696cee2314160f1372f9874ee85f56d Mon Sep 17 00:00:00 2001 From: ym1906 Date: Wed, 28 Oct 2026 14:30:54 +0000 Subject: [PATCH] prevent log(0) in sauter bootstrap calculation --- process/models/physics/bootstrap_current.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/process/models/physics/bootstrap_current.py b/process/models/physics/bootstrap_current.py index 77d8ee784a..9fbdfcb878 100644 --- a/process/models/physics/bootstrap_current.py +++ b/process/models/physics/bootstrap_current.py @@ -1499,6 +1499,10 @@ def bootstrap_fraction_sauter(self, plasma_profile: PlasmaProfile) -> float: # Calculate electron and ion density profiles ne = plasma_profile.neprofile.profile_y * 1e-19 + + # Prevent log(0) in Sauter bootstrap calculation + ne = np.maximum(ne, 1.0e-6) + ni = ( self.data.physics.nd_plasma_ions_total_vol_avg / self.data.physics.nd_plasma_electrons_vol_avg