top of page

How to Install SynaptiQs?

On Windows 7-8

WinPython, SynaptiQs & OpenElectrophy setup

Step 1: Install

First Download and Install WinPython 32 bits (here
Last tested version is Winpython 2.7.10.2

Launch WP Control Panel in WinPython folder.

in WP Control Panel, Install manually (just drag and drop the tar.gz file in the window)

MySQL-python 1.2.5

quantities 0.10.1

igor 0.2

sqlalchemy-migrate-0.7.2

mdp 3.3

IMPORTANT : if you install a recent version of winpython, you might have to downgrade to SQLAlchemy 0.8.7 or below (problem with version >0.9 still to be identified that result in incomplete file import)

(optional) in WP Control Panel, you can register this installation as your default python installation using "advanced" "Register Ditribution"

UnZip SynaptiQs Install File in the WinPython folder

SynaptiQs contains a local, modified copy of OpenElectrophy 0.2 so no installation is needed

 

After following these steps Check that you have

./WinPython-32bit-2.7.*/Script/SynaptiQs   ---> The Software code can be obtained here
./WinPython-32bit-2.7.*/Settings/.SynaptiQs/   ---> Local parameters and personalized python Scripts

 

et voila!

Step 2: Optimize queuepool (For MySQL queries)

Too much queries cause a bug in the software. You can solve this problem by making some changes in the following file :

in .\WinPython-32bit-2.7.3.2\python-2.7.3\Lib\site-packages\sqlalchemy\    open     pool.py


find:

class QueuePool(Pool):

and replace:

    def __init__(self, creator, pool_size=5, max_overflow=10, timeout=30,
                 **kw):

by:

    def __init__(self, creator, pool_size=0, max_overflow=-1, timeout=30,
                 **kw):

and save. You can open and save the files in Spyder

SQL Tools:​

To manage your SQL files, you can use
-SQLiteman for SQLite databases
-MySQL Workbench and/or phpmyadmin for MySQL databases.

SQL database configuration (for SQLite, step 1 & 2 only).​

Step1, Create a database.



Launch SynaptiQs, Menu File, create db.

You can choose the type of database you want : MySQL or SQLite. To use a MySQL Database, you will need a database server. If You're the only user, a SQLite database would be easier to use. 


Step2, adding tag column (SQLite & MySQL):


after creating a database, you must add an Analogsignal.tag column. You can use the edit DB structure tool in the File Menu. Actually, you can add here all the fields you will need.


Step 3, No TEXT or too long VARCHAR fields in the analogsignal table (MySQL only).

for that, you can enter the following lines in mySQL workbench. You login to your server, select your database, then execute the following commands (separately):

ALTER TABLE analogsignal CHANGE name name varchar(24)
ALTER TABLE analogsignal CHANGE tag tag varchar(512)

Conversion in Varchar must be applied to every TEXT fields in the analogsignal table. In varchar(value), "value" indicates the max length of the field (so there will be no names longer than 24 letters here) but the total of varchar must not be superior to 1000, or the indexation won't work. Good indexation is essential for SynaptiQs.

N.B., the execution of this comand may takes a while, especially if there are already some data in your database. Don't interrupt it!

Step 4, indexing the analogsignal table (MySQL only).


This step is necessary to speed up queries, because AnalogSignal table contains a blob column with the data. Thus this table is extremely big, and queries are slow except if you index all the other fields.
To do so, in MySQL Workbench, index all the columns except the signal by executing. The index name is
Index_Core here but can be changed:

ALTER TABLE  `database_name`.`analogsignal` DROP INDEX  `Index_Core` 
ADD INDEX  `Index_Core` (  `id` ,  `id_segment` ,  `id_recordingpoint` ,  `channel` ,  `t_start` ,  `sampling_rate` , 
 `signal_shape ` , `name` ,  `tag` )

Where database_name is the name of your database. In the second line, you should add all the new columns you created in analogsignal, that you will use for filtering... The columns listed here are the defaults one.

 

Tips: Changing database Structure at the beginning is much faster than doing it afterwhile.

 

 

bottom of page