-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix/thicknesses_ #112
base: master
Are you sure you want to change the base?
Fix/thicknesses_ #112
Conversation
…h, - use tmpfile to create temporary files, - added random test for mapdata functions:get/set working projection, - added functionality and comments to basal_contacts_build
…thicknesses_AR_2
map2loop/deformation_history.py
Outdated
@@ -30,7 +30,8 @@ def __init__(self): | |||
""" | |||
The initialiser for the deformation history. All attributes are defaulted | |||
""" | |||
self.minimum_fault_length_to_export = 500.0 | |||
|
|||
self.minimum_fault_length_to_export = 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a parameter that can be initialised?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case it's not user-defined, I think it would be better to automatically calculate the minimum fault length given the scale of the map
|
||
thickness_combined_results = pandas.concat(thickness_calculation_results, axis=1) | ||
|
||
self.stratigraphic_column.stratigraphicUnits.loc[:, 'ThicknessMean_ThicknessCalculatorAlpha'] = thickness_combined_results['ThicknessMean_ThicknessCalculatorAlpha'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you not just put the thickness_combined_results directly inside the stratigraphicUnits inside the for loop. This means you aren't hard coding the number of thickness calculators
("ThicknessMean_ThicknessCalculatorAlpha", float), | ||
("ThicknessMedian_ThicknessCalculatorAlpha", float), | ||
("ThicknessStdDev_ThicknessCalculatorAlpha", float), | ||
("ThicknessMean_InterpolatedStructure", float), | ||
("ThicknessMedian_InterpolatedStructure", float), | ||
("ThicknessStdDev_InterpolatedStructure", float), | ||
("ThicknessMean_StructuralPoint", float), | ||
("ThicknessMedian_StructuralPoint", float), | ||
("ThicknessStdDev_StructuralPoint", float), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to make this generic so that the user can specify thickness calculators to keep map2loop being modular?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed or tested the code but I have made some suggestions within the code.
My main comment for this PR is that the changes to the thickness calculators have not been implemented in the modular framework of map2loop. Instead of setting the list of thickness calculators within the method calling the thickness calculators, the list of thickness calculators should be managed by the project class. The default list can be hard coded using the current three, but the user should be able to call set_thickness_calculators and provide a custom list of thickness calculators.
This would mean, if the thicknesss calculators have any parameters e.g. the threshold angle for the structure point, or the interpolator type for the interpolated structure these could be set by the user and the thickness calculator objects can be set.
…thicknesses_AR_2
…thicknesses_AR_2
Summary of major changes:
load_hamersley_geology()
returns a gdf with the geology; structure and dtm are available, and others will be added later on. This is quite useful for tests, but should also be useful for when we implement [Feature Request] - create map2loop project from geopandas array not file paths #74. The only thing about this is the location, which implies a long import:from map2loop._datasets.geodata_files.hamersley import load_hamersley_geology
. Happy to change the file location - does anyone has a suggestion?Minimum fault length
is now a parameter of the config file, and it actually removes the faults with length under defined value.project.set_minimum_fault_length
method to avoid users setting the parameter twice.all_basal_contacts
object which are abnormal+basal contacts , andbasal_contacts
holds only the basal. Reconstruction ofsampled_basal_contacts
is based onbasal_contacts
thickness_calculator_alpha
to be coherent with the logic of the other thickness calculatorsmapdata.py
thickness_compute
inproject.py
summary of other minor modifications:
tmpfile
is now used to create the localGdalfileos.path.join
topathlib.Path
where possibleuser_defined_stratigraphic_column
are in the geology file (otherwise project creation fails; at least now user has a warning).distance
tostratigraphic_distance
inbasal_contacts
creationset_
andget_thickness_calculator
Fixes #86
Fixes #110
Fixes #111
Fixes #12
Type of change
How Has This Been Tested?
The branch is fix/thicknesses_AR_2.
Checklist: