From 5d9dc5f45a8d2c2ad767b37364ba15f75907a3c9 Mon Sep 17 00:00:00 2001 From: Andreas Wingen Date: Fri, 5 Apr 2024 13:44:33 -0700 Subject: [PATCH] New way of handling the path to the C1.h5 file in the m3dc1sup.in file. Also bug fix in reading previous runs. --- source/plasma3DClass.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/plasma3DClass.py b/source/plasma3DClass.py index a25b8a1..6139670 100644 --- a/source/plasma3DClass.py +++ b/source/plasma3DClass.py @@ -250,7 +250,7 @@ def readM3DC1supFile(self): if line[0] == '#': continue words = line.split() c1file = words[0] - if ('./' in c1file): c1file = c1file.replace('./', self.inputDir + '/') + if ('$CWD' in c1file): c1file = c1file.replace('$CWD', self.inputDir) C1Files.append(c1file) scales.append(tools.makeFloat(words[1])) if len(words) > 2: phases.append(tools.makeFloat(words[2])) @@ -397,9 +397,9 @@ def copyAndRead(self, path, tag = None): #self.writeCoilsupFile() # normalization profile data - for tag in ['LI','LO','UI','UO']: - src = path + '/../' + 'lam_' + tag + '.dat' - dst = self.cwd + '/../' + 'lam_' + tag + '.dat' + for normtag in ['LI','LO','UI','UO']: + src = path + '/../' + 'lam_' + normtag + '.dat' + dst = self.cwd + '/../' + 'lam_' + normtag + '.dat' if (not os.path.isfile(dst)) & os.path.isfile(src): shutil.copy(src, dst)