Skip to content

Commit

Permalink
Result now mostly consistent with master
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfullard committed Mar 25, 2024
1 parent c15cca1 commit 9ad6e5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tardis/energy_input/gamma_ray_packet_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def create_packets(self, decays_per_isotope, *args, **kwargs):
Array of positron output dataframe rows
"""
number_of_packets = decays_per_isotope.sum().sum()
decays_per_shell = decays_per_isotope.T.sum().values
decays_per_shell = decays_per_isotope.sum().values

locations = np.zeros((3, number_of_packets))
directions = np.zeros((3, number_of_packets))
Expand Down
8 changes: 3 additions & 5 deletions tardis/energy_input/main_gamma_ray_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def run_gamma_ray_loop(
logger.info("Initializing packets")

packet_source = RadioactivePacketSource(
energy_per_packet,
individual_packet_energy,
gamma_ray_line_dict,
positronium_fraction,
inner_velocities,
Expand All @@ -174,8 +174,8 @@ def run_gamma_ray_loop(

logger.info("Creating packet list")
packets = []
total_cmf_energy = 0.0
total_rf_energy = 0.0
total_cmf_energy = packet_collection.energy_cmf.sum()
total_rf_energy = packet_collection.energy_rf.sum()
for i in range(number_of_packets):
packet = GXPacket(
packet_collection.location[:, i],
Expand All @@ -201,8 +201,6 @@ def run_gamma_ray_loop(
0,
]
)
total_cmf_energy += packet.energy_cmf
total_rf_energy += packet.energy_rf

logger.info(f"Total cmf energy is {total_cmf_energy}")
logger.info(f"Total rf energy is {total_rf_energy}")
Expand Down

0 comments on commit 9ad6e5b

Please sign in to comment.