Skip to content

Commit

Permalink
Fix very simple fixture to resolve test issue
Browse files Browse the repository at this point in the history
Also black formatting
  • Loading branch information
andrewfullard committed Jul 17, 2024
1 parent e8aebcc commit c141355
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tardis/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ def config_montecarlo_1e5_verysimple(example_configuration_dir):
def simulation_verysimple(config_verysimple, atomic_dataset):
atomic_data = deepcopy(atomic_dataset)
sim = Simulation.from_config(config_verysimple, atom_data=atomic_data)
sim.iterate(4000)
sim.last_no_of_packets = 4000
sim.run_final()
return sim


Expand Down
6 changes: 3 additions & 3 deletions tardis/simulation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ def iterate(self, no_of_packets, no_of_virtual_packets=0):

# Set up spectrum solver
self.spectrum_solver.transport_state = transport_state
self.spectrum_solver._montecarlo_virtual_luminosity.value[:] = (
v_packets_energy_hist
)
self.spectrum_solver._montecarlo_virtual_luminosity.value[
:
] = v_packets_energy_hist

output_energy = (
self.transport.transport_state.packet_collection.output_energies
Expand Down
6 changes: 3 additions & 3 deletions tardis/visualization/widgets/line_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ class variable :code:`GROUP_MODES` (default value is

if group_mode == "both":
# Group by both exc. line ids and de-exc. line ids
current_last_lines_in["line_id_out"] = (
current_last_lines_out.line_id
)
current_last_lines_in[
"line_id_out"
] = current_last_lines_out.line_id
grouped_line_interactions = current_last_lines_in.groupby(
["line_id", "line_id_out"]
)
Expand Down

0 comments on commit c141355

Please sign in to comment.