diff --git a/src/pythermogis/__init__.py b/src/pythermogis/__init__.py index e8b76fdd8ed0934b59bc4a5753f436d23be4d636..6d77ee87309129c3994843f48a796cb2e98a1ee5 100644 --- a/src/pythermogis/__init__.py +++ b/src/pythermogis/__init__.py @@ -8,4 +8,4 @@ from pythermogis.doublet_simulation.deterministic_doublet import * from pythermogis.doublet_simulation.stochastic_doublet import * from pythermogis.plotting.plot_exceedance import plot_exceedance from pythermogis.dask_utils.auto_chunk import auto_chunk_dataset -from pythermogis.dask_utils.assess_optimal_chunk_size import assess_optimal_chunk_size \ No newline at end of file +from pythermogis.dask_utils.assess_optimal_chunk_size import assess_optimal_chunk_size diff --git a/src/pythermogis/thermogis_classes/doublet.py b/src/pythermogis/thermogis_classes/doublet.py index 3360a824e7ba0769e48cfff1785798bdf95501d1..c82e3fedb082401412e29e6ef347ac7d91331048 100644 --- a/src/pythermogis/thermogis_classes/doublet.py +++ b/src/pythermogis/thermogis_classes/doublet.py @@ -122,6 +122,9 @@ def calculate_performance_of_single_location(mask: float, depth: float, thicknes results = doublet.calculateDoubletPerformance(input) # If calculation was not successful, return mask value + if results is None: + return (mask_value,) * 14 + if results.utc() == -9999.0: return (mask_value,) * 14 diff --git a/src/pythermogis/thermogis_classes/jvm_start.py b/src/pythermogis/thermogis_classes/jvm_start.py index a4f72f3e4991bd6d68f1a43f12ff9842f0da126f..2bff18505c33780cf828b982eacb37da39145b40 100644 --- a/src/pythermogis/thermogis_classes/jvm_start.py +++ b/src/pythermogis/thermogis_classes/jvm_start.py @@ -48,3 +48,17 @@ def close_jvm(): """ if jpype.isJVMStarted(): jpype.shutdownJVM() + +def print_java_path(): + """ + This method prints the path to the JVM being used + :return: + """ + print(os.getenv("JAVA_HOME")) + +def print_thermogis_jar_path(): + """ + This method prints the path to the Thermogis Jar being used + :return: + """ + print(get_thermogis_jar_path()) diff --git a/tests/test_java_installation.py b/tests/test_java_installation.py index e9dccde089e5166a21e195839c27d7c0b1b61fd8..1dea75f33c3a547cb8e7cb20d0bd0e50b76ff032 100644 --- a/tests/test_java_installation.py +++ b/tests/test_java_installation.py @@ -1,4 +1,9 @@ -from pythermogis import start_jvm +from pythermogis import print_java_path, print_thermogis_jar_path, start_jvm + def test_JVM_start(): - start_jvm() \ No newline at end of file + start_jvm() + +def test_JVM_JAR_print(): + print_java_path() + print_thermogis_jar_path() \ No newline at end of file