Skip to content

Commit

Permalink
Access v_inner, v_outer and velocity directly out of simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
KasukabeDefenceForce committed Jan 24, 2025
1 parent fd34e7b commit b993fdd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion tardis/visualization/tools/liv_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _prepare_plot_data(
)

self._generate_plot_data(packets_mode)
velocity = self.data[packets_mode].velocity
velocity = self.data[packets_mode].simulation.simulation_state.velocity
bin_edges = (velocity).to("km/s")

if num_bins:
Expand Down
11 changes: 0 additions & 11 deletions tardis/visualization/tools/visualization_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ def from_simulation(cls, sim, packets_mode):
)
time_explosion = sim.plasma.time_explosion
transport_state = sim.transport.transport_state
# r_inner = sim.simulation_state.geometry.r_inner_active
# t_inner = sim.simulation_state.packet_source.temperature
v_inner = sim.simulation_state.v_inner
v_outer = sim.simulation_state.v_outer
velocity = sim.simulation_state.velocity
time_of_simulation = (
transport_state.packet_collection.time_of_simulation * u.s
)
Expand Down Expand Up @@ -205,9 +200,6 @@ def from_simulation(cls, sim, packets_mode):
time_of_simulation=time_of_simulation,
time_explosion=time_explosion,
simulation=sim,
v_inner=v_inner,
v_outer=v_outer,
velocity=velocity,
)
else: # real packets
# Packets-specific properties need to be only for those packets
Expand Down Expand Up @@ -237,9 +229,6 @@ def from_simulation(cls, sim, packets_mode):
time_of_simulation=time_of_simulation,
time_explosion=time_explosion,
simulation=sim,
v_inner=v_inner,
v_outer=v_outer,
velocity=velocity,
)

@classmethod
Expand Down

0 comments on commit b993fdd

Please sign in to comment.