From 8d5fa30b301102d49e351cfe3151b9ff7be62358 Mon Sep 17 00:00:00 2001 From: bretth Date: Fri, 21 Nov 2025 13:23:19 +0100 Subject: [PATCH 1/4] Update the dependencies that are shipped with the pythermogis .whl file --- pyproject.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0d02ebf..909980a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,11 +17,9 @@ requires-python = ">=3.11" dependencies = [ "jpype1>=1.5.2,<2", "xarray==2024.9.0.*", - "pandas>=2.2.3,<3", "pytz>=2024.1,<2025", - "build>=1.2.2.post1,<2", - "pygridsio>=1.0,<2.0", - "python-dotenv>=1.2.1,<2" + "python-dotenv>=1.2.1,<2", + "dask>=2025.5.1,<2026" ] -- GitLab From 241a62f40df044c5a72ffda9d47c2ea7e6bf75b8 Mon Sep 17 00:00:00 2001 From: bretth Date: Fri, 21 Nov 2025 13:25:24 +0100 Subject: [PATCH 2/4] Update the dependencies that are shipped with the pythermogis .whl file --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 909980a..60532c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,10 @@ requires-python = ">=3.11" dependencies = [ "jpype1>=1.5.2,<2", "xarray==2024.9.0.*", + "pandas>=2.2.3,<3", "pytz>=2024.1,<2025", + "build>=1.2.2.post1,<2", + "pygridsio>=1.0,<2.0", "python-dotenv>=1.2.1,<2", "dask>=2025.5.1,<2026" ] -- GitLab From 007b79257af2dc9daf87413716fa689a3a71ee2a Mon Sep 17 00:00:00 2001 From: bretth Date: Fri, 21 Nov 2025 13:58:15 +0100 Subject: [PATCH 3/4] Update the dependencies that are shipped with the pythermogis .whl file --- .../transmissivity/calculate_thick_perm_trans.py | 2 +- tests/test_doublet_speed.py | 6 +++--- tests/test_transmissivity_calculation.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pythermogis/transmissivity/calculate_thick_perm_trans.py b/src/pythermogis/transmissivity/calculate_thick_perm_trans.py index aa485e7..9b3bd30 100644 --- a/src/pythermogis/transmissivity/calculate_thick_perm_trans.py +++ b/src/pythermogis/transmissivity/calculate_thick_perm_trans.py @@ -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 diff --git a/tests/test_doublet_speed.py b/tests/test_doublet_speed.py index 36be0e5..b9da7a4 100644 --- a/tests/test_doublet_speed.py +++ b/tests/test_doublet_speed.py @@ -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) diff --git a/tests/test_transmissivity_calculation.py b/tests/test_transmissivity_calculation.py index aaaf24d..ac4e08c 100644 --- a/tests/test_transmissivity_calculation.py +++ b/tests/test_transmissivity_calculation.py @@ -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 -- GitLab From 41213c12d3f7e0e1d7f05195f7ea7fec71e3e88c Mon Sep 17 00:00:00 2001 From: bretth Date: Fri, 21 Nov 2025 14:49:13 +0100 Subject: [PATCH 4/4] Updating the changelog --- docs/changelog.md | 6 ++++-- pixi.lock | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 24a8d1c..05f4a84 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -13,6 +13,8 @@ We also recognise that having to replace the Jar file everytime we update it is Fixing a bug caused by the update in the Jar file. calculateDoubletPerformance in the Java source code returns Null if one of the optimizers failed. Pythermogis was still expecting a DoubletOutput class with all values set to -9999 in case of optimizer failure. -Additionally: - - two functions have been added to print out the environment variables THERMOGIS_JAR and JAVA_HOME. This enables users to debug if their are issues with their installation +Another bug was fixed, this occured when sampling for transmissivity with high or low p-values which caused an indexing error. + +Additional Functionality: + - two functions have been added to print out the environment variables THERMOGIS_JAR and JAVA_HOME. This enables users to debug if their are issues with their installation. diff --git a/pixi.lock b/pixi.lock index b3ca555..8de774a 100644 --- a/pixi.lock +++ b/pixi.lock @@ -4830,7 +4830,7 @@ packages: - pypi: ./ name: pythermogis version: 1.2.1 - sha256: 0ae9336fdba95931a8e5b2b0ce4a61acd3bcd3c3d685b2292b11e436d43245b0 + sha256: adc786bc376cdca6369d5cb58bd4bc7597c9c00a620cbeef48d591239c4ad966 requires_dist: - jpype1>=1.5.2,<2 - xarray==2024.9.0.* @@ -4839,6 +4839,7 @@ packages: - build>=1.2.2.post1,<2 - pygridsio>=1.0,<2.0 - python-dotenv>=1.2.1,<2 + - dask>=2025.5.1,<2026 requires_python: '>=3.11' editable: true - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.3-hf636f53_101_cp313.conda -- GitLab