Commit 900b4a47 authored by Marcus Wirtz's avatar Marcus Wirtz
Browse files

[simulations] Clarify dimensions of 'fractions'

parent a8ca239d
Pipeline #327007 canceled with stages
......@@ -618,9 +618,9 @@ class SourceBound(BaseSimulation):
f = self.charge_weights[key]
if f == 0:
continue
fractions = data['fractions'].item()[key]
fractions = data['fractions'].item()[key] # dimensions: (energy_in, distances, charges_out, energy_out)
# reweight to spectral index (simulated gamma=-1) and apply energy / rigidity cut
fractions = self._reweight_spectrum(fractions, charge[key])
fractions = self._reweight_spectrum(fractions, charge[key]) # dim: (distances, charges_out, energy_out)
self.source_matrix += f * np.sum(fractions, axis=-1)[dis_bin_idx]
self.arrival_matrix += f * fractions
# Account for optional luminosity weights of sources
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment