Skip to content

Conversation

@lorenzomag
Copy link
Collaborator

This PR proposes to utilise the wimprates package to compute the differential rates of WIMP-nucleus interaction instead of fetching them from pickle files.

If modulation==True, the differential rate (with respect to energy and time, per unit mass) will take into consideration annual modulation patterns, calculated within wimprates itself.

Initial and final timestamps are provided by the user using keyword arguments to the class initialiser method.
The livetime is computed from their difference.

If modulation==False, a conservative timestamp is chosen by wimprates to obtain the average annual rate. The differential rate will then be calculated once, and the result repeated into an array.
This option is more time efficient.
A multiprocessing implementation of the former case should be implemented.

Currently, there is a discrepancy in the output rate by the function wrt the pickled file's energy spectrum by a factor of 10 approximately!
This needs to be investigated

@lorenzomag
Copy link
Collaborator Author

I fixed mu_before_efficiencies so that it does not re-scale the already-scaled histogram provided by get_energy_hist in lxe_sources.nestWIMPSource

@lorenzomag lorenzomag reopened this Aug 12, 2024
@lorenzomag lorenzomag mentioned this pull request Aug 12, 2024
The energy histogram is not normalised in the time dimension.

Robert's expalation:  I think all you need to do is remove
scale = time_bin_width / nu.year  # Convert from [per year] to [per time_bin_width]
Whilst in principle keeping this and removing  / self.n_time_bins would solve things at the level of source.mu_before_efficiencies(), it will mess up the tensor-based calculation of the differential rate, as the thing that is queried should be the spectrum corresponding to a given event time (such that the sum of the spectrum gives the expected counts within that energy range, after scaling by the exposure)
lorenzomag and others added 6 commits November 8, 2024 21:19
Scaling was only applied when modulation off
The energy histogram is not normalised in the time dimension.

Robert's expalation:  I think all you need to do is remove
scale = time_bin_width / nu.year  # Convert from [per year] to [per time_bin_width]
Whilst in principle keeping this and removing  / self.n_time_bins would solve things at the level of source.mu_before_efficiencies(), it will mess up the tensor-based calculation of the differential rate, as the thing that is queried should be the spectrum corresponding to a given event time (such that the sum of the spectrum gives the expected counts within that energy range, after scaling by the exposure)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants