From 3d4e6a82cbdd4830e65e51e13f88ad711f5e06ef Mon Sep 17 00:00:00 2001
From: Gamelin Alexis <gamelin@synchrotron-soleil.fr>
Date: Wed, 4 Mar 2020 13:59:30 +0100
Subject: [PATCH] MBI_treshold correction

ring.L instead of ring.L0
---
 CollectiveEffect/instabilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CollectiveEffect/instabilities.py b/CollectiveEffect/instabilities.py
index 34bd523..ec2ffb4 100644
--- a/CollectiveEffect/instabilities.py
+++ b/CollectiveEffect/instabilities.py
@@ -37,7 +37,7 @@ def MBI_threshold(ring, sigma, R, b):
     Ia = 4*pi*epsilon_0*m_e*c**3/e # Alfven current
     chi = sigma*(R/b**3)**(1/2) # Shielding paramter
     xi = 0.5 + 0.34*chi
-    N = (ring.L0 * Ia * ring.ac * ring.gamma * ring.sigma_delta**2 * xi *
+    N = (ring.L * Ia * ring.ac * ring.gamma * ring.sigma_delta**2 * xi *
         sigma**(1/3) / ( c * e * R**(1/3) ))
     I = N*e/ring.T0
     
-- 
GitLab