Skip to content

Repeatedly setting electron fractions in prob3 yields inconsistent results #868

@thehrh

Description

@thehrh

After initialising a DistributionMaker including the osc.prob3 service with default initialisation arguments (in particular, tomography_type=None) , subsequent changes of the electron fractions (YeI, YeO, YeM) do not lead to reproducible total event counts.

An example code snippet that exposes the issue is

modell = DistributionMaker("IceCube_3y_neutrinos.cfg")
print(modell.params.YeM.value)
verteilung = modell.get_outputs(return_sum=True)[0]
count = verteilung.num_entries
print(count)
modell.params.YeM.value = 0.5 * ureg.dimensionless
print(modell.params.YeM.value)
count = modell.get_outputs(return_sum=True)[0].num_entries
print(count)
modell.params.reset_all()
print(modell.params.YeM.value) # reset to original value
count = modell.get_outputs(return_sum=True)[0].num_entries
print(count) # but count differs
count = modell.get_outputs(return_sum=True)[0].num_entries
print(count) # count remains the same

While the above behaviour can be fixed for example by creating a new Layers instance after

self.YeI = YeI; self.YeO = YeO; self.YeM = YeM
, self.layers = Layers(self.earth_model, self.detector_depth, self.prop_height) (also requires additionally setting the three attributes in __init__, so that they are available in compute_function), we should probably look into why the modification of an existing Layer's electron fraction seems to go awry (values in self.layers.density).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions