Dokumentacja SVAROG
Spis treści
- 1 Compiling and running Svarog
- 2 How to download the development version
- 3 Requirements
- 4 How to compile svarog and plugins
- 5 How to run (svarog and plugins)
- 6 Accessing and generating documentation
- 7 Compiling and running just Svarog
- 8 Troubleshooting
- 9 Installing Svarog from a Debian package (experimental)
- 10 Examples
- 11 First run
- 12 Disabling warnings
- 13 Loading signals
- 14 Viewing books
- 15 Recording signals
- 16 Montage
- 17 Filtering
- 18 Tagging signals
- 19 Online/Offline FFT tool
- 20 Signal decomposition using Matching Pursuit
- 21 Average Evoked Potentials
- 22 Automatic sleep staging
- 23 Automatic artifact detection
- 24 Preset interface in Svarog
- 25 Export to EEGLab
- 26 How to
Compiling and running Svarog
How to download and compile Svarog on your computer. What to expect during the first run.
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://escher.fuw.edu.pl/git/svarog
This will create directory svarog populated with the latest version.
If you can't/don't want to use git, you can go to http://escher.fuw.edu.pl/git/svarog and download one of the .tar.bz2 or .zip archives using the links on the right hand side.
Requirements
- You will need maven.
- 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/svarog-0.5.0-SNAPSHOT.one-jar.jar
).
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 http://signalml.org/svarog/apidocs/index.html.
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
Troubleshooting
On Ubuntu 10.4
[INFO] Unable to find resource 'flanagan:flanagan:pom:1.0.3' in repository central (http://repo1.maven.org/maven2) [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 1078 source files to /home/adam/svarog/svarog/target/classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure Unable to locate the Javac Compiler in: /usr/lib/jvm/java-6-openjdk/jre/../lib/tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main 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 /home/svarog/tmp/s6/svarog/target/generated-sources/org/signalml/multiplexer/protocol/SvarogProtocol.java:[11,22] org.signalml.multiplexer.protocol.SvarogProtocol.Variable is not abstract and does not override abstract method newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent) in com.google.protobuf.GeneratedMessage /home/svarog/tmp/s6/svarog/target/generated-sources/org/signalml/multiplexer/protocol/SvarogProtocol.java:[165,24] org.signalml.multiplexer.protocol.SvarogProtocol.Variable.Builder is not abstract and does not override abstract method internalGetFieldAccessorTable() in com.google.protobuf.GeneratedMessage.Builder /home/svarog/tmp/s6/svarog/target/generated-sources/org/signalml/multiplexer/protocol/SvarogProtocol.java:[342,22] org.signalml.multiplexer.protocol.SvarogProtocol.VariableVector is not abstract and does not override abstract method newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent) in com.google.protobuf.GeneratedMessage ...
protoc has wrong version. It should be 2.4.
Installing Svarog from a Debian package (experimental)
- Put svarog.list in directory /etc/apt/sources.list.d/.:
sudo wget -O/etc/apt/sources.list.d/svarog.list http://escher.fuw.edu.pl/debian/svarog.list
- Install the gpg key used to verify package signatures:
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 46F44D47
or alternatively
wget -O- http://escher.fuw.edu.pl/debian/gpg.key | sudo apt-key add -
Warning: the key will be changed, right now it is my personal key.
- Update the list of available packages with
sudo apt-get update
- Svarog can be installed with
sudo apt-get install svarog
This package does not work on UBUNTU.
Examples
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 http://brain.fuw.edu.pl/~zbyszek/dane
Warning: The files are big.
First run
During the first run of Svarog user makes important decisions about Svarog's appearance.
- Chooses the language Svarog is going to use — either English or Polish (Fig. Figure 1).
- 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).
- To change the chosen language it is necessary to remove the signalml directory.
- 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.
Montage
How to change, choose and save signal montages.
Filtering
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.