Comments (5)
Hey,
So you're running out of memory, probably because of how highly sampled your data is. I would downsample your data to a more manageable sampling rate. For most things, if you downsample to 1000 Hz (for spikes and LFPs), that should still give you enough resolution to resolve frequencies up to 500 Hz.
from rate_adjustment_for_spike_coherence.
Hi,
so when I resample my 300 ms data piece (aka 6000 data ticks) at 20 kHz to 1 kHz, the LFP looks ok, but my binary vector containing ones for my spike times only consists of zeros since the resampling step has removed them all. Thus the coherence measurement does not work with spike vectors consisting of only zeros. Besides the factor of 20 downsampling I tried 10, 5, 2.5, the latter produces the MemoryError again and the others give me an almost flat coherence signal. Guess my data does not work with this function. Thanks for the quick response though.
from rate_adjustment_for_spike_coherence.
There's nothing in downsampling that will remove your spike times.
For example if you spike times are 0.001, 0.005, 0.007 seconds and you had 1 ms bins (sampling rate: 500 Hz), you would have something like 1, 0, 0, 0, 1, 0, 1.
If you downsample to 2 ms bins (sampling rate: 1000 Hz), this would now be: 1, 0, 1, 1
from rate_adjustment_for_spike_coherence.
For the missing spike times, an option could be:
- Get the spike times at high sampling frequency.
- Downsample the LFP to 1 kHz.
- Make a vector of zeros, with sampling rate 1 kHz, and length equal to that of the LFP.
- Put this spike times from (1) at the correct temporal locations in the vector in (3).
This would perhaps, preserve your spike times in (1), and let you downsample in (2).
from rate_adjustment_for_spike_coherence.
Thanks for the great help. I'm using the rebin package from Python to perform the downsampling and this works great with my data and I'm able to now determine the coherence.
Thank you again for your help.
from rate_adjustment_for_spike_coherence.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rate_adjustment_for_spike_coherence.