diff --git a/docs/source/pythonapi/index.rst b/docs/source/pythonapi/index.rst index 6d513d5d5..6dd2ae10d 100644 --- a/docs/source/pythonapi/index.rst +++ b/docs/source/pythonapi/index.rst @@ -35,6 +35,8 @@ on a given module or class. opencg_compatible plots settings + source + stats surface tallies trigger diff --git a/docs/source/pythonapi/source.rst b/docs/source/pythonapi/source.rst new file mode 100644 index 000000000..4bc770363 --- /dev/null +++ b/docs/source/pythonapi/source.rst @@ -0,0 +1,8 @@ +.. _pythonapi_source: + +====== +Source +====== + +.. automodule:: openmc.source + :members: diff --git a/docs/source/pythonapi/stats.rst b/docs/source/pythonapi/stats.rst new file mode 100644 index 000000000..58060cacb --- /dev/null +++ b/docs/source/pythonapi/stats.rst @@ -0,0 +1,58 @@ +.. _pythonapi_stats: + +===================== +Statistical Functions +===================== + +---------------------------- +Summary of Available Classes +---------------------------- + +Univariate Probability Distributions +------------------------------------ + +.. currentmodule:: openmc.stats.univariate + +.. autosummary:: + + Univariate + Discrete + Uniform + Maxwell + Watt + Tabular + +Angular Distributions +--------------------- + +.. currentmodule:: openmc.stats.multivariate + +.. autosummary:: + + UnitSphere + PolarAzimuthal + Isotropic + Monodirectional + +Spatial Distributions +--------------------- + +.. autosummary:: + + Spatial + CartesianIndependent + Box + Point + + +Univariate Probability Distributions +------------------------------------ + +.. automodule:: openmc.stats.univariate + :members: + +Multivariate Probability Distributions +-------------------------------------- + +.. automodule:: openmc.stats.multivariate + :members: diff --git a/openmc/stats/multivariate.py b/openmc/stats/multivariate.py index a750d0301..29258ee8d 100644 --- a/openmc/stats/multivariate.py +++ b/openmc/stats/multivariate.py @@ -6,7 +6,6 @@ import sys from xml.etree import ElementTree as ET import numpy as np -from numpy.linalg import norm import openmc.checkvalue as cv from openmc.stats.univariate import Univariate, Uniform @@ -48,7 +47,7 @@ class UnitSphere(object): def reference_uvw(self, uvw): cv.check_type('reference direction', uvw, Iterable, Real) uvw = np.asarray(uvw) - self._reference_uvw = uvw/norm(uvw) + self._reference_uvw = uvw/np.linalg.norm(uvw) @abstractmethod def to_xml(self): @@ -63,9 +62,9 @@ class PolarAzimuthal(UnitSphere): Parameters ---------- - mu : openmc.stats.Univariate + mu : Univariate Distribution of the cosine of the polar angle - phi : openmc.stats.Univariate + phi : Univariate Distribution of the azimuthal angle in radians reference_uvw : Iterable of Real Direction from which polar angle is measured. Defaults to the positive @@ -73,9 +72,9 @@ class PolarAzimuthal(UnitSphere): Attributes ---------- - mu : openmc.stats.Univariate + mu : Univariate Distribution of the cosine of the polar angle - phi : openmc.stats.Univariate + phi : Univariate Distribution of the azimuthal angle in radians """ @@ -187,20 +186,20 @@ class CartesianIndependent(Spatial): Parameters ---------- - x : openmc.stats.Univariate + x : Univariate Distribution of x-coordinates - y : openmc.stats.Univariate + y : Univariate Distribution of y-coordinates - z : openmc.stats.Univariate + z : Univariate Distribution of z-coordinates Attributes ---------- - x : openmc.stats.Univariate + x : Univariate Distribution of x-coordinates - y : openmc.stats.Univariate + y : Univariate Distribution of y-coordinates - z : openmc.stats.Univariate + z : Univariate Distribution of z-coordinates """