-
Notifications
You must be signed in to change notification settings - Fork 2
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
Convert PDF spectrum to CDF by default #72
Conversation
Pull Request Test Coverage Report for Build 3733004478
💛 - Coveralls |
appletree/utils.py
Outdated
@@ -498,3 +498,17 @@ def _add_extension(module, subclass, base): | |||
) | |||
else: | |||
setattr(module, subclass.__name__, subclass) | |||
|
|||
|
|||
def integrate(x, y): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions are not necessarily being here as long as they are only used in appletree/config.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they are some calculation but not really utilities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking these functions will be used for the normalization of an analytical spectrum, which will be called again somewhere in component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then please rename the functions with the method(s) applied specifically. Like 'midpoint', or 'binned'.
@@ -498,3 +498,22 @@ def _add_extension(module, subclass, base): | |||
) | |||
else: | |||
setattr(module, subclass.__name__, subclass) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W291 trailing whitespace
""" | ||
_, res = cum_integrate(x, y) | ||
return res[-1] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W291 trailing whitespace
@@ -498,3 +498,24 @@ def _add_extension(module, subclass, base): | |||
) | |||
else: | |||
setattr(module, subclass.__name__, subclass) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W291 trailing whitespace
_, res = cum_integrate_midpoint(x, y) | ||
return res[-1] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W291 trailing whitespace
This PR will convert the x vs PDF map to CDF vs x map by default, to facilitate energy sampler.