From a0032559bf4edcd11c2041113690098e4fce3544 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Thu, 1 Dec 2022 13:42:05 -0500 Subject: [PATCH] Corrected the computation of the width of the time report output variable so that it has only the number of significant digits needed --- python/swiftest/swiftest/simulation_class.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/swiftest/swiftest/simulation_class.py b/python/swiftest/swiftest/simulation_class.py index 012aeddbe..ec4c9b6cd 100644 --- a/python/swiftest/swiftest/simulation_class.py +++ b/python/swiftest/swiftest/simulation_class.py @@ -382,7 +382,7 @@ def _type_scrub(output_data): process_output = False noutput = int((self.param['TSTOP'] - self.param['T0']) / self.param['DT']) iloop = int((self.param['TSTART'] - self.param['T0']) / self.param['DT']) - twidth = int(np.ceil(np.log10(self.param['TSTOP']/self.param['DT']))) + twidth = int(np.ceil(np.log10(self.param['TSTOP']/(self.param['DT'] * self.param['ISTEP_OUT'])))) pre_message = f"Time: {self.param['TSTART']:.{twidth}e} / {self.param['TSTOP']:.{twidth}e} {self.TU_name} " post_message = f"npl: {self.data['npl'].values[0]} ntp: {self.data['ntp'].values[0]}" if "nplm" in self.data: