Skip to content

Commit e0461ae

Browse files
tommyoddafeda
authored andcommitted
Integrate probabilit
- Use probabilit for random variable generation - Add option 'correlation_iterations' in general input sheet (default=0 => ImanConover) - Since variable sampling is not done in the same order, RNG is different and snapshot had to be used - Slight discrepancies in Mac and Linux RNG. Fixed by letting snapshot compare 6 siginificant digits - Added a test file with 6 lognorms, that showcases how we get better correlation matrices if correlation_iterations > 0 - Deleted ImanConover, nearest_correlation_matrix, etc. These are all in probabilit
1 parent 8ce85cd commit e0461ae

13 files changed

Lines changed: 6122 additions & 7242 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dependencies = [
4242
"xlrd",
4343
"xtgeo>=2.15",
4444
"seaborn",
45+
"probabilit==0.1.0",
4546
]
4647

4748
[project.urls]

src/semeio/fmudesign/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
from semeio.fmudesign._excel2dict import excel2dict_design, inputdict_to_yaml
1010
from semeio.fmudesign._tornado_onebyone import calc_tornadoinput
1111
from semeio.fmudesign.create_design import DesignMatrix
12-
from semeio.fmudesign.iman_conover import ImanConover
1312

1413
__all__ = [
1514
"DesignMatrix",
16-
"ImanConover",
1715
"calc_tornadoinput",
1816
"excel2dict_design",
1917
"inputdict_to_yaml",

src/semeio/fmudesign/_excel2dict.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ def _excel2dict_onebyone(
198198

199199
inputdict["designtype"] = generalinput[1]["designtype"]
200200

201+
# Extract
202+
key = "correlation_iterations"
203+
if key in generalinput.index:
204+
try:
205+
inputdict[key] = int(generalinput.loc[key].iloc[0])
206+
except ValueError:
207+
inputdict[key] = 0
208+
else:
209+
inputdict[key] = 0
210+
201211
if "rms_seeds" in generalinput.index:
202212
rms_seeds = str(generalinput.loc["rms_seeds"].iloc[0])
203213
if rms_seeds == "None":

0 commit comments

Comments
 (0)