Replies: 1 comment 1 reply
-
Hi there! We haven't fully implemented the python version of UnitMatch with OpenEphys data. However, with a few manual changes it should be working. Sam, our software engineer, will implement OpenEphys compatibility of the python version as soon as possible. In the mean time, you can try to do the manual changes as was suggested here, and definitely keep an eye out for the OpenEphys compatibility push, hopefully by the end of this week latest. Best, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have recordings from Openephys for neuropixel probe 2.0. Everytime I try to run extract_raw_data_demo.py to generate average waveforms, it throws an error that I cannot figure out. Any help is appreciated. Thank you
This is how the error looks:
{
"name": "ValueError",
"message": "The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()",
"stack": "---------------------------------------------------------------------------
_RemoteTraceback Traceback (most recent call last)
_RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/bharat/.local/lib/python3.11/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
r = call_item()
^^^^^^^^^^^
File "/home/bharat/.local/lib/python3.11/site-packages/joblib/externals/loky/process_executor.py", line 291, in call
return self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bharat/.local/lib/python3.11/site-packages/joblib/parallel.py", line 598, in call
return [func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/bharat/.local/lib/python3.11/site-packages/joblib/parallel.py", line 598, in
return [func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/bharat/.conda/envs/UnitMatch/lib/python3.11/site-packages/UnitMatchPy/extract_raw_data.py", line 104, in extract_a_unit
if np.isnan(idx):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
"""
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last)
Cell In[8], line 54
52 avg_waveforms = np.asarray(avg_waveforms)
53 else:
---> 54 avg_waveforms = Parallel(n_jobs = -1, verbose = 10, mmap_mode='r', max_nbytes=None )(delayed(erd.extract_a_unit)(sample_idx[uid], data, half_width, spike_width, n_channels, sample_amount)for uid in range(nUnits))
55 avg_waveforms = np.asarray(avg_waveforms)
57 #Save in file named 'RawWaveforms' in the KS Directory
File ~/.local/lib/python3.11/site-packages/joblib/parallel.py:2007, in Parallel.call(self, iterable)
2001 # The first item from the output is blank, but it makes the interpreter
2002 # progress until it enters the Try/Except block of the generator and
2003 # reaches the first
yield
statement. This starts the asynchronous2004 # dispatch of the tasks to the workers.
2005 next(output)
-> 2007 return output if self.return_generator else list(output)
File ~/.local/lib/python3.11/site-packages/joblib/parallel.py:1650, in Parallel._get_outputs(self, iterator, pre_dispatch)
1647 yield
1649 with self._backend.retrieval_context():
-> 1650 yield from self._retrieve()
1652 except GeneratorExit:
1653 # The generator has been garbage collected before being fully
1654 # consumed. This aborts the remaining tasks if possible and warn
1655 # the user if necessary.
1656 self._exception = True
File ~/.local/lib/python3.11/site-packages/joblib/parallel.py:1754, in Parallel._retrieve(self)
1747 while self._wait_retrieval():
1748
1749 # If the callback thread of a worker has signaled that its task
1750 # triggered an exception, or if the retrieval loop has raised an
1751 # exception (e.g.
GeneratorExit
), exit the loop and surface the1752 # worker traceback.
1753 if self._aborting:
-> 1754 self._raise_error_fast()
1755 break
1757 # If the next job is not ready for retrieval yet, we just wait for
1758 # async callbacks to progress.
File ~/.local/lib/python3.11/site-packages/joblib/parallel.py:1789, in Parallel._raise_error_fast(self)
1785 # If this error job exists, immediately raise the error by
1786 # calling get_result. This job might not exists if abort has been
1787 # called directly or if the generator is gc'ed.
1788 if error_job is not None:
-> 1789 error_job.get_result(self.timeout)
File ~/.local/lib/python3.11/site-packages/joblib/parallel.py:745, in BatchCompletionCallBack.get_result(self, timeout)
739 backend = self.parallel._backend
741 if backend.supports_retrieve_callback:
742 # We assume that the result has already been retrieved by the
743 # callback thread, and is stored internally. It's just waiting to
744 # be returned.
--> 745 return self._return_or_raise()
747 # For other backends, the main thread needs to run the retrieval step.
748 try:
File ~/.local/lib/python3.11/site-packages/joblib/parallel.py:763, in BatchCompletionCallBack._return_or_raise(self)
761 try:
762 if self.status == TASK_ERROR:
--> 763 raise self._result
764 return self._result
765 finally:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"
}
Beta Was this translation helpful? Give feedback.
All reactions