From 00db8254ba26a2ce8cac4465d42778b354517ad6 Mon Sep 17 00:00:00 2001
From: Watanyu Foosang <watanyu.f@gmail.com>
Date: Fri, 18 Mar 2022 12:53:21 +0100
Subject: [PATCH] Modify the class to take both str and list as types

---
 tracking/wakepotential.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tracking/wakepotential.py b/tracking/wakepotential.py
index 223dd43..9741ef5 100644
--- a/tracking/wakepotential.py
+++ b/tracking/wakepotential.py
@@ -619,7 +619,10 @@ class LongRangeResistiveWall(Element):
         self.rho = rho
         self.nt = int(nt)
         self.nb = len(beam)
-        self.types = types
+        if isinstance(types, str):
+            self.types = [types]
+        elif isinstance(types, list):
+            self.types = types
         
         # effective radius for RW
         self.radius = radius
-- 
GitLab