mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
added bin_log_width to energyfilter
This commit is contained in:
parent
3f06b97400
commit
75548aade8
1 changed files with 7 additions and 0 deletions
|
|
@ -1324,6 +1324,13 @@ 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_log_width(self):
|
||||
"""Returns the base 10 log width of energy bins which is useful when
|
||||
plotting the normalized flux"""
|
||||
bin_edges = np.unique(self.bins)
|
||||
log_width = np.log10(bin_edges[1:]/bin_edges[:-1])
|
||||
return log_width
|
||||
|
||||
@classmethod
|
||||
def from_group_structure(cls, group_structure):
|
||||
"""Construct an EnergyFilter instance from a standard group structure.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue