Getting started with Syncopy¶
Syncopy can be installed using Pip:
pip install esi-syncopy
Syncopy will soon be hosted on conda-forge as well. If you’re working on the ESI cluster installing Syncopy is only necessary if you create your own Conda environment.
Setting Up Your Python Environment¶
On the ESI cluster,
/opt/conda/envs/syncopy provides a
pre-configured and tested Conda environment with the most recent Syncopy
version. This environment can be easily started using the ESI JupyterHub
Syncopy makes heavy use of temporary files, which may become large (> 100 GB).
The storage location can be set using the environmental variable
by default points to your home directory:
The performance of Syncopy strongly depends on the read and write speed in this folder. On the ESI JupyterHub, the variable is set to use the high performance storage:
To start using Syncopy you have to import it in your Python code:
import syncopy as spy
All user-facing functions and classes can then be
accessed with the
spy. prefix, e.g.
Starting Up Parallel Workers¶
In Syncopy all computations are designed to run in parallel taking advantage of modern multi-core system architectures. The simplest way to leverage any available concurrent processing hardware is to use the parallel keyword, e.g.,
spy.freqanalysis(data, method="mtmfft", parallel=True)
This will allocate a parallel worker for each trial defined in data. If your code is running on the ESI cluster, Syncopy will automatically use the existing SLURM scheduler, in a single-machine setup, any available local multi-processing resources will be utilized. More details can be found in the Data Analysis Guide