@@ -246,6 +246,8 @@ def from_xml_element(cls, elem):
246246
247247class Rational (Univariate ):
248248 """Distribution with power law probability over a finite interval [a,b]
249+
250+ The power law distribution has density function :math:`p(x) dx = c x^n dx`.
249251
250252 Parameters
251253 ----------
@@ -254,7 +256,8 @@ class Rational(Univariate):
254256 b : float, optional
255257 Upper bound of the sampling interval. Defaults to unity.
256258 n : float, optional
257- power law exponent. Defaults to zero, which is eqivalent to an uniform distribution
259+ Power law exponent. Defaults to zero, which is equivalent to a uniform
260+ distribution.
258261
259262 Attributes
260263 ----------
@@ -289,17 +292,17 @@ def n(self):
289292
290293 @a .setter
291294 def a (self , a ):
292- cv .check_type ('Uniform a ' , a , Real )
295+ cv .check_type ('interval lower bound ' , a , Real )
293296 self ._a = a
294297
295298 @b .setter
296299 def b (self , b ):
297- cv .check_type ('Uniform b ' , b , Real )
300+ cv .check_type ('interval upper bound ' , b , Real )
298301 self ._b = b
299302
300303 @n .setter
301304 def n (self , n ):
302- cv .check_type ('Uniform n ' , n , Real )
305+ cv .check_type ('power law exponent ' , n , Real )
303306 self ._n = n
304307
305308 def to_xml_element (self , element_name ):
@@ -313,12 +316,12 @@ def to_xml_element(self, element_name):
313316 Returns
314317 -------
315318 element : xml.etree.ElementTree.Element
316- XML element containing uniform distribution data
319+ XML element containing distribution data
317320
318321 """
319322 element = ET .Element (element_name )
320323 element .set ("type" , "rational" )
321- element .set ("parameters" , '{} {} {}' . format ( self .a , self .b , self .n ) )
324+ element .set ("parameters" , f' { self .a } { self .b } { self .n } ' )
322325 return element
323326
324327 @classmethod
@@ -333,7 +336,7 @@ def from_xml_element(cls, elem):
333336 Returns
334337 -------
335338 openmc.stats.Rational
336- Uniform distribution generated from XML element
339+ Distribution generated from XML element
337340
338341 """
339342 params = get_text (elem , 'parameters' ).split ()
0 commit comments