Fixed error in warning message

Previously, the warning message for setting a legendre order greater than 0
mistakenly said "order 0 is greater than zero" because the wrong
legendre order was referenced. With the fix, the correct variable is
referenced, and the warning is now correct. E.g "order 3 is greater
than zero"
This commit is contained in:
Miriam 2020-08-25 03:34:25 +00:00
parent 8f0629b133
commit 3aff054f38
2 changed files with 2 additions and 2 deletions

View file

@ -412,7 +412,7 @@ class Library:
if self.correction == 'P0' and legendre_order > 0:
msg = 'The P0 correction will be ignored since the ' \
'scattering order {} is greater than '\
'zero'.format(self.legendre_order)
'zero'.format(legendre_order)
warn(msg, RuntimeWarning)
self.correction = None
elif self.scatter_format == 'histogram':

View file

@ -4160,7 +4160,7 @@ class ScatterMatrixXS(MatrixMGXS):
if self.correction == 'P0' and legendre_order > 0:
msg = 'The P0 correction will be ignored since the ' \
'scattering order {} is greater than '\
'zero'.format(self.legendre_order)
'zero'.format(legendre_order)
warnings.warn(msg, RuntimeWarning)
self.correction = None
elif self.scatter_format == SCATTER_HISTOGRAM: