diff --git a/src/jimgw/single_event/runManager.py b/src/jimgw/single_event/runManager.py index ea232441..e4d95e08 100644 --- a/src/jimgw/single_event/runManager.py +++ b/src/jimgw/single_event/runManager.py @@ -464,6 +464,7 @@ def plot_diagnostic(self, path: str = "diagnostic.jpeg", **kwargs): def save_summary(self, path: str = "", **kwargs): if path == "": path = self.run.path + "run_manager_summary.txt" + orig_stdout = sys.stdout sys.stdout = open(path, "wt") self.jim.print_summary() if self.run.injection: @@ -472,3 +473,4 @@ def save_summary(self, path: str = "", **kwargs): networkSNR = jnp.sum(jnp.array(self.SNRs) ** 2) ** (0.5) print("network SNR is", networkSNR) sys.stdout.close() + sys.stdout=orig_stdout