diff --git a/tantri/cli/__init__.py b/tantri/cli/__init__.py index 210f7c6..d35c743 100755 --- a/tantri/cli/__init__.py +++ b/tantri/cli/__init__.py @@ -124,7 +124,7 @@ def write_time_series(dipoles_file, dots_file, measurement_type, delta_t, num_it labels = [dot.label for dot in dots] if header_row: value_labels = ", ".join([f"{value_name}_{label}" for label in labels]) - click.echo(f"t (s), {value_labels}") + output_file.write(f"t (s), {value_labels}\n") _logger.debug(f"Going to simulate {num_iterations} iterations with a delta t of {delta_t}") @@ -138,7 +138,7 @@ def write_time_series(dipoles_file, dots_file, measurement_type, delta_t, num_it for i in tqdm.trange(num_iterations): transition = time_series.transition() transition_values = ", ".join(str(transition[label]) for label in labels) - output_file.write(f"{i * delta_t}, {transition_values}") + output_file.write(f"{i * delta_t}, {transition_values}\n") @cli.command()