OSVE C++ Library (For OSVE Developers )

Getting started with prerequisites

Create the baseline structure (common to all the os)

  • [Create the baseline structure](BASELINE.md)

OSVE Dependencies

In order to build OSVE, some other repositories shall be cloned at the OSVE parent folder. - MAPPS_JUI repository at “osve_develop” branch. From PSS / ESAC / ESA. - INSTALL repository at “master” branch. From JUICE_SOC / ESAC / ESA.

Build OSVE

In order to build the tool it is enough to run the build scripts contained in the scripts folder of the phs-dev.

The script will perform the following steps: - make sure all the relative path are resolved to the machine specific absolute path. - delete old temporary build files. - setting the cmake parameters. - generate the cmake files. - build OSVE source code.

Specifically those are the OS specific commands: 1. For LINUX move to phs-dev folder and type:

$ ./scripts/build_linux.sh
  1. For MAC INTEL move to phs-dev folder and type:

$ ./scripts/build_mac_intel.sh
  1. For MAC M1 move to phs-dev folder and type:

$ ./scripts/build_mac_m1.sh

The build tool will generate the 3 following dynamic libraries:

  • For LINUX: libosve-if.so

  • For MAC INTEL: libosve-if.dylib

  • For MAC M1: libosve-if.dylib

Testing OSVE

In order to launch the test the following scripts shall be called depending on the OS: 1. For LINUX move to phs-dev folder and type:

$ ./scripts/run_tests_lin.sh
  1. For MAC INTEL move to phs-dev folder and type:

$ ./scripts/run_tests_intel.sh
  1. For MAC M1 move to phs-dev folder and type:

$ ./scripts/run_tests_m1.sh

The output will look like:

rvalles@ubuntu:~/juice/osve/scripts$ ./run_tests_linux.sh
...
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/rvalles/juice/osve
plugins: anyio-4.0.0
collected 11 items

../validation/osve/test_regression.py ...........                                                                                                [100%]

============================================================ 11 passed in 424.83s (0:07:04) ============================================================

The test will go throught the list of tests as defined in the validation/osve/test_regression.py file and compare it with the reference data.

#
#
#  ===============================================================================================================
#           TESTS DEFINITIONS
#  ===============================================================================================================

def test_0001_minor_moons(self):
    self.run_pt_test("test_0001_minor_moons")

def test_0002_jupiter(self):
    self.run_pt_test("test_0002_jupiter")

def test_0003_scenario(self):
    self.run_pt_test("test_0003_scenario")

def test_0004_SJS0004C50A(self):
    self.run_pt_test("test_0004_SJS0004C50A")

def test_0005_single_block(self):
    self.run_pt_test("test_0005_single_block")

def test_0006_SJS0004C50A_V2(self):
    self.run_pt_test("test_0006_SJS0004C50A_V2")

def test_0007_crema_5_0_spice(self):
    self.run_sr_test("test_0007_crema_5_0_spice")

def test_0008_SHT_125_test_case_1(self):
    self.run_sr_test("test_0008_SHT_125_test_case_1", mk_rel_path="phs_osve_sri_osve_crema_5_0_relative.tm")

def test_0009_osve_validation(self):
    self.run_sr_test("test_0009_osve_validation")

def test_0010_S003_01_7E1_320630_320704(self):
    self.run_sr_test("test_0010_S003_01_7E1_320630_320704")

def test_0011_PJ12_data_handling(self):
    self.run_sr_test("test_0011_PJ12_data_handling", mk_rel_path="None")

Assuming the new tests have the same structure as the existing one, in order to add a new test simply add a new line: In the entry call you should specify the follow:

def test_00NN_BLABLA(self):
    self.run_pt_test("test_00NN_BLABLA")

Historically OSVE had two different entry points or interfaces: “The Pointing Tool API” and the “Segmentation Reporter API”. Currently both APIs are merged into only one API or entry point called “execute” method. This method has the same functionality of the old APIs and the expected behaviour is extracted from the Session File. But note that is some places there are still some names doing reference to this Pointing Tool “PT” or to the Segmentation Reported “SR” in the tests names, source code or in the documentation.

As you can see in the methods definitions, the only difference between the “PT” and “SR” are just the names of the input files and the reference files for historical reasons:

def run_pt_test(self, test_rel_path):
    self.run_test(os.path.join("osve-if", test_rel_path), "KERNEL/meta_relative.tm", "OUTPUT",
                  self.pt_custom_checks, "session_file.json")

def run_sr_test(self, test_rel_path, mk_rel_path="Generic_meta_kernel_crema_5_0_relative.tm"):
    self.run_test(os.path.join("osve-if", test_rel_path), mk_rel_path, "output",
                  self.sr_custom_checks, "config_osve_template.json")

The previous entry correspond the following test:

validation/osve/osve-if/test_0009_osve_validation
└───eps_package
      ├───CONFIG
      │   ├───AGE
      │   ├───ISE
      |   └───top_obs_dummy.def
      ├───output
      │   ├───eps_output
      │   └───ref
      │       └───eps_output
      ├───target
      │  ├───EDF
      │  ├───eps_output
      │  ├───ITL
      |  ├───other_osve_ouput
      |  ├───downlink.evf
      |  ├───spice_segmentation_attitude_5_0.ptx
      │  └───TOP_events.evf
      ├───config_osve_template.json
      └───Generic_meta_kernel_crema_5_0_relative.tm

So in the call parameters of the run_test function it is possible to find the info about the location of the kernels or output files

Release OSVE

  • [Release](RELEASE.md)

Calling OSVE with a Session File

All the details about the Session File can be found at: [Session File](SessionFile.md).