-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel labels cause ValueError under some, but not all conditions #10
Comments
TL;DR --- For data recorded in OpenEphys format.... I think something is whacky with having the AUX files from the intan headstage accelerometers in the folder with the continuous data. It is messing up either the loading or accessing of the session.recordings[0].continuous.XYZ data. I believe I am having a similar error. It may not have to do with the naming of the AUX channels, since mine are named similar to the other continuous channels (EG. 107_9.continuous is a regular microwire channel, and 107_129.continuous is an AUX channel from the headstage). When I have the 3 AUX channels (the accelerometer) in the folder I used to make the session, I get the following error:Traceback (most recent call last): File \niaaa-fcdat2\labdata5_LIN\LIN\Drew_K\Programs\Python\optoDBS_plasticity\optoDBS_plast_OeP_20200405.py:26 in File ~\Anaconda3\envs\oep\lib\site-packages\open_ephys\analysis\recording.py:64 in continuous File ~\Anaconda3\envs\oep\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py:120 in load_continuous File ~\Anaconda3\envs\oep\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py:120 in File ~\Anaconda3\envs\oep\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py:69 in init IndexError: index -91 is out of bounds for axis 1 with size 19If I remove those three AUX channels from the folder, and load up the session, the continuous channels are loaded, at least in a way I can work with. Here is the simple script to load the session and then assign the the continuous channels (16 of them) to a variable to play with:#%% Load data from open_ephys.analysis import Session #Below just uses GUI file explore method Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing session = Session(directory) data_events = session.recordings[0].events
|
sorry, i have no clue why some of that was bolded, and the whole thing was formatted weird :) |
Hi there!
thanks for writing this package :)
After recording an Open-Ephys format recording, while creating the Session object the attached error pops up, it is possible to work with the recording when all channels with names ending with "...AUXx.continuous" (with x being a number) are moved to a different directory
I think there might be a problem with the naming scheme expectation of the code Vs. the AUX channels implementation in the Open-Ephys recording format
Thank you for the attention, and please let me know if this is a usage issue and I should be doing something differently
here is the error report:
"---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
c:\users\marks3\pycharmprojects\pythonproject3\venv\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py in init(self, files, processor_id, recording_index)
59 try:
---> 60 channel_number = int(os.path.basename(file).split('_')[1].split('.')[0].split('H')[1])
61 except IndexError:
IndexError: list index out of range
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
in
1 session = oea.Session(block.oe_path)
----> 2 session.recordings[0].continuous
3
c:\users\marks3\pycharmprojects\pythonproject3\venv\lib\site-packages\open_ephys\analysis\recording.py in continuous(self)
62 def continuous(self):
63 if self._continuous is None:
---> 64 self.load_continuous()
65 return self._continuous
66
c:\users\marks3\pycharmprojects\pythonproject3\venv\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py in load_continuous(self)
118 for fname in files]))
119
--> 120 self._continuous = [self.Continuous(files, processor_id, self.recording_index)
121 for processor_id in processor_ids]
122
c:\users\marks3\pycharmprojects\pythonproject3\venv\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py in (.0)
118 for fname in files]))
119
--> 120 self._continuous = [self.Continuous(files, processor_id, self.recording_index)
121 for processor_id in processor_ids]
122
c:\users\marks3\pycharmprojects\pythonproject3\venv\lib\site-packages\open_ephys\analysis\formats\OpenEphysRecording.py in init(self, files, processor_id, recording_index)
60 channel_number = int(os.path.basename(file).split('')[1].split('.')[0].split('H')[1])
61 except IndexError:
---> 62 channel_number = int(os.path.basename(file).split('')[1].split('.')[0]) - 1
63
64 if start_index is None:
ValueError: invalid literal for int() with base 10: 'AUX1'"
The text was updated successfully, but these errors were encountered: