Paul Romano
d31b083685
Address @yardasol review comments
2022-08-16 16:19:55 -05:00
Paul Romano
02f1815299
Add missing versionadded directives
2022-08-15 13:20:59 -05:00
Paul Romano
ca99195e81
Fix Mixture.sample to account for intensities of underlying distributions
2022-08-11 07:27:04 -05:00
Paul Romano
cc7aa092be
Address @eepeterson comments on #2135
2022-07-28 17:07:06 -05:00
Paul Romano
b2fed3c3ce
Fix bugs in Discrete, Tabular, and Mixture sample methods
2022-07-28 17:06:13 -05:00
Paul Romano
a68a3ede6a
Change get_sources() -> sources property and add test
2022-07-22 15:08:25 -05:00
Paul Romano
5a9662aa9f
Add test for combine_distributions, use np.array in Discrete/Tabular setters
2022-07-22 14:56:05 -05:00
Paul Romano
7c779f73f8
Move combine_distributions to univariate.py
2022-07-22 14:56:05 -05:00
Paul Romano
443c2ac4c9
Add integral method on Discrete, Tabular, and Mixture classes
2022-07-22 14:56:04 -05:00
Patrick Shriwise
f92ea393f2
Using np.random.choice in Mixture class
2022-06-20 06:39:55 -05:00
Patrick Shriwise
967fc9f88b
Adding a 'mean' method to tabular dist
2022-06-19 10:00:27 -05:00
Patrick Shriwise
862189985b
Check that output values do not exceed values in tabulated dist
2022-06-19 09:51:45 -05:00
Patrick Shriwise
f46402fd87
Adding docstrings to normalize methods
2022-06-19 09:43:40 -05:00
Patrick Shriwise
f52865854b
Apply suggestions from @paulromano
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-06-19 09:39:53 -05:00
Patrick Shriwise
0c3d30e6d1
Update openmc/stats/univariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-06-19 09:31:38 -05:00
Patrick Shriwise
e1fd9959bc
A little cleanup
2022-06-09 08:00:17 -05:00
Patrick Shriwise
9dc84fdb18
Always normalize distributions when sampling. Adding normalization method for tabular.
2022-06-09 01:17:46 -05:00
Patrick Shriwise
12b8a0802f
Updating masks and adding some comments for clarity
2022-06-07 23:12:31 -05:00
Patrick Shriwise
2c74dcf336
Adding similar test for Muir distribution
2022-06-07 23:12:31 -05:00
Patrick Shriwise
8070ccaf52
Adding sampling for Mixture. Improving performance of Discrete sampling
2022-06-07 23:12:31 -05:00
Patrick Shriwise
17be0257a0
Correction to histogram cdf method
2022-06-07 23:12:31 -05:00
Patrick Shriwise
136ff45cc5
Adding docstrings. Corrections to Tabular sampling
2022-06-07 23:12:31 -05:00
Patrick Shriwise
e856c6a270
Correction to maxwell dist sampling
2022-06-07 23:12:31 -05:00
Patrick Shriwise
7484618c7c
Adding sample methods to univariate distribution classes
2022-06-07 23:12:31 -05:00
Christopher Fichtlscherer
44d591ff48
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-16 14:39:28 +02:00
Christopher Fichtlscherer
8b62ee3635
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-16 14:38:46 +02:00
cpf
6806f73bd4
missing import
2022-05-14 09:12:07 +02:00
Christopher Fichtlscherer
7bcad5e7b6
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-14 09:09:21 +02:00
Christopher Fichtlscherer
0def5bf655
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-14 09:08:54 +02:00
cpf
0ba342c884
Define function spherical_uniform instead of class SphericalIndependent
2022-05-13 21:14:44 +02:00
cpf
5ce9e3998f
Merge remote-tracking branch 'origin/develop' into theta_distribution_spherical_independent
...
merged with the new changes from origin/develop
2022-05-13 20:41:57 +02:00
Paul Romano
178adb0843
Consistency check in Discrete.merge method
2022-05-11 14:47:55 -05:00
cpf
a8f1d47662
added a spherical source as a helping class
2022-05-10 15:40:37 +02:00
Christopher Fichtlscherer
31ebeb1327
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-10 09:17:40 +02:00
Christopher Fichtlscherer
06d85de2c3
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-10 09:17:34 +02:00
Christopher Fichtlscherer
6ba42d2cc4
Update openmc/stats/multivariate.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-05-10 09:17:23 +02:00
cpf
31648dd1a2
some more theta -> cos_theta
2022-05-09 20:23:18 +02:00
cpf
021215a2b9
included paulromanos suggestions
2022-05-09 20:03:28 +02:00
Paul Romano
cf665d076f
Remove unused import in univariate.py
...
Co-authored-by: Ethan Peterson <ethan.peterson@mit.edu>
2022-05-04 12:34:04 -05:00
Paul Romano
ef3019a140
Add merge classmethod on openmc.stats.Discrete
2022-05-04 07:08:20 -05:00
Paul Romano
fdd5e10822
Release notes for 0.13.0
2022-02-04 07:19:35 -06:00
Paul Romano
9df6820da1
Implement from_xml_element methods for cylindrical/spherical mesh. Closes #1951
2022-01-20 10:33:53 -06:00
Olaf Schumann
c0bcc3f1ca
Renamed Rational to Power Law
2021-10-11 19:48:35 +00:00
Olaf Schumann
358f64c53a
Apply suggestions from code review
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2021-10-11 21:20:30 +02:00
Olaf Schumann
9eeff1ede9
Update to rational distribution
...
* store offset, span and ninv in class
* accessor functions calculate a, b, n
2021-10-05 20:04:21 +00:00
Olaf Schumann
eb0eac79c1
Rational univariate distribution, that sampled a random variable with a pdf of p = x^n
...
Usefull for samplig homogenous cylindrical or spherical sources
Simmilar to MCNPs "sp -21 n" functionality
2021-10-05 19:24:40 +00:00
Olaf Schumann
fe9d929ed0
Apply suggestions from code review
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2021-10-01 12:17:47 +02:00
Olaf Schumann
0b3cd2544b
Update openmc/stats/univariate.py
...
better naming
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2021-09-29 17:11:30 +02:00
Olaf Schumann
e7fa663b3d
Update mixture distribution
...
update storeage of c++ class
update sampling -> uses std::lower_bound for O(log(N)) sampling of the
distribution
implemented from_xml_element
updated settings.rst
include a mixture in the regression tests
2021-09-23 09:37:19 +00:00
Olaf Schumann
1c219600a1
Implementation of openmc.stats.Mixture distribution
...
Added to_xml_element python method
create <pair> nodes with probability and distribution definition in order to have the
data bundled together. A different approach might be to save just two lists of "values".
Implemented c++ Mixture class
Parsing xml-data
Sampling the distribution from the cummulative probability table
2021-09-22 15:44:03 +00:00