From 92f1b03a2f27468b1133336e66cb696161340c8b Mon Sep 17 00:00:00 2001
From: Alejandra Gonzalez <alejandra.gonzalez@uni-jena.de>
Date: Thu, 7 Oct 2021 11:24:57 +0200
Subject: [PATCH] Fixed radius reading from file

---
 watpy/wave/wave.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/watpy/wave/wave.py b/watpy/wave/wave.py
index d52ee70..b009c87 100644
--- a/watpy/wave/wave.py
+++ b/watpy/wave/wave.py
@@ -115,13 +115,7 @@ def wfile_get_detrad(fname):
     fname  : Name of the file to parse for information
     """
     s = extract_comments(fname, '#')
-    #return float(re.findall("\d+\.\d+",s[0])[0])  
-    try:
-        #FIXME: Doesn't identify the exponential, returns only the 1st digit
-        rad_str = re.findall("\d+\.\d+",s[0])[1] 
-    except:
-        rad_str = re.findall("\w+",s[0])[1]
-    return rinf_str_to_float(rad_str)
+    return rinf_str_to_float(s[0].split("=")[1])
               
 
 def wfile_get_mass(fname):
-- 
GitLab