Comments (4)
It's possible there is a bug with p_mask_out_artifacts.py
Maybe it only happens when it is trying to mask out an artifact toward the end of the recording?
That would be this file: https://github.com/magland/ml_ephys/blob/master/ml_ephys/preprocessing/p_mask_out_artifacts.p
Perhaps you could take a look.
from mountainsort.
Thank you for your quick response! I've looked through that function and I know the the error is happening somewhere at/within mask_chunk (line 164) but I haven't been able to figure out why it's happening; I'm finding it hard to determine which chunk the code is failing on since processing is parallelized (python isn't my "native" language, so someone else might have better luck with this). I have managed to find a temporary fix for it, though; I just put the statement throwing the error in a try/except block:
The statement only throws that exception once and nothing looks very wonky in my data, so I'm using this for now. I'm not sure which variable is being used to index the chunks, so I wasn't able to tell which chunk it's failing for. Also, just FYI, I don't think this is an issue with data size; I took one of the datasets that threw this exception, split it into 3 equal parts, and ran the algorithm on each part separately; the function only failed on the latter 2 parts.
I hope this helps narrow things down!
from mountainsort.
Thanks. I think chunk_size on line 166 (of your snippet) should be replaced by t2-t1.
from mountainsort.
Mmm.. that actually led to many more exceptions, lol. But it did provide some useful information: chunk_size is always at 2,000, num_write_chunks is always 150, write_chunk_size is always at 300,000, and t2-t1 is at 300,000 except for the last chunk, which is smaller (201,166 in my case). You're right; the code is only failing for this last chunk. It seems that get_masked_indices is returning indices that are <300,000, but often larger than the size of the last chunk.
I tried changing 'write_chunk_size' (usually at 300,000 as well) to t2-t1, but that still didn't work (still throws an exception for the last block). It might have to do with num_write_chunks (set at 150), but I'm afraid I don't know how the code works well enough to fix that (I tried (t2-t1)/chunk_size instead, but that led to more errors). It seems like the function just needs an if-statement for exceptions with the last block..
Thanks for your help and feedback!
from mountainsort.
Related Issues (20)
- difference between consolidate_clusters and merge_across_channels parameters HOT 3
- Error with bandpass_filter in MountainSort3 HOT 3
- error code 9 , computing cluster metrics
- error code 6, mountainsortalg.ms3alg -- Unexpected error putting together the clips in NeighborhoodSorter::sort()
- How to make a geom.csv file? HOT 4
- Data requirement of mountainsort HOT 2
- How can I change the config temp directory non-interactively? HOT 2
- How does Mountainsort handle coincident spikes from different neurons HOT 1
- Should whitened data be used to plot units after sorting
- pyms error HOT 16
- is this software suitable for online realtime signal analysis?
- detect_threshold
- Single channel sort not working HOT 1
- Can't finish the sorting process using ms4alg.sort HOT 1
- Error just after installation using conda HOT 5
- Clip alignment for low sampling rate recordings [future development question] HOT 2
- How to use with already extracted spikes HOT 4
- Installation problem HOT 5
- Installation error (conda)
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 mountainsort.