From d6a6eb2aa8c6fac4980e6689644d8ef2c53e04f1 Mon Sep 17 00:00:00 2001 From: Jingang Liang Date: Fri, 26 Jul 2019 20:18:12 +0000 Subject: [PATCH] add more property functions for WMP --- openmc/data/multipole.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/openmc/data/multipole.py b/openmc/data/multipole.py index 880a9fd020..74138e8ce9 100644 --- a/openmc/data/multipole.py +++ b/openmc/data/multipole.py @@ -726,10 +726,8 @@ class WindowedMultipole(EqualityMixin): Attributes ---------- - fit_order : int - Order of the windowed curvefit. - fissionable : bool - Whether or not the target nuclide has fission data. + name : str + Name of the nuclide using the GND naming convention spacing : float The width of each window in sqrt(E)-space. For example, the frst window will end at (sqrt(E_min) + spacing)**2 and the second window at @@ -784,6 +782,18 @@ class WindowedMultipole(EqualityMixin): def fissionable(self): return self.data.shape[1] == 4 + @property + def n_poles(self): + return self.data.shape[0] + + @property + def n_windows(self): + return self.windows.shape[0] + + @property + def poles_per_window(self): + return (self.windows[:, 1] - self.windows[:, 0] + 1).mean() + @property def spacing(self): return self._spacing