[skip ci] review comments from @paulromano

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Jonathan Shimwell 2022-08-08 22:21:37 +01:00 committed by GitHub
parent 77c3c82c7a
commit 7ba45aaa35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1324,7 +1324,8 @@ class EnergyFilter(RealFilter):
cv.check_greater_than('filter value', v0, 0., equality=True)
cv.check_greater_than('filter value', v1, 0., equality=True)
def bin_lethargy(self):
@property
def lethargy_bin_width(self):
"""Calculates the base 10 log width of energy bins which is useful when
plotting the normalized flux.
@ -1333,9 +1334,7 @@ class EnergyFilter(RealFilter):
numpy.array
Array of bin widths
"""
bin_edges = np.unique(self.bins)
log_width = np.log10(bin_edges[1:]/bin_edges[:-1])
return log_width
return np.log10(self.bins[:, 1]/self.bins[:, 0])
@classmethod
def from_group_structure(cls, group_structure):