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
added bin_log_width to EnergyFilter() to help with plotting #2154
added bin_log_width to EnergyFilter() to help with plotting #2154
Conversation
If you want to add a function like this I'd recommend just a property called |
@eepeterson I think lethargy is usually defined relative to some reference energy, i.e. something like |
You're right, it could be called |
Thanks for the feedback, I've renamed the method to We could add another method if people want ? def lethargy(self, E_reference):
return np.log10(E_reference / self.bins) |
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.
In addition to the line comments, this PR also needs a quick unit test.
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
I would be keen to get rid of the need for users to do What do people think of adding a |
@shimwell The |
Oh yes, that works, thanks. I shall update the example at the top of this PR. |
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.
Thanks!
Just wondering if we can add a few lines to the
EnergyFilter
class that allows one to conveniently access the log bin width.This can useful when plotting spectra