Setting up MaRGE - josalggui/MaRGE GitHub Wiki

Installation

** Prerequisites:**

  1. Python 3: Ensure you have Python 3 installed on your system. You can download it from here

  2. MaRCoS Server IP: Ensure your Red Pitaya is configured with a static IP in the range 192.168.1.101 to 192.168.1.132.

Step-by-step installation:

  1. Clone the required repositories in the same folder of the client computer:

    git clone https://github.com/vnegnev/marcos_client.git
    git clone https://github.com/vnegnev/marcos_server.git
    git clone https://github.com/vnegnev/marcos_extras.git
    git clone https://github.com/josalggui/MaRGE.git
    

    After cloning, your directory structure should look like this:

    parent_folder/
    ├── marcos_client/
    ├── marcos_server/
    ├── marcos_extras/
    └── MaRGE/
    
  2. Create and modify the configuration files:

    • local_config.py in the marcos_client folder: This file contains details about the Red Pitaya hardware, including its IP address and GPA board information.
    • hw_config.py in the MaRGE/configs folder: Contains information about the scanner hardware and Red Pitaya IP address.
    • sys_config.py in the MaRGE/configs folder: Contains settings related to the GUI session display.
    • units.py int the MaRGE/configs folder: This file typically doesn't need modification.

    NOTE 1: These files may not initially exist in the cloned repositories, but you can find copies of them in their corresponding folder.

    NOTE 2: Currently, MaRGE requires a Red Pitaya configured with a fixed IP in the range 192.168.1.101/132. Dynamic IP address has been successfully tested under Linux, and under Windows with some bugs.

  3. Set up bash: Set the bash_path variable in the hw_config.py file:

    • For Windows:
      bash_path = "C:/path/to/git_bash.exe"
      
    • For Ubuntu:
      bash_path = "gnome-terminal"
      
  4. Install required modules:

    pip install -r requirements.txt
    
  5. Install CUDA (Optional)
    Some postprocessing tools utilize the GPU for numerical calculations. To run these tools on the GPU, you'll need to install CUDA. Otherwise, the code will run on the CPU, which will be slower.

  6. Run MaRGE:

    python main.py
    

Troubleshooting Issues on Linux:

1. Qt Platform Plugin Error

  • Error Message:

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.   
    
  • Solution: Install libxcb-xinerama0

    sudo apt install libxcb-xinerama0
    

**2. Wayland Warning:

  • Warning Message:
    Ignoring XDG_SESSION_TYPE=wayland on Gnome.
    
  • Solution:
    • Disable wayland:
      sudo nano /etc/gdm3/custom.conf
      
    and uncomment the line WaylandEnable=false
    • Add the following line to /etc/environment:
      echo "QT_QPA_PLATFORM=xcb" | sudo tee -a /etc/environment
      

Summary:

  1. Ensure Python 3 is installed
  2. Configure Red Pitaya with an IP between 192.168.1.101 and 192.168.1.132
  3. Clone the necessary repositories into one folder
  4. Modify the configuration files for your setup
  5. Set up the bash path for communication
  6. Install required modules
  7. Run the application

By following these steps, you should be able to set up and run MaRGE on your computer. If you encounter any issues, refer to the documentation or open an issue on GitHub for help.