Dear Qifan Wang,
I am the first author of the paper “Uniting functional network topology and oscillations in the fronto-parietal single unit network of behaving primates” in eLife 2016
First of all, thanks for your interest in our work.
Regarding your scientific question about the calculation of surrogate CCHs:
Back then when I started the project, I actually encountered the same problem as you did. However, my entire code is written in Matlab and therefore my solution may not be easily translatable to Python.
Nonetheless, here a complete list of how I solved the "calculation time problem":
1. I indeed used parallel computation on three computers in parallel (quad core, 32GB Ram)
2. I wrote my own function to compute CCHs. Instead of using the standard fft based function to compute CCHs, I computed CCHs based on the spike-triggered average, which is possible for point processes and up to about 100x faster depending on the firing rate.
3. Matlab is a programming language optimized for logical indexing. By using logical indexing, I managed to generate an entire surrogate spiking activity set in less than a minute, and further reduced the calculation time of CCHs.
4. I wrote floating point files of intermediate calculation steps directly to disc and streamed the required parts for the next calculation step.
I hope my answer provides you with possible solutions or at least approaches, how you can solve the calculation time problem in Python.
Best regards,
Benjamin Dann
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this
article to respond.