TNO Intern

Commit 007b7925 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Update the dependencies that are shipped with the pythermogis .whl file

parent 241a62f4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ def generate_thickness_permeability_transmissivity_for_pvalues(thickness_mean: f
    # Sampling method for transmissivity
    transmissivity_samples = np.sort(np.exp(ln_permeability_dist.rvs(nSamples) + np.log(thickness_samples)))

    sample_indexes = np.array(p_value_fractions * nSamples)
    sample_indexes = np.array(p_value_fractions * (nSamples-1))
    transmissivity_pvalues_sampled = transmissivity_samples[sample_indexes.astype(int)]

    return thickness_pvalues, permeability_pvalues, transmissivity_pvalues_sampled
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ class PyThermoGIS(TestCase):

    def test_doublet_speed(self):
        input_grids = self.read_input_grids()
        p_values = [10,50,90]
        p_values = [99]

        data = input_grids["thickness_mean"].data.flatten()
        non_nan_data = data[~np.isnan(data)]
@@ -29,13 +29,13 @@ class PyThermoGIS(TestCase):

        # Run calculation across all dimensions of input_grids, and all provided P_values: The Equivalent calculation with 10 cores takes 43 seconds in the Java code
        start = timeit.default_timer()
        calculate_doublet_performance_stochastic(input_grids, chunk_size=100, rng_seed=123, p_values=p_values)
        calculate_doublet_performance_stochastic(input_grids, chunk_size=5, rng_seed=123, p_values=p_values)
        time_elapsed = timeit.default_timer() - start
        print(f"Python calculation took {time_elapsed:.1f} seconds.")


    def read_input_grids(self):
        new_cellsize=5000 # in m
        new_cellsize=10000 # in m
        input_grids = resample_grid(read_grid(self.test_files_out_path / "ROSL_ROSLU__thick.zmap"), new_cellsize=new_cellsize).to_dataset(name="thickness_mean")
        input_grids["thickness_sd"] = resample_grid(read_grid(self.test_files_out_path / "ROSL_ROSLU__thick_sd.zmap"), new_cellsize=new_cellsize)
        input_grids["ntg"] = resample_grid(read_grid(self.test_files_out_path / "ROSL_ROSLU__ntg.zmap"), new_cellsize=new_cellsize)
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class PyThermoGIS(TestCase):
        ln_perm_mean = 5
        ln_perm_sd = 0.5
        nSamples = 100000
        p_values_list = [10, 20, 30, 40, 50, 60, 70, 80, 90]
        p_values_list = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90]

        #
        #   Python