TNO Intern

Resolve "Fix results=null bug"

Closes #83 (closed)

Merge request reports

Loading
+3 −0
Changes for src/pythermogis/thermogis_classes/doublet.py: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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

+14 −0
Changes for src/pythermogis/thermogis_classes/jvm_start.py: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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())
+1 −1

File changed.

Contains only whitespace changes.

+6 −1
Changes for tests/test_java_installation.py: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
from pythermogis import start_jvm
from pythermogis import print_java_path, print_thermogis_jar_path, start_jvm


def test_JVM_start():
    start_jvm()

def test_JVM_JAR_print():
    print_java_path()
    print_thermogis_jar_path()
 No newline at end of file
Loading