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

Add uncertainty on electron lifetime #83

Merged
merged 6 commits into from
Mar 9, 2023
Merged

Add uncertainty on electron lifetime #83

merged 6 commits into from
Mar 9, 2023

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Feb 25, 2023

  1. Very easy implementation:
lifetime *= (1 + parameters['elife_sigma'])
  1. change terminology from config to instruct
  2. yields nan in BandTwoHalfNorm extrapolation when out of range

@dachengx dachengx marked this pull request as ready for review February 25, 2023 01:11
@coveralls
Copy link

coveralls commented Feb 25, 2023

Pull Request Test Coverage Report for Build 4337048346

  • 20 of 29 (68.97%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 81.172%

Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/likelihood.py 2 4 50.0%
appletree/randgen.py 0 3 0.0%
appletree/context.py 16 20 80.0%
Files with Coverage Reduction New Missed Lines %
appletree/context.py 1 79.53%
Totals Coverage Status
Change from base Build 4267467388: -0.1%
Covered Lines: 1759
Relevant Lines: 2167

💛 - Coveralls

@@ -40,7 +40,11 @@ def __init__(self, config):

self.likelihoods = dict()

self.par_config = self.get_parameter_config(config['par_config'])
if not par_config is None:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
WPS508 Found incorrect not with compare usage

@@ -40,7 +40,11 @@ def __init__(self, config):

self.likelihoods = dict()

self.par_config = self.get_parameter_config(config['par_config'])
if not par_config is None:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
E714 test for object identity should be 'is not'

@@ -340,6 +346,17 @@ def update_parameter_config(self, likelihoods):
self.par_config.pop(p)
return needed_parameters

def set_instruct(self, instructs):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
WPS615 Found unpythonic getter or setter

:param instructs: dict, instruction file name or dictionary
"""
if not hasattr(self, 'instruct'):
self.instruct = dict()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
C408 Unnecessary dict call - rewrite as a literal.

@@ -325,7 +325,11 @@ def get_log_likelihood(self, key, batch_size, parameters):
:param batch_size: int of number of simulated events
:param parameters: dict of parameters used in simulation
"""
key, result = self._simulate_yields(key, batch_size, parameters)
if batch_size != 1:
warning = f'You specified the batch_size larger than 1, '\
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
N400: Found backslash that is used for line breaking

@dachengx dachengx requested a review from zihaoxu98 March 9, 2023 09:14
@dachengx dachengx merged commit e28d828 into master Mar 9, 2023
@dachengx dachengx deleted the elife_sigma branch March 9, 2023 13:13
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.

None yet

3 participants