diff options
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index 374cbc962..1b55055b6 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -9,6 +9,7 @@ """Classes following the PICMI standard """ import re +import os import picmistandard import numpy as np import pywarpx @@ -1052,7 +1053,7 @@ class FieldDiagnostic(picmistandard.PICMI_FieldDiagnostic): if self.write_dir is not None or self.file_prefix is not None: write_dir = (self.write_dir or 'diags') file_prefix = (self.file_prefix or self.name) - self.diagnostic.file_prefix = write_dir + '/' + file_prefix + self.diagnostic.file_prefix = os.path.join(write_dir, file_prefix) ElectrostaticFieldDiagnostic = FieldDiagnostic @@ -1087,7 +1088,7 @@ class Checkpoint(picmistandard.base._ClassWithInit): if self.write_dir is not None or self.file_prefix is not None: write_dir = (self.write_dir or 'diags') file_prefix = (self.file_prefix or self.name) - self.diagnostic.file_prefix = write_dir + '/' + file_prefix + self.diagnostic.file_prefix = os.path.join(write_dir, file_prefix) class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic): def init(self, kw): @@ -1131,7 +1132,7 @@ class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic): if self.write_dir is not None or self.file_prefix is not None: write_dir = (self.write_dir or 'diags') file_prefix = (self.file_prefix or self.name) - self.diagnostic.file_prefix = write_dir + '/' + file_prefix + self.diagnostic.file_prefix = os.path.join(write_dir, file_prefix) # --- Use a set to ensure that fields don't get repeated. variables = set() @@ -1283,7 +1284,7 @@ class LabFrameFieldDiagnostic(picmistandard.PICMI_LabFrameFieldDiagnostic): if self.write_dir is not None or self.file_prefix is not None: write_dir = (self.write_dir or 'diags') file_prefix = (self.file_prefix or self.name) - self.diagnostic.file_prefix = write_dir + '/' + file_prefix + self.diagnostic.file_prefix = os.path.join(write_dir, file_prefix) class LabFrameParticleDiagnostic(picmistandard.PICMI_LabFrameParticleDiagnostic): |