TheAxonLab / hcph-sops

SOPs of the HCPh project
https://www.axonlab.org/hcph-sops/
Creative Commons Attribution 4.0 International
0 stars 6 forks source link

Set up EyeLink and PyEdfRead in 2024 #481

Open Evelyn92 opened 5 months ago

Evelyn92 commented 5 months ago

I found it a bit tricky to get pyEdfRead working in 2024. Here are the steps I followed to make the package work on my Windows system. Note that some updates differ from the instructions provided here: https://www.axonlab.org/hcph-sops/data-collection/notes-software/#conversion-of-et-recordings-into-bids

  1. Install EyeLink

    • The EyeLink MUST be installed before PyEDFRead and Pychopy.
    • Register a new account for downloading the EyeLink Developers Kits. https://www.sr-research.com/support/forumdisplay.php?fid=3
    • The activation of the new account might take up for 24 hours.
    • Install the EyeLink Developer Kit and EyeLink Data Viewer image
  2. Ensure you have installed the Microsoft C++ Build Tools.

    • Download them from the Visual Studio website. https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/
    • Make sure to select the "Desktop development with C++" workload during the installation.
    • Properly set up the environment variable:
      • For example on Windows system
        D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64
        D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include
  3. Prepare conda virtual env, with python version above 3.7. Some unexpected issues will occur if the python version=3.6 or below.

        $ condo create -n edfenv python=3.8
        $ conda activate edfenv
        $ pip install cython
        $ pip install pandas
         $ pip install h5py
    
  4. Modify the files in the directory of EyeLink for supporting Windows

    • Edit edftypes.h in the dir: C:\Program Files (x86)\SR Research\EyeLink\Includes\eyelink image
  5. Install pyedfread from the original repo:

    $ pip install git+https://github.com/s-ccs/pyedfread
oesteban commented 5 months ago

Thanks @Evelyn92 - our SOPs are only for Ubuntu installations, so I would like to add this as an appendix for Windows users. Does that make sense to you?

Evelyn92 commented 5 months ago

Thanks @Evelyn92 - our SOPs are only for Ubuntu installations, so I would like to add this as an appendix for Windows users. Does that make sense to you?

Hi @oesteban , that sounds like a great idea :)