Skip to content

Cpt conditioning continued - #5

Open
bramvandeneijnden wants to merge 63 commits into
mainfrom
CPT_conditioning_continued
Open

Cpt conditioning continued#5
bramvandeneijnden wants to merge 63 commits into
mainfrom
CPT_conditioning_continued

Conversation

@bramvandeneijnden

Copy link
Copy Markdown

Complete CPT interpretation module for generating conditioned random fields of elastic properties based on CPT data.

  • example to be added to documentation

bramvandeneijnden and others added 23 commits June 13, 2024 17:07
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:   random_fields/geostatistical_cpt_interpretation.py
	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
import scipy.stats as st
import logging

from generate_field import RandomFields, ModelName

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work please change to random_fields.generate_field

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

…able figure sizes; update documentation for 2D and 3D random field visualizations.
Comment thread docs/conf.py Outdated
Comment thread docs/conf.py
import random_fields

project = 'RandomFields'
copyright = '2024, STEM team'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
copyright = '2024, STEM team'
copyright = '2025, STEM team'

Comment thread docs/tutorial_1.rst

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also test the tutorials, like we do in STEM, but maybe in another PR

Comment thread docs/tutorial_4.rst Outdated
Comment thread docs/tutorial_4.rst Outdated
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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else warning, property does not exist

Comment thread random_fields/utils.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing type hints

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")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this eps file be removed after the test?

brunozc and others added 8 commits January 15, 2025 21:02
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants