Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins for parameter response multiple regression and parallel coordinates #394

Open
wants to merge 256 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
2854c85
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 2, 2020
558b811
Add _multiple_regression_vegard
VegardOztan Jul 2, 2020
7b86485
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
VegardOztan Jul 2, 2020
99b077c
lagde ein sykt hack plugin (#371)
JosteinGj Jul 2, 2020
9d732cd
Clean the _multiple_regression_sara file
saraa394 Jul 2, 2020
8531636
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 2, 2020
743249b
Add more filters and now using forward_select to get model
VegardOztan Jul 2, 2020
d131b48
Merge remote-tracking branch 'refs/remotes/origin/group-b-test' into …
VegardOztan Jul 2, 2020
2dc80cd
add max vars
JosteinGj Jul 2, 2020
c5d31c8
Do nothing really
sofieaasheim Jul 2, 2020
b53990e
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 2, 2020
5ecf7cd
fortsatte på p-value plots, la inn flere filter og mer interaktivitet…
JosteinGj Jul 2, 2020
393da22
Make p-values plot and table work at the same time
sofieaasheim Jul 3, 2020
98cb3c9
Update guided tour
sofieaasheim Jul 3, 2020
9c4c805
Shorten set_callbacks function
sofieaasheim Jul 3, 2020
300bfd0
Delete p_values test-plugin
sofieaasheim Jul 3, 2020
2cef723
Update table font size
sofieaasheim Jul 3, 2020
73380ac
Finished multiple regression sara with callbacks
saraa394 Jul 6, 2020
2c8833f
Update some variable names
sofieaasheim Jul 6, 2020
e50612e
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 6, 2020
373346d
Run pip install -e .
saraa394 Jul 6, 2020
8330d54
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 6, 2020
467d311
Corrected a small mistake
saraa394 Jul 6, 2020
c5d19a9
fixed broken plugin and added table to test2_plug (#378)
JosteinGj Jul 6, 2020
f60ffef
Add possibility for timeseries data
VegardOztan Jul 6, 2020
871ec1a
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
VegardOztan Jul 6, 2020
3e14ab9
Add Equinor theme to p-values plot
sofieaasheim Jul 7, 2020
c9e182e
Add line at p=0.05 and update layout for p-values plot
sofieaasheim Jul 7, 2020
3b60d7e
Remove intercept from p-values plot
sofieaasheim Jul 7, 2020
d500948
Add force in and out
VegardOztan Jul 8, 2020
a58371a
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
VegardOztan Jul 8, 2020
5fa1382
Add new multiple regression plugin
sofieaasheim Jul 8, 2020
5e3b099
pulled up to speed on branch
JosteinGj Jul 8, 2020
c57ec1f
Add force in and out, and a temporary parameter filter
sofieaasheim Jul 8, 2020
40cc88c
Update guided tour and comments/information
sofieaasheim Jul 8, 2020
af12117
Add color scale. Correct color theme
saraa394 Jul 8, 2020
9b0c221
Fix force in/out bug with p-values plot
sofieaasheim Jul 8, 2020
074df53
Removed unnecessary columns form table
VegardOztan Jul 8, 2020
fdec55e
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
VegardOztan Jul 8, 2020
25ba67d
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 8, 2020
e60c6e1
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 8, 2020
20e9023
Update _multiple_regression.py
sofieaasheim Jul 8, 2020
e870db3
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 8, 2020
44f4f98
Add plugin for correlations with interaction terms
sofieaasheim Jul 9, 2020
30ba9be
Add @njit, comment out
saraa394 Jul 10, 2020
1bd0ddc
Add arrow plot to plugin. Comment out @njit.
saraa394 Jul 10, 2020
f4789cf
Update _multiple_regression_sofie.py
sofieaasheim Jul 10, 2020
dac1f48
Add user input functionality
sofieaasheim Jul 10, 2020
3fc5d9e
Add timing to model selection
JosteinGj Jul 13, 2020
b0385db
pulled from origin group-b-test
JosteinGj Jul 13, 2020
5f0a559
Add SUBMIT button
saraa394 Jul 13, 2020
95661eb
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 13, 2020
d717b56
Make arrowplot and submit prettier
saraa394 Jul 13, 2020
585d339
Update arrows
sofieaasheim Jul 13, 2020
b2c6849
Make arrow line thinner and lighter
sofieaasheim Jul 13, 2020
4fd7c88
Fix choose parameters now working
VegardOztan Jul 13, 2020
18c79e5
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
VegardOztan Jul 13, 2020
09a25ea
Update arrow plot
sofieaasheim Jul 13, 2020
0693f55
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 13, 2020
d3b25b4
Update guided tour
sofieaasheim Jul 13, 2020
c1dbb7a
Change Forward selection algorithm to implement numpy instead of only…
JosteinGj Jul 13, 2020
3337ef7
Merged with origin
JosteinGj Jul 13, 2020
4c36e73
Clarify some comments
saraa394 Jul 13, 2020
1ab7448
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 13, 2020
676e7d1
Fix typo
JosteinGj Jul 13, 2020
e6621eb
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 13, 2020
00be228
Merged with origin
VegardOztan Jul 13, 2020
2e8068c
Add functionallity to select parameters to use
VegardOztan Jul 13, 2020
5144645
Merge with stash
VegardOztan Jul 13, 2020
4ef1314
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
VegardOztan Jul 13, 2020
d4e21be
Remove some of the callback input functions
sofieaasheim Jul 14, 2020
7f6e098
Remove some of the callback output functions
sofieaasheim Jul 14, 2020
10c1954
Undo the last two commits hehe
sofieaasheim Jul 14, 2020
99ffb57
Merge input callbacks to one function
sofieaasheim Jul 14, 2020
b316abd
Add error and warning handling
VegardOztan Jul 14, 2020
9f45069
merged with origin
JosteinGj Jul 14, 2020
4027adc
merged with origin
JosteinGj Jul 14, 2020
d2b6086
Add valid-input functionality
saraa394 Jul 14, 2020
c3174dd
Make code slightly more reader friendly
saraa394 Jul 14, 2020
7027c72
Improve error and warning handling
VegardOztan Jul 14, 2020
b086ce4
Make small updates to code
saraa394 Jul 14, 2020
31bdce1
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 14, 2020
5325c9e
Make common output callback for all visualizations
sofieaasheim Jul 15, 2020
a4e5eb4
Merge all output callback functions into one
sofieaasheim Jul 15, 2020
07f2088
Clean up code, remove temp. parameter filter
sofieaasheim Jul 15, 2020
8f8c74e
Remove make_button function and add button to filter layout
sofieaasheim Jul 15, 2020
df6659a
Edit arrows
sofieaasheim Jul 15, 2020
317f05c
Added naming compatability and support for arbitrary depth interaction
JosteinGj Jul 15, 2020
6bb57b1
merged with origin
JosteinGj Jul 15, 2020
3f6c84f
fixed some stuff
JosteinGj Jul 15, 2020
dba2334
Fix bug and unresolved merge conflicts
JosteinGj Jul 15, 2020
b2da5e9
Add exclude and include parameter
VegardOztan Jul 15, 2020
3d9334e
Update _multiple_regression_sofie.py
sofieaasheim Jul 16, 2020
ecc6f4e
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 16, 2020
4e45e9b
Add normalization
sofieaasheim Jul 16, 2020
de8690e
Add function for standardization
sofieaasheim Jul 16, 2020
28f6962
Sort arrow plot by p-value. Shorten some code
saraa394 Jul 16, 2020
173465c
Solve merge conflicts
saraa394 Jul 16, 2020
358d796
Remove test comments
saraa394 Jul 16, 2020
f5f16b0
Fix bug in starardization
sofieaasheim Jul 16, 2020
884c845
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 16, 2020
5acdd78
Remove force out and fix force in
VegardOztan Jul 16, 2020
f040d92
Fix direction of arrow error
saraa394 Jul 16, 2020
f5059bc
Move warninghandling to only encapture points where it can trigger
JosteinGj Jul 17, 2020
21196b7
Remove standardization
sofieaasheim Jul 17, 2020
902d6f9
Add slider for interactions
sofieaasheim Jul 17, 2020
ecba92d
Fix color and single plot in arrow plot
saraa394 Jul 17, 2020
ecbe36e
Remove test prints
saraa394 Jul 17, 2020
b29e3f8
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 17, 2020
37dc545
Rewrite coefficent plot tour guide
saraa394 Jul 17, 2020
c04939f
Add callback to placeholder text for exc/inc
VegardOztan Jul 17, 2020
3baa7d8
Fixed parameter names extending out of box
JosteinGj Jul 17, 2020
f14eb6d
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
VegardOztan Jul 17, 2020
d9a0461
merged with origin group-b-test
JosteinGj Jul 17, 2020
0110e55
merged with group-b-test
JosteinGj Jul 17, 2020
122bcb3
Fix comments from Asgeir
sofieaasheim Jul 20, 2020
f02caa3
Fix comments from Asgeir
VegardOztan Jul 20, 2020
c27962c
Update layout
sofieaasheim Jul 20, 2020
0d0f7f4
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 20, 2020
67e162d
Update guided tour
sofieaasheim Jul 20, 2020
6b0e44b
Remove the coefficient column from table
sofieaasheim Jul 20, 2020
549d6bb
Add comments explaining forward selection
JosteinGj Jul 21, 2020
a7f4692
Fix background color, error, of hover in arrow plot
saraa394 Jul 21, 2020
24b83f0
Merge conflicts
saraa394 Jul 21, 2020
dbeffea
Fix typos, Add more comments.
JosteinGj Jul 21, 2020
a03d095
Change from plotly express to plotly go
sofieaasheim Jul 21, 2020
0898bb5
Add tooltips to control layout
JosteinGj Jul 21, 2020
570f08f
Edit multiple_regression_sofie
sofieaasheim Jul 21, 2020
9bf1ba3
Add p-value in hover on arrow plot
saraa394 Jul 21, 2020
659b5b7
Fix everything
sofieaasheim Jul 21, 2020
d69fb40
Fixed typo Removed unused imports
JosteinGj Jul 21, 2020
2131eea
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 21, 2020
9baf627
Add Josteins placeholder for interactions
sofieaasheim Jul 21, 2020
d1225aa
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 21, 2020
63ea258
Fix merge
saraa394 Jul 21, 2020
753b19e
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 21, 2020
a835e88
Change p-value axis name
saraa394 Jul 21, 2020
751a7de
Edit p-values title
sofieaasheim Jul 21, 2020
39fd285
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 21, 2020
284a3ad
Fix p-value axis name
saraa394 Jul 21, 2020
9bc19d4
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 21, 2020
5131883
Update hovertext in arrow and p-value plots
saraa394 Jul 21, 2020
be0ff77
Change table title to page title
saraa394 Jul 21, 2020
d3e16a4
Update page title
sofieaasheim Jul 21, 2020
4d4ff4f
Fix flex bug
sofieaasheim Jul 21, 2020
ab6ccc0
Make info icons (somewhat) more aesthetically pleasing
saraa394 Jul 21, 2020
7306468
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 21, 2020
11a6efb
merged with origin
JosteinGj Jul 21, 2020
3112b4c
Change wording of tooltips, and fix typos
VegardOztan Jul 21, 2020
bd6711b
Uppdate tooltips
sofieaasheim Jul 21, 2020
6824589
Revert "Uppdate tooltips"
sofieaasheim Jul 21, 2020
6f278f3
Update _multiple_regression_sofie.py
sofieaasheim Jul 21, 2020
1baca01
Edit tooltip
sofieaasheim Jul 21, 2020
8f2b882
Move submit button and table to bottom
VegardOztan Jul 21, 2020
d883146
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 21, 2020
5eea10d
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
VegardOztan Jul 21, 2020
a19fad8
Update font size tooltips
sofieaasheim Jul 21, 2020
5f4b920
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 21, 2020
c1656a8
Fix layout bugs
sofieaasheim Jul 21, 2020
f7d740e
Make tooltips nicer
sofieaasheim Jul 22, 2020
7e5ef58
Fix bug in statistics model
JosteinGj Jul 22, 2020
05140d2
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 22, 2020
7b06cb1
Update comments
sofieaasheim Jul 22, 2020
afb9dbc
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 22, 2020
6f4908e
Use equinor theme color in plots
saraa394 Jul 22, 2020
40421a6
Fix merge conflict
saraa394 Jul 22, 2020
7423ae7
Fix tooltips
sofieaasheim Jul 22, 2020
12e3969
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 22, 2020
680ce7d
Fix bug with increasing p-value text
sofieaasheim Jul 22, 2020
7a462d7
Remove unnecessary whitespace. Increase tooltip fontsize
saraa394 Jul 22, 2020
14f54ea
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 22, 2020
63686ca
Fix line lengths and " to '
sofieaasheim Jul 22, 2020
57de867
Update _multiple_regression.py
sofieaasheim Jul 22, 2020
4a1f592
Add table title
saraa394 Jul 22, 2020
eddc749
Black
sofieaasheim Jul 22, 2020
7499563
Remove unused imports
sofieaasheim Jul 22, 2020
5442785
Add table title
saraa394 Jul 22, 2020
60407fc
Fix plot title
sofieaasheim Jul 22, 2020
7ba02da
Fix merge conflict
saraa394 Jul 22, 2020
747505b
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 22, 2020
3fd368a
Pylint score from 8.46 to 9.03 and shorten code
sofieaasheim Jul 23, 2020
a3657bd
Fix force in bug + shorten code
sofieaasheim Jul 23, 2020
7d483fa
Fix layout
saraa394 Jul 23, 2020
9ba4b4f
Fix merge conflict
saraa394 Jul 23, 2020
91a9a70
Fix layout
saraa394 Jul 23, 2020
9a84ee4
Remove comments
saraa394 Jul 23, 2020
612b678
Fix layout
saraa394 Jul 23, 2020
5da5103
Move title
sofieaasheim Jul 23, 2020
efa2c00
Add response based paralell parameter plot
JosteinGj Jul 23, 2020
6c2c8e0
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 23, 2020
5f45dda
Fix installing response based paralell parameters in init and setup
JosteinGj Jul 23, 2020
0bf3436
Change variable names
sofieaasheim Jul 23, 2020
54e5f7d
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 23, 2020
11d2f3c
fixed typos
JosteinGj Jul 23, 2020
2116494
Update variables
sofieaasheim Jul 23, 2020
697ed25
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 23, 2020
f912ff9
Add percentage slider Add selection box
JosteinGj Jul 23, 2020
a848d7c
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 23, 2020
03211e6
Fix typo
VegardOztan Jul 23, 2020
c8c6dc5
Handle divide by zero error if resonse is zero
VegardOztan Jul 23, 2020
e6aaaad
Add (sub-optimal) change color of submit-button when input change
VegardOztan Jul 23, 2020
0743005
Add text to colorscale Move colorscale
JosteinGj Jul 24, 2020
54a9a70
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 24, 2020
15c62a3
Add detaled changes to ResponseParallelCoordinates. Comment MultipleR…
saraa394 Jul 24, 2020
6c01690
Fix merge conflicts
saraa394 Jul 24, 2020
f31779c
Change some layout in ResponseParallelCoordinates
saraa394 Jul 24, 2020
c9b8e04
Delete files
sofieaasheim Jul 24, 2020
1e1a8b5
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
sofieaasheim Jul 24, 2020
4a8fe64
Fix merge conflict
sofieaasheim Jul 24, 2020
7763b8f
Update docstring
sofieaasheim Jul 24, 2020
08599e0
Fixed color palette and discrete colorscale
JosteinGj Jul 24, 2020
eb6553c
merged with origin
JosteinGj Jul 24, 2020
c9e5a4d
merged with origin
JosteinGj Jul 24, 2020
e2e368b
Fix proper removal of testing plugins
JosteinGj Jul 24, 2020
0391a64
Merge branch 'master' of github.com:equinor/webviz-subsurface into gr…
JosteinGj Jul 24, 2020
668c377
Fix update button callback
VegardOztan Jul 24, 2020
03c9008
Black multiple_regression
sofieaasheim Jul 24, 2020
bbef2fc
Make it look more like the button is disabled
sofieaasheim Jul 24, 2020
2a068c4
Fix origin of color theme
saraa394 Jul 24, 2020
29a71c1
Fix merge conflicts
saraa394 Jul 24, 2020
3763f4c
Fix consistent use of color theme
saraa394 Jul 27, 2020
d09d7e2
Add no border when submit not clickable
VegardOztan Jul 27, 2020
4a4cd52
fixed range on response leading to misleading plots
JosteinGj Jul 27, 2020
97b22b2
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 27, 2020
2278189
Remove dbc and tooltips + sort imports with isort
sofieaasheim Jul 27, 2020
5ccc437
Detailed changes to color theme. Modifying comments
saraa394 Jul 27, 2020
a1b9436
Fix merge conflict
saraa394 Jul 27, 2020
699155d
Change to continous colorscale, lint, remove tooltips
JosteinGj Jul 27, 2020
581512d
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 27, 2020
031533f
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
saraa394 Jul 27, 2020
8095f4c
Add if DATE -> filter is single
VegardOztan Jul 27, 2020
942a7a2
Fix merge conflict
saraa394 Jul 27, 2020
42a340a
Finpuss
saraa394 Jul 27, 2020
f8583db
Add more error handling
VegardOztan Jul 28, 2020
6376a3e
Merge branch 'group-b-test' of https://github.com/equinor/webviz-subs…
VegardOztan Jul 28, 2020
c0bbabc
Revert changes in _p_r_c
VegardOztan Jul 28, 2020
f595c3d
Fix Asgeir comments
sofieaasheim Jul 29, 2020
0484007
Fix comments from Asgeir in accordance with draft pull request
JosteinGj Jul 29, 2020
6dcb549
Add appropriate imports
JosteinGj Jul 29, 2020
9098caf
Pull with origin group-b-test
JosteinGj Jul 29, 2020
a8184b2
fix typos in multiple_regresion and blacked response parallel_coordin…
JosteinGj Jul 29, 2020
240a7f2
Change some detailes from Asgeir's comments
saraa394 Jul 29, 2020
662fd61
Fix merge conflict
saraa394 Jul 29, 2020
0526b20
Add 100 realizations data
JosteinGj Jul 30, 2020
df9e60c
Merge branch 'group-b-test' of github.com:equinor/webviz-subsurface i…
JosteinGj Jul 30, 2020
4bc2383
Renamed MultipleRegression to ParameterResponseMultipleRegression
VegardOztan Jul 30, 2020
6bb9b5d
Renmae ResponseColoredParallelCoordinates to ParameterResponseParalle…
VegardOztan Jul 30, 2020
2b3ff72
change name of plugins
JosteinGj Jul 30, 2020
77bee9c
implement namechange for ResponseParameterParallelCoordinates and Par…
JosteinGj Jul 30, 2020
6e7d1fe
fix unresolved merge
JosteinGj Jul 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/webviz-subsurface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ jobs:
env:
# If you want the CI to (temporarily) run against your fork of the testdada,
# change the value her from "equinor" to your username.
TESTDATA_REPO_OWNER: equinor
TESTDATA_REPO_OWNER: asnyv
# If you want the CI to (temporarily) run against another branch than master,
# change the value her from "master" to the relevant branch name.
TESTDATA_REPO_BRANCH: master
TESTDATA_REPO_BRANCH: group_b_testdata
run: |
webviz certificate
git clone --depth 1 --branch $TESTDATA_REPO_BRANCH https://github.com/$TESTDATA_REPO_OWNER/webviz-subsurface-testdata.git
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"ReservoirSimulationTimeSeriesRegional = "
+ "webviz_subsurface.plugins:ReservoirSimulationTimeSeriesRegional",
"RftPlotter = webviz_subsurface.plugins:RftPlotter",
"ParameterResponseMultipleRegression = "
+ "webviz_subsurface.plugins:ParameterResponseMultipleRegression",
"ParameterResponseParallelCoordinates = "
+ "webviz_subsurface.plugins:ParameterResponseParallelCoordinates",
]
},
install_requires=[
Expand All @@ -57,6 +61,7 @@
"webviz-config>=0.0.55",
"webviz-subsurface-components>=0.0.23",
"xtgeo>=2.8",
"statsmodels>=0.11.1",
],
tests_require=TESTS_REQUIRE,
extras_require={"tests": TESTS_REQUIRE},
Expand Down
49 changes: 49 additions & 0 deletions webviz_subsurface/_utils/response_aggregation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from webviz_config.common_cache import CACHE
import numpy as np


@CACHE.memoize(timeout=CACHE.TIMEOUT)
def filter_and_sum_responses(
dframe, ensemble, response, filteroptions=None, aggregation="sum"
):
"""Cached wrapper for _filter_and_sum_responses"""
return _filter_and_sum_responses(
dframe=dframe,
ensemble=ensemble,
response=response,
filteroptions=filteroptions,
aggregation=aggregation,
)


def _filter_and_sum_responses(
dframe, ensemble, response, filteroptions=None, aggregation="sum",
):
"""Filter response dataframe for the given ensemble
and optional filter columns. Returns dataframe grouped and
aggregated per realization."""
df = dframe.copy()
df = df.loc[df["ENSEMBLE"] == ensemble]
if filteroptions:
for opt in filteroptions:
if opt["type"] == "multi" or opt["type"] == "single":
if isinstance(opt["values"], list):
df = df.loc[df[opt["name"]].isin(opt["values"])]
else:
if opt["name"] == "DATE" and isinstance(opt["values"], str):
df = df.loc[df["DATE"].astype(str) == opt["values"]]
else:
df = df.loc[df[opt["name"]] == opt["values"]]

elif opt["type"] == "range":
df = df.loc[
(df[opt["name"]] >= np.min(opt["values"]))
& (df[opt["name"]] <= np.max(opt["values"]))
]
if aggregation == "sum":
return df.groupby("REAL").sum().reset_index()[["REAL", response]]
if aggregation == "mean":
return df.groupby("REAL").mean().reset_index()[["REAL", response]]
raise ValueError(
f"Aggregation of response file specified as '{aggregation}'' is invalid. "
)
7 changes: 6 additions & 1 deletion webviz_subsurface/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
ReservoirSimulationTimeSeriesRegional,
)
from ._rft_plotter.rft_plotter import RftPlotter

from ._parameter_response_multiple_regression import ParameterResponseMultipleRegression
from ._parameter_response_parallel_coordinates import (
ParameterResponseParallelCoordinates,
)

__all__ = [
"ParameterDistribution",
Expand All @@ -72,4 +75,6 @@
"RelativePermeability",
"ReservoirSimulationTimeSeriesRegional",
"RftPlotter",
"ParameterResponseMultipleRegression",
"ParameterResponseParallelCoordinates",
]
Loading