Frequently Asked QuestionsΒΆ

Here are some questions that are popping up regularly. You can ask some or get answers on our Google Group!forum/spyking-circus-users

  • I can not install the software


Be sure to have the latest version from the git folder. We are doing our best to improve the packaging and be sure that the code is working on all platforms, but please be in touch we us if you encounter any issues

  • Is is working with Python 3?


Yes, the code is compatible with Python 3

  • The data displayed do not make any sense


Are you sure that the data are properly loaded? (see data section of the parameter file, especially data_dtype, data_header). Test everything with the preview mode by doing:

>> spyking-circus mydata.extension -p
  • Can I process single channel datasets, or coming from not so-dense electrodes?


Yes, the code can handle spikes that will occur only on a single channel, and not on a large subset. However, you may want to set the cc_merge parameter in the [clustering] section to 1, to prevent any global merges. Those global merges are indeed performed automatically by the algorithm, before the fitting phase. It assumes that templates that are similar, up to a scaling factor, can be merged because they are likely to reflect bursting neurons. But for few channels, where spatial information can not really be used to disentangle templates, the amplitude is a key factor that you want to keep. Also, you may need to turn on the smart_search mode in the clustering section, because as you have few channels, you want to collect spikes efficiently.

  • Something is wrong with the filtering


Be sure to check that you are not messing around with the filter_done flag, that should be automatically changed when you perform the filtering. You can read the troubleshooting section on the filtering here

  • I see too many clusters, at the end, that should have been split


The main parameters that you can change will be cc_merge and sim_same_elec in the [clustering] section. They are controlling the number of local (i.e. per electrode) and global (i.e. across the whole probe layout) merges of templates that are performed before the fitting procedure is launched. By reducing sim_same_elec (can not be less than 0), you reduce the local merges, and by increasing cc_merge (can not be more than 1), you reduce the global merges. A first recommendation would be to set cc_merge to 1. You might also want to turn on the smart_search parameter in the clustering section. This will force a smarter collection of the spikes, based on rejection methods, and thus should improve the quality of the clustering.

  • Do I really need to have a GPU?


In 0.4, it is likely than using 1 GPU is faster than 1 CPU. However, using several CPU is faster than a single GPU, so we recommend using a lot of CPU if you want to gain speed. Dedicated CUDA kernels should be there for 0.5, bringing back the full power of GPUs.

  • Memory usage is saturating for thousands of channels


If you have a very large number of channels (>1000), then the default size of 60s for all the data blocks loaded into memory during the different steps of the algorithm may be too big. In the whitening section, you can at least change it by setting chunk_size to a smaller value (for example 10s), but this may not be enough. If you want the code to always load smaller blocks during all steps of the algorithm clustering, filtering, then you need to add this chunk_size parameter into the data section.

  • How do I read the templates in Python?


Templates are saved as a sparse matrix, but you can easily get access to them. For example if you want to read the template i, you have to do

from circus.shared.files import *
params    = load_parameters('yourdatafile.dat')
N_e       = params.getint('data', 'N_e') # The number of channels
N_t       = params.getint('data', 'N_t') # The temporal width of the template
templates = load_data(params, 'templates') # To load the templates
temp_i = templates[:, i].toarray().reshape(N_e, N_t) # To read the template i as a 2D matrix

To know more about how to play with the data, and build your own analysis, either in Python or MATLAB you can go to our dedicated section on analysis

  • After merging templates with the Meta Merging GUI, waveforms are not aligned


By default, the merges do not correct for the temporal lag that may exist between two templates. For example, if you are detecting both positive and negative peaks in your recordings, you may end up with time shifted copies of the same template. This is because if the template is large enough, crossing both positive and negative thresholds at the same time, the code will collect positive and negative spikes, leading to twice the same template, misaligned. We are doing our best, at the end of the clustering step, to automatically merge those duplicates based on the cross-correlation (see parameter cc_merge). However, if the lag between the two extrema is too large, or if they are slightly different, the templates may not be fused. This situation will bring a graphical issue in the phy GUI, while reviewing the result: if the user decided in the Meta Merging GUI to merge the templates, the waveforms will not be properly aligned. To deal with that, you simply must to set the correct_lag parameter in the [merging] section to True. Note that such a correction can not be done for merges performed in phy.