Skip to content

Commit

Permalink
Removed Formatting from exisiting log messages (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvSondhi authored Jul 15, 2021
1 parent c6d8b91 commit ab967fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tardis/io/atom_data/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def resolve_atom_data_fname(fname):
fpath = os.path.join(os.path.join(get_data_dir(), fname))
if os.path.exists(fpath):
logger.info(
f"\n\tAtom Data {fname} not found in local path.\n\tExists in TARDIS Data repo {fpath}"
f"Atom Data {fname} not found in local path.\n\tExists in TARDIS Data repo {fpath}"
)
return fpath

Expand Down
2 changes: 1 addition & 1 deletion tardis/plasma/standard_plasmas.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def assemble_plasma(config, model, atom_data=None):
else:
raise ValueError("No atom_data option found in the configuration.")

logger.info(f"\n\tReading Atomic Data from {atom_data_fname}")
logger.info(f"Reading Atomic Data from {atom_data_fname}")

try:
atom_data = AtomData.from_hdf(atom_data_fname)
Expand Down
14 changes: 7 additions & 7 deletions tardis/simulation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def advance_state(self):

def iterate(self, no_of_packets, no_of_virtual_packets=0, last_run=False):
logger.info(
f"\n\tStarting iteration {(self.iterations_executed + 1):d} of {self.iterations:d}"
f"Starting iteration {(self.iterations_executed + 1):d} of {self.iterations:d}"
)
self.runner.run(
self.model,
Expand Down Expand Up @@ -381,8 +381,8 @@ def run(self):
self.reshape_plasma_state_store(self.iterations_executed)

logger.info(
f"\n\tSimulation finished in {self.iterations_executed:d} iterations "
f"\n\tSimulation took {(time.time() - start_time):.2f} s\n"
f"Simulation finished in {self.iterations_executed:d} iterations "
f"Simulation took {(time.time() - start_time):.2f} s\n"
)
self._call_back()

Expand Down Expand Up @@ -427,7 +427,7 @@ def log_plasma_state(
plasma_state_log.columns.name = "Shell No."

if is_notebook():
logger.info("\n\tPlasma stratification:")
logger.info("Plasma stratification:")

# Displaying the DataFrame only when the logging level is NOTSET, DEBUG or INFO
if logger.level <= logging.INFO:
Expand All @@ -451,16 +451,16 @@ def log_plasma_state(
)
for value in plasma_output.split("\n"):
output_df = output_df + "\t{}\n".format(value)
logger.info("\n\tPlasma stratification:")
logger.info("Plasma stratification:")
logger.info(f"\n{output_df}")

logger.info(
f"\n\tCurrent t_inner = {t_inner:.3f}\n\tExpected t_inner for next iteration = {next_t_inner:.3f}\n"
f"Current t_inner = {t_inner:.3f}\n\tExpected t_inner for next iteration = {next_t_inner:.3f}\n"
)

def log_run_results(self, emitted_luminosity, absorbed_luminosity):
logger.info(
f"\n\tLuminosity emitted = {emitted_luminosity:.3e}\n"
f"Luminosity emitted = {emitted_luminosity:.3e}\n"
f"\tLuminosity absorbed = {absorbed_luminosity:.3e}\n"
f"\tLuminosity requested = {self.luminosity_requested:.3e}\n"
)
Expand Down

0 comments on commit ab967fd

Please sign in to comment.