Skip to content

Tests

Check if the module has been installed

After installing the module with pip (as described here), you can check that the module has been actually installed in your environment by opening a Python terminal and trying to import the module:

import omegapy
import omegapy.omega_data as od
import omegapy.omega_plots as op
import omegapy.useful_functions as uf

If these commands do not raise any error, the OMEGA-Py module is installed in your Python environment.

Failure

If the module is not available, here are a few things that you can try:

  • Restart your terminal or application to reload the environment.
  • Check that you are in the expected Python environment.
  • Re-install the module:
     pip3 install omegapy
    

If it is still not working, does it work if you try to install an other module? Search for how to install a Python module with your local setup.

Check the module version

You can also check that you have the latest version of the module installed:

omegapy-version

From a Python console

omegapy.__version__

From a terminal with pip

pip freeze | grep omegapy

Failure

If you don't have the last version, update it with

pip3 install omegapy --upgrade

Check the paths configuration

Please refer to this page for how to configure the default paths for the OMEGA binary and the omegapy-made files.

You can check the values stored in them by displaying the output of od.get_omega_bin_path() (OMEGA .QUB & .NAV binary files) and od.get_omega_py_path() (omegapy-made files).

Failure

If these functions do not return the expected path, please refer to this paragraph and use the od.set_omega_bin_path() and od.set_omega_py_path() functions.

Test to process and display an OMEGA observation

The final test would be to actually download and process an OMEGA observation.

For instance, download the data from cube 3 of orbit 0979:

Then run the code of the basic usage example. You should be able to load, process, and display this OMEGA observation.

Failure

  • If encountering an error in the data loading/processing, check your installation with the above steps.
  • If encountering an error with displaying the interactive map, check that you have an appropriate matplotlib backend installed and activated (e.g., PyQt5) and refer to this paragraph.