Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force float64 #31

Merged
merged 32 commits into from
Nov 4, 2024
Merged

Force float64 #31

merged 32 commits into from
Nov 4, 2024

Conversation

mhuen
Copy link
Collaborator

@mhuen mhuen commented Oct 7, 2024

Use float64 in crucial code parts. Changes include:

  • Loss module can now fully use its own float precision
  • basis functions now have an optional dtype parameter that will cast all inputs to this dtype
  • Seperately set float precision for pdf and cdf evaluation in cascade and inf_track model then revert back to model float precision
  • change latent parameter scaling/boundaries back to elu function and reduce lower bound for sigma and r by one order of magnitude

Other changes in this PR:

  • turn off normalization by total charge in configs
  • Use reco pulses and update seed points for tracks
  • Add buffer for time window calculation (Todo: add option to pass in a proper window instead of inferring it from pulse times)
  • Minor speedup in minimization: jac=False now does not unnecessarily compute gradient
  • Bugfix: dt_geometry was previously incorrectly calculated for tracks

@mhuen mhuen closed this Nov 4, 2024
@mhuen mhuen reopened this Nov 4, 2024
@mhuen mhuen marked this pull request as ready for review November 4, 2024 21:57
@mhuen mhuen merged commit 3dcc7b9 into MPELikelihood Nov 4, 2024
0 of 8 checks passed
@mhuen mhuen deleted the ForceFloat64 branch November 4, 2024 21:58
mhuen added a commit that referenced this pull request Nov 4, 2024
* MPE likelihood; option to weight loss terms; cdf values in result_tensors

* Option to limit number of CPU threads

* Streamline epsilon definition; dependent on float_precision

* Exclude stochastic segment from usage for now

* Remove input signature

* Force float64 (#31)

* Independent precision for loss module

* Set loss precision to float64

* Add dtype argument for casting to basis functions

* Add dtype argument to numpy pdf and cdf functions

* safe_log: clip instead of +eps in log calls

* Cascades: safe log and float64 pdf/cdf evaluation

* Lower bound for sigma and r

* Option to set float precision for pdf cdf evaluation independently

* Turn off normalization by total charge

* Add closest approach point info

* Increase default model size: use reco pulses

* Add one earlier seed point for tracks

* Prevent division by zero

* Add buffer for time window calculation

* Reco speedup: fix data_batch and seed_array for minimizer function

* Speedup: use loss only for jac=False

* Bugfix: fixed dt_geometry due to wrong entry_point

---------

Co-authored-by: mhuen <mhuen@users.noreply.github.com>
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.

1 participant