TNO Intern

Commit 611959d4 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Replacing the old file structure

parent c4ab84c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pythermogis"
version = "0.1.13"
version = "0.1.14"
description = "This is a Python API to the ThermoGIS Java code"
authors = [{ name = "Brett", email = "hen.brett@tno.nl" }]
readme = "README.md"
+2 −2
Original line number Diff line number Diff line
@@ -8,14 +8,14 @@ def get_jvm_path() -> str:
    """
    From the resources directory, return the path to the packages Java interpreter
    """
    return str(files("pythermogis") / "pythermogis" / "resources" / "java" / "coretto-17" / "bin" / "server" / "jvm.dll")
    return str(files("pythermogis") / "resources" / "java" / "coretto-17" / "bin" / "server" / "jvm.dll")


def get_thermogis_jar_path() -> str:
    """
    From the resources directory, return the path to the ThermoGIS Jar
    """
    return str(files("pythermogis") / "pythermogis" / "resources" / "thermogis_jar" / "thermogis-1.7.0-shaded_newprops.jar")
    return str(files("pythermogis") / "resources" / "thermogis_jar" / "thermogis-1.7.0-shaded_newprops.jar")


def start_jvm():
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ import xarray as xr
from jpype.types import *
from pygridsio.pygridsio import read_grid

from pythermogis.pythermogis import calculate_doublet_performance
from pythermogis import calculate_doublet_performance
from pythermogis.thermogis_classes.jvm_start import start_jvm


+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ import shutil
import numpy as np
from pygridsio.pygridsio import read_grid

from pythermogis.pythermogis import calculate_doublet_performance
from pythermogis import calculate_doublet_performance


class PyThermoGIS(TestCase):
@@ -22,7 +22,7 @@ class PyThermoGIS(TestCase):
    def tearDown(self):
        shutil.rmtree(self.test_files_out_path)

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

+3 −5
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@ import numpy as np
import xarray as xr
from jpype.types import *

from pythermogis.statistics import generate_thickness_permeability_transmissivity_for_pvalue, \
    generate_thickness_permeability_transmissivity_for_pvalues
from pythermogis.statistics.calculate_thick_perm_trans import generate_thickness_permeability_transmissivity_for_pvalues, generate_thickness_permeability_transmissivity_for_pvalue
from pythermogis.thermogis_classes.jvm_start import start_jvm


@@ -28,7 +27,7 @@ class PyThermoGIS(TestCase):
        thickness_sd = 5
        ln_perm_mean = 5
        ln_perm_sd = 0.5
        nSamples = 100000000
        nSamples = 10000000000
        p_values_list = [10, 20, 30, 40, 50, 60, 70, 80, 90]

        #
@@ -107,7 +106,7 @@ class PyThermoGIS(TestCase):
        thickness_sd = 5
        ln_permeability_mean = 5
        ln_permeability_sd = 0.5
        nSamples = 10000
        nSamples = 1000000000
        p_values_list = [10, 20, 30, 40, 50, 60, 70, 80, 90]


@@ -135,7 +134,6 @@ class PyThermoGIS(TestCase):
                                                                 vectorize=True
                                                                 )


    def generate_transmissivity_java(self, ln_perm_mean, ln_perm_sd, nSamples, p_values_list, thickness_mean, thickness_sd):
        start_jvm()
        RNG = JClass("tno.geoenergy.stochastic.RandomNumberGenerator")