Comments (1)
So I think I've figured out the problem. If I eliminate the spikes where index is 1 from the sort_cat.h5 file, then the lengths match. I wrote simple script in Python that combined both h5 files and outputs a mat file to save some space.
#%% This section works to load files created by combinato and check the spike times
import h5py
import numpy as np
from scipy.io import savemat
import os
from glob import glob
# Directory containing folder output from Combinato
folder = ''
for sfold in os.listdir(folder):
if sfold.startswith("u"): # Enter micro folders only
print(folder+sfold)
sortf = folder+sfold+'/sort_pos_simple/sort_cat.h5' # Find sorting outcomes
rawf = glob(folder+sfold+'/data_*')[0] # Raw file for waveforms
if os.path.exists(sortf): # If files don't have any clusters, then none is created
f = h5py.File(sortf, "r")
group = f['groups'][:] # overall waveform groups: first index is overall unit index, second is group index (no within group index)
# Use group to convert matches to neuron group
classes = f['classes'][:] # each small cluster
index = f['index'][:] # seems to index spike times
matches = f['matches'][:] # orange blue or cyan color in plots
f2 = h5py.File(rawf, "r")
spike_times = f2['pos']['times'][index]
pos_wave = f2['pos']['spikes'][index]
# spike_timesneg = f2['neg']['times'][index]
spike_group = np.zeros(len(classes),dtype='int16')
for i, ic in enumerate(np.unique(classes)):
spike_group[classes==ic] = group[i,1]
class_times = np.c_[spike_times, classes]
savedict = {'class_times': class_times, 'spike_group':spike_group, 'matches':matches, 'spikes':pos_wave}
savemat(folder+sfold+r'/mat_spikes_'+sfold+'.mat',savedict)
from combinato.
Related Issues (20)
- python setup_options.py giving error HOT 1
- no plots in `overview` folder HOT 13
- Tutorial data is no longer available HOT 2
- TypeError when loading clustering results into the GUI HOT 2
- Broken link in Tutorial Data Part I HOT 1
- css-gui axes update error with matplotlib >3.4
- Clarification question on the GUI: spike counts HOT 2
- supplying the stimulus information for raster_plot.py HOT 2
- css-overview-gui crashes everytime
- css-gui won't open processed files HOT 2
- How can you run css-mask-artifacts with all files? HOT 1
- What is the last plot in css-plot-extracted? HOT 1
- css-gui doesn't updated h5 files HOT 2
- Unable to Install on Mac, bad CPU type HOT 4
- Sorting parameters HOT 1
- drop_artifacts in old_format_output not passed as input variable HOT 3
- packaging for pip or poetry HOT 2
- use logging api HOT 2
- Issues with inferring / managing sampling rate
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 combinato.