To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 824c8ed5 authored by Feliks Kiszkurno's avatar Feliks Kiszkurno
Browse files

changed create data

parent 4e651b47
......@@ -21,11 +21,11 @@ from datetime import datetime
settings.init()
# Config
create_new_data = False # set to True if you need to reassign the classes
create_new_data = True # set to True if you need to reassign the classes
invert_existing_data = False # invert existing measurements
create_new_data_only = False # set to False in order to run ML classifications
create_new_data_only = True # set to False in order to run ML classifications
reassign_classes = False; class_type = 'norm'
param_path = os.path.abspath(os.path.join(os.getcwd()) + '/' + 'TestDefinitions/4case_balanced.csv')
param_path = os.path.abspath(os.path.join(os.getcwd()) + '/' + 'TestDefinitions/sen_study.csv')
test_definitions.init(path=param_path)
# Load existing data instead of creating new one.
......
......@@ -20,10 +20,10 @@ import settings
def create_data(test_name, test_config, max_depth, *, lambda_param=20, z_weight=0.6):
world_boundary_v = [-200, 0] # [NW edge] relatively to the middle
world_boundary_h = [200, -100] # [SE edge]
# world_boundary_v = [-500, 0] # [right, left border] relatively to the middle
# world_boundary_h = [500, -100] # [top, bottom border]
#world_boundary_v = [-200, 0] # [NW edge] relatively to the middle
#world_boundary_h = [200, -100] # [SE edge]
world_boundary_v = [-1000, 0] # [right, left border] relatively to the middle
world_boundary_h = [1000, -100] # [top, bottom border]
test_results = {}
......@@ -43,7 +43,8 @@ def create_data(test_name, test_config, max_depth, *, lambda_param=20, z_weight=
slopestabilitytools.save_plot(fig_geometry, test_name, '_1_geometry')
measurement_scheme = ert.createERTData(
elecs=np.linspace(start=-32, stop=32, num=44),
#elecs=np.linspace(start=-32, stop=32, num=44),
elecs=np.linspace(start=-50, stop=50, num=100),
schemeName='dd')
for electrode in measurement_scheme.sensors():
......@@ -77,13 +78,17 @@ def create_data(test_name, test_config, max_depth, *, lambda_param=20, z_weight=
k0 = pg.physics.ert.createGeometricFactors(data)
#inversion_Domain = mt.createMesh(mt.createRectangle([-35, 0], [35, -25], quality=34, area=1))
#inversion_mesh = pg.meshtools.appendTriangleBoundary(inversion_Domain, marker=0, xbound=30, ybound=30)
model_inverted = ert_manager.invert(data=data, lam=lambda_param, paraDX=0.25, paraMaxCellSize=2, zWeight=z_weight, # paraDepth=2 * max_depth,
model_inverted = ert_manager.invert(data=data, lam=lambda_param, paraDX=0.25, paraMaxCellSize=2, zWeight=z_weight, paraDepth=15,
quality=34, zPower=0.4)
result_full = ert_manager.inv.model
result_array = result_full.array()
limits = pg.utils.interperc(ert_manager.inv.model, trimval=10.0)
result_array[result_array <= limits[0]] = limits[0]
result_array[result_array >= limits[1]] = limits[1]
fig_result, ax_result = plt.subplots(1)
pg.show(ert_manager.paraDomain, result_full, label=pg.unit('res'), showMesh=True, ax=ax_result)
ax_result = slopestabilitytools.set_labels(ax_result)
......@@ -139,6 +144,7 @@ def create_data(test_name, test_config, max_depth, *, lambda_param=20, z_weight=
rho_max = np.max(rho_arr)
rho_min = np.min(rho_arr)
result_array_norm = np.log10(result_array)
# result_array_norm = slopestabilitytools.normalize(result_array)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment