Skip to content

Commit

Permalink
Removed some comments
Browse files Browse the repository at this point in the history
Added output of scaling factors when using SURFACE in ERT in  test_integation.py
  • Loading branch information
oddvarlia committed Jan 28, 2024
1 parent 4f1443a commit 4da6a01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/semeio/workflows/localisation/local_script_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ def smooth_parameter(
dj = smooth_range_list[1]
scaling_values_smooth = np.ma.zeros(nx * ny * nz, dtype=np.float32)
for k, j0, i0 in itertools.product(range(nz), range(ny), range(nx)):
# index0 = i0 + j0 * nx + k * nx * ny
index0 = k + j0 * nz + i0 * nz * ny
if active_region_values_used[index0] is not ma.masked:
sumv = 0.0
Expand Down Expand Up @@ -819,7 +818,6 @@ def read_region_files_for_all_correlation_groups(user_config, grid):
for k, j, i in itertools.product(range(nz), range(ny), range(nx)):
# c-index order
index = k + j * nz + i * nz * ny
# index = i + j * nx + k * nx * ny
v = region_parameter_read[i, j, k]
region_parameter[index] = v
if grid.get_active_index(ijk=(i, j, k)) == -1:
Expand Down Expand Up @@ -1074,7 +1072,12 @@ def add_ministeps(
f"Scaling method: {corr_spec.surface_scale.method} "
"is not implemented"
)
if user_config.write_scaling_factors:
# Inactivate this temporarily untill pytest for this is ready
can_write_qc_data_for_surface = False
if (
user_config.write_scaling_factors
and can_write_qc_data_for_surface
):
ScalingValues.write_qc_parameter_surface(
node_name,
corr_spec.name,
Expand Down
2 changes: 2 additions & 0 deletions tests/workflows/localisation/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def test_localisation_surf():

ert = LibresFacade.from_config_file("poly.ert")
config = {
"write_scaling_factors": True,
"log_level": 3,
"correlations": [
{
Expand Down Expand Up @@ -179,6 +180,7 @@ def test_localisation_surf_const():

ert = LibresFacade.from_config_file("poly.ert")
config = {
"write_scaling_factors": True,
"log_level": 3,
"correlations": [
{
Expand Down
1 change: 0 additions & 1 deletion tests/workflows/localisation/test_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def create_region_parameter(
mask_used = np.isin(region_param, used_regions, invert=True)
region_param[np.logical_and(mask_used, ~inactive)] = ma.masked

# return region_param.ravel(order="F"), scaling_param.ravel(order="F")
return region_param.ravel(order="C"), scaling_param.ravel(order="C")


Expand Down

0 comments on commit 4da6a01

Please sign in to comment.