Svarog/Users Manual/Compiling Svarog

Z Brain-wiki

Svarog isn't yet really distributed as a compiled package, so it is best to use the source from the repository and compile and run.

How to download the development version

It's best to download the sources using git.

 git clone git://

This will create directory svarog populated with the latest version.

If you can't/don't want to use git, you can go to and download one of the .tar.bz2 or .zip archives using the links on the right hand side.


  1. You will need maven.
  2. protoc from Google Protocol Buffers version 2.4.x

How to compile svarog and plugins

Change into the directory svarog and execute

mvn clean package

This will download the necessary maven plugins and also some libraries needed by Svarog which are distributed separately.
Downloaded files go by default into ~/.m2/repository.

This command also creates a package of Svarog complete with dependencies in one file (svarog/target/

How to run (svarog and plugins)

In the toplevel svarog repository execute

 mvn -pl svarog exec:java

When run as a binary, svarog accepts the following options:

usage: /usr/bin/svarog <options>
  -D <arg>        define java property (allowed multiple times)
  -h,--help       display help
  -m,--moltest    include test method
  -R,--reset      reset workspace settings
  -s,--nosplash   don't display splash screen

Those options can be passed to Svarog when launching Svarog using Maven by setting -Dexec.args=.... E.g.

 mvn -pl svarog exec:java -Dexec.args=--nosplash

Some options can only be set using Java properties. When using maven to launch Svarog, properties can be set using -Dproperty=value.

Useful options include:

  • log4j.debug=true debug log4j configuration. This is useful to see why logging messages are displayed (or not).
  • signalml.root specifies the location of the Svarog settings directory.
  • svarog.security_manager=enforcing/permissive/off. The default is currently off. See javadoc:org/signalml/app/SvarogSecurityManager.html for more information.

Accessing and generating documentation

Code is documented through java-docs, which can be accessed online

This documentation can be also generated from the source tree:

 mvn install
 mvn javadoc:javadoc

The generated documents are in the directory target/site/apidocs under the source tree.

Compiling and running just Svarog

If you are not working on the plugins, they don't have to be rebuilt constantly. Compile only svarog with:

 mvn -pl svarog compile
 mvn exec:java


On Ubuntu 10.4

[INFO] Unable to find resource 'flanagan:flanagan:pom:1.0.3' in repository central (
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1078 source files to /home/adam/svarog/svarog/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
Please ensure you are using JDK 1.4 or above and
not a JRE (the class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.

Instaling openjdk-6-jdk (sudo apt-get install openjdk-6-jdk) helps.

On various systems

[INFO] Compilation failure

org.signalml.multiplexer.protocol.SvarogProtocol.Variable is not
abstract and does not override abstract method
newBuilderForType( in

org.signalml.multiplexer.protocol.SvarogProtocol.Variable.Builder is not
abstract and does not override abstract method
internalGetFieldAccessorTable() in

org.signalml.multiplexer.protocol.SvarogProtocol.VariableVector is not
abstract and does not override abstract method
newBuilderForType( in

protoc has wrong version. It should be 2.4.

Installing Svarog from a Debian package (experimental)

  1. Put svarog.list in directory /etc/apt/sources.list.d/.:
    sudo wget -O/etc/apt/sources.list.d/svarog.list
  2. Install the gpg key used to verify package signatures:
    sudo apt-key adv --keyserver --recv-keys 46F44D47

    or alternatively

    wget -O- | sudo apt-key add -

    Warning: the key will be changed, right now it is my personal key.

  3. Update the list of available packages with
    sudo apt-get update
  4. Svarog can be installed with
    sudo apt-get install svarog

This package does not work on UBUNTU.


Examples of biomedical signals that can be viewed using Svarog can be found here. One can download them using wget.

wget -np -r -l5 -c

Warning: The files are big.

First run

During the first run of Svarog user makes important decisions about Svarog's appearance.

  1. Chooses the language Svarog is going to use — either English or Polish (Fig. Figure 1).
  2. Chooses directory, where Svarog will store its configuration and files (Fig. Figure 2). One can store them in signalml directory inside default home or choose custom location (Fig. Figure 3).
    Plik:Svarog 1 uruchomienie 2.png
    Choosing location of configuration storage.
  3. To change the chosen language it is necessary to remove the signalml directory.
  4. Before accessing Svarog GUI Figure 5, one gets the final warning Figure 4.

Disabling warnings

Default Svarog warnings might be annoying. In order to disable them, choose Edit -> Preferences. Open tab Miscellaneous, choose Disable serious warning dialagos for preset operations as in Fig Figure 6.

Loading signals

How to load signal:

Viewing books

How to open and browse books (representations of signals obtained by MP decomposition).

Recording signals

How to record signals using Svarog.


How to change, choose and save signal montages.


How to filter the signal.

Tagging signals

How to tag an offline signal.

Online/Offline FFT tool

How to check the frequency content using FFT.

Signal decomposition using Matching Pursuit

How to decompose the signal using the Matching Pursuit algorithm

Average Evoked Potentials

How to compute Average Evoked Potentials using Svarog.

Automatic sleep staging

How to automatically stage sleeps EEG, obtaining a polysomnogram.

Automatic artifact detection

How to perform automatic EEG artifact detection using Svarog.

Preset interface in Svarog

Saving configuration and settings in Svarog.

Export to EEGLab

Svarog allows to export the currently opened signal to EEGLab.

How to

  1. Change electrode names.
  2. Check quality of the signal received online.
  3. Add EEG cap type