Cpt conditioning continued - #5
Open
bramvandeneijnden wants to merge 63 commits into
Open
Conversation
new file: random_fields/generate_conditioned_field.py
modified: random_fields/generate_conditioned_field.py
Changes to be committed: modified: ../README.md new file: Makefile renamed: static/random_field.png -> _static/random_field.png new file: _static/random_field_1.png new file: _static/random_field_2.png new file: _static/random_field_3.png renamed: static/random_field_3D.png -> _static/random_field_3D.png new file: authors.rst new file: conf.py new file: contributions.rst new file: index.rst new file: installation.rst new file: make.bat new file: requirements.txt new file: theory.rst new file: tutorials.rst modified: ../random_fields/generate_conditioned_field.py modified: ../random_fields/generate_field.py modified: ../random_fields/utils.py
Changes committed: new file: _static/conditioned_random_field_3D.png new file: _static/kriging_mean_2D.png new file: _static/kriging_mean_3D.png new file: _static/kriging_std_2D.png new file: _static/kriging_std_3D.png new file: _static/random_field_4.png new file: _static/random_field_5.png modified: index.rst modified: tutorials.rst modified: ../random_fields/utils.py
Changes to be committed: modified: tutorials.rst modified: ../requirements.txt
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
modified: docs/contributions.rst modified: docs/installation.rst modified: random_fields/generate_field.py modified: random_fields/utils.py modified: requirements_dev.txt new file: tests/data/kriging_mean_3D.txt new file: tests/data/kriging_std_3D.txt modified: tests/test_random_field.py
- style changes
- update docstrings
- extended test
modified: docs/contributions.rst
modified: random_fields/generate_field.py
modified: random_fields/utils.py
modified: requirements.txt
modified: requirements_dev.txt
new file: tests/data/conditioned_rf_3D.txt
deleted: tests/data/kriging_mean_3D.txt
deleted: tests/data/kriging_std_3D.txt
modified: tests/test_random_field.py
modified: requirements_dev.txt
new file: random_fields/geostatistical_cpt_interpretation.py modified: random_fields/geostatistical_cpt_interpretation.py
modified: random_fields/geostatistical_cpt_interpretation.py
modified: random_fields/geostatistical_cpt_interpretation.py
modified: random_fields/geostatistical_cpt_interpretation.py modified: requirements.txt modified: requirements_dev.txt new file: tests/data/DelftSchiedam_cpts/CPT000000217393_IMBRO.gef new file: tests/data/DelftSchiedam_cpts/CPT000000217402_IMBRO.gef new file: tests/data/DelftSchiedam_cpts/CPT000000217406_IMBRO.gef new file: tests/data/DelftSchiedam_cpts/CPT000000217408_IMBRO.gef new file: tests/data/DelftSchiedam_cpts/CPT000000217409_IMBRO.gef new file: tests/data/DelftSchiedam_cpts/locatie_levering.kml
modified: random_fields/geostatistical_cpt_interpretation.py modified: setup.cfg
modified: requirements.txt modified: requirements_dev.txt
modified: random_fields/geostatistical_cpt_interpretation.py modified: requirements.txt modified: requirements_dev.txt modified: setup.cfg deleted: tests/data/DelftSchiedam_cpts/112-074.400-2022-01-CPT-01.gef deleted: tests/data/DelftSchiedam_cpts/112-074.500-2022-01-CPT-01.gef deleted: tests/data/DelftSchiedam_cpts/112-074.600-2022-01-CPT-01.gef deleted: tests/data/DelftSchiedam_cpts/112-074.700-2022-01-CPT-01.gef deleted: tests/data/DelftSchiedam_cpts/112-074.800-2022-01-CPT-01.gef
modified: requirements.txt modified: requirements_dev.txt modified: setup.cfg
bramvandeneijnden
requested review from
aronnoordam and
brunozc
as code owners
December 6, 2024 09:45
| import scipy.stats as st | ||
| import logging | ||
|
|
||
| from generate_field import RandomFields, ModelName |
There was a problem hiding this comment.
This does not work please change to random_fields.generate_field
…field generation functions
…able figure sizes; update documentation for 2D and 3D random field visualizations.
…ct spelling of "functionalities"
…oned Random Field on CPT data
…ting.assert_allclose for better precision
…by adding relative tolerance
… pull request branch coverage
… code readability
aronnoordam
reviewed
Jan 15, 2025
| import random_fields | ||
|
|
||
| project = 'RandomFields' | ||
| copyright = '2024, STEM team' |
Collaborator
There was a problem hiding this comment.
Suggested change
| copyright = '2024, STEM team' | |
| copyright = '2025, STEM team' |
Collaborator
There was a problem hiding this comment.
I think we should also test the tutorials, like we do in STEM, but maybe in another PR
| self.trans_model_vs.x_to_z(self.conditioning_data.vs[self.conditional_sample_index])) | ||
|
|
||
| # initiate two independent random field generators for shear wave velocity `vs` and density `rho` | ||
| self._random_fields_vs = RandomFields(model_name=ModelName.Gaussian, |
Collaborator
There was a problem hiding this comment.
i would make model_name a class attribute
| self.young_modulus = 2 * GO * (1. + self.poisson_ratio) | ||
| self.solid_density = rho * (1. - self.porosity) + self.porosity * self.water_density | ||
|
|
||
| for value in self.return_property: |
Collaborator
There was a problem hiding this comment.
else warning, property does not exist
Collaborator
There was a problem hiding this comment.
are all these plotting functions overlapping with the plotting functions in the random field classes?
|
|
||
| @pytest.mark.parametrize("cpt_folder_path, test_file", [("./tests/cpts/gef", "./tests/data/2d_rf_gef.pickle"), | ||
| ("./tests/cpts/xml", "./tests/data/2d_rf_xml.pickle")]) | ||
| def test_2d_random_field(cpt_folder_path, test_file): |
| idx_end = data_org.index("currentfile DataString readhexstring pop") | ||
| data = [val == data_new[header + i] for i, val in enumerate(data_org[header:idx_end])] | ||
| assert all(data) | ||
| assert os.path.isfile("random_field.eps") |
Collaborator
There was a problem hiding this comment.
should this eps file be removed after the test?
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
Co-authored-by: aronnoordam <51492202+aronnoordam@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Complete CPT interpretation module for generating conditioned random fields of elastic properties based on CPT data.