Skip to content

Commit

Permalink
reformat files with black
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyizheng1112 committed Mar 20, 2021
1 parent 40d0b44 commit 290af0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 9 additions & 2 deletions tardis/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@


def run_tardis(
config, atom_data=None, packet_source=None, simulation_callbacks=[], virtual_packet_logging=False
config,
atom_data=None,
packet_source=None,
simulation_callbacks=[],
virtual_packet_logging=False,
):
"""
This function is one of the core functions to run TARDIS from a given
Expand Down Expand Up @@ -43,7 +47,10 @@ def run_tardis(
tardis_config = Configuration.from_config_dict(config)

simulation = Simulation.from_config(
tardis_config, packet_source=packet_source, atom_data=atom_data, virtual_packet_logging=virtual_packet_logging
tardis_config,
packet_source=packet_source,
atom_data=atom_data,
virtual_packet_logging=virtual_packet_logging,
)
for cb in simulation_callbacks:
simulation.add_callback(*cb)
Expand Down
8 changes: 6 additions & 2 deletions tardis/simulation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ def remove_callback(self, id):
return False

@classmethod
def from_config(cls, config, packet_source=None, virtual_packet_logging=False, **kwargs):
def from_config(
cls, config, packet_source=None, virtual_packet_logging=False, **kwargs
):
"""
Create a new Simulation instance from a Configuration object.
Expand Down Expand Up @@ -545,7 +547,9 @@ def from_config(cls, config, packet_source=None, virtual_packet_logging=False, *
runner = kwargs["runner"]
else:
runner = MontecarloRunner.from_config(
config, packet_source=packet_source, virtual_packet_logging=virtual_packet_logging
config,
packet_source=packet_source,
virtual_packet_logging=virtual_packet_logging,
)

luminosity_nu_start = config.supernova.luminosity_wavelength_end.to(
Expand Down

0 comments on commit 290af0a

Please sign in to comment.