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

Relative density function not working properly #34

Open
MattBrst opened this issue Sep 18, 2024 · 2 comments
Open

Relative density function not working properly #34

MattBrst opened this issue Sep 18, 2024 · 2 comments

Comments

@MattBrst
Copy link
Contributor

MattBrst commented Sep 18, 2024

Problem
The recently added 'relative density calculation' yields a None value, which is not what I expect. Please find below my code and GEF file:

# Read file
cpt_file_gef = <GEF filename including path>
from geolib_plus.gef_cpt import GefCpt
cpt_gef = GefCpt()
cpt_gef.read(cpt_file_gef)
cpt_gef.pre_process_data()

# Interpretation
from geolib_plus.robertson_cpt_interpretation import RobertsonCptInterpretation
interpreter = RobertsonCptInterpretation()
cpt_gef.interpret_cpt(interpreter)

# Show results
print('Lithology: ', cpt_gef.lithology)
print('Relative density: ', cpt_gef.relative_density)`

GEF file: CPT000000092361_IMBRO.zip

Workaround
When I paste the whole contents of the file 'robertson_cpt_interpretation.py' at the top of this script (and remove the import statement on line 12) I actually get a relative density value, However, I would be happy if anyone has a more elegant solution or suggestions.

@EleniSmyrniou
Copy link
Collaborator

EleniSmyrniou commented Sep 19, 2024

Just a few days ago I had a similar problem. The interpret_cpt does not call the relative_density_calc which is probably a bug. My workaround is as follows

cpt = geolib_plus.gef_cpt.GefCpt()
cpt.read(filepath=filename_cpt)
cpt.pre_process_data()
interpreter = geolib_plus.robertson_cpt_interpretation.RobertsonCptInterpretation()
cpt.interpret_cpt(interpreter)
interpreter.relative_density_calc(method=geolib_plus.robertson_cpt_interpretation.RelativeDensityMethod.BALDI)

Does this help?

@MattBrst
Copy link
Contributor Author

MattBrst commented Sep 19, 2024

Your workaround works.

When I compare the different methods, I notice a difference between line 589 and line 730. In 589 the default method is mentioned, whereas this is missing in 730.

I would expect line 730 to become: method: RelativeDensityMethod **_= RelativeDensityMethod.BALDI_**,

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

No branches or pull requests

2 participants