TNO Intern

Commit d54f13b5 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Adding the CLI

parent 47d24dee
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -23,6 +23,11 @@ def generate_thickness_permeability_transmissivity_for_pvalues(thickness_mean: f
    """
    if np.isnan(thickness_mean) | np.isnan(thickness_sd) | np.isnan(ln_permeability_mean) | np.isnan(ln_permeability_sd):
        return np.full(len(p_values), np.nan), np.full(len(p_values), np.nan), np.full(len(p_values), np.nan)

    if isinstance(p_values, np.int64) or isinstance(p_values, int):
        if p_values == 50:
            return np.array([thickness_mean]), np.array([ln_permeability_mean]), np.array([np.exp(np.log(thickness_mean) + ln_permeability_mean)])
    else:
        if len(p_values) == 1 and p_values[0] == 50:    # The only value where we analytically know the output is the P50
            return np.array([thickness_mean]), np.array([ln_permeability_mean]), np.array([np.exp(np.log(thickness_mean) + ln_permeability_mean)])

+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ from src.thermogis_classes.jvm_start import start_jvm


class PyThermoGIS(TestCase):
    test_files_out_path = Path(path.dirname(path.dirname(__file__)), "resources") / "test_output"
    test_files_out_path = Path(path.dirname(path.dirname(__file__)), "tests", "resources") / "test_output"

    def test_transmissivity_calculation(self):
        """
@@ -63,7 +63,7 @@ class PyThermoGIS(TestCase):
        #
        #   Plotting
        #
        plot = False
        plot = True
        if plot:
            # Plot the transmissivity as a function of pvalue for both the python and Java implementation
            fig, axes = plt.subplots(1, 4, figsize=(20, 10))