pennmem / bptools Goto Github PK
View Code? Open in Web Editor NEWEEG bipolar montage helpers
EEG bipolar montage helpers
Example traceback:
Traceback (most recent call last):
File "/home1/RAM_clinical/miniconda3/envs/ramutils/bin/ramulator-conf", line 11, in <module>
load_entry_point('ramutils==2.1.10', 'console_scripts', 'ramulator-conf')()
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/ramutils/cli/expconf.py", line 196, in create_expconf
use_classifier_excluded_leads=args.use_classifier_excluded_leads)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/ramutils/pipelines/ramulator_config.py", line 112, in make_ramulator_config
use_common_reference).compute()
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/base.py", line 99, in compute
(result,) = compute(self, traverse=False, **kwargs)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/base.py", line 206, in compute
results = get(dsk, keys, **kwargs)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/threaded.py", line 75, in get
pack_exception=pack_exception, **kwargs)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/local.py", line 521, in get_async
raise_exception(exc, tb)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/compatibility.py", line 60, in reraise
raise exc
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/local.py", line 290, in execute_task
result = _execute_task(task, data)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/dask/local.py", line 271, in _execute_task
return func(*args2)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/ramutils/tasks/_wrapper.py", line 22, in wrapper
return func(*args, **kwargs)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/ramutils/tasks/odin.py", line 108, in generate_electrode_config
ec.to_csv(csv_path)
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/bptools-1.3.0-py3.6.egg/bptools/odin/config.py", line 641, in to_csv
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/bptools-1.3.0-py3.6.egg/bptools/odin/config.py", line 595, in _export
File "/home1/RAM_clinical/miniconda3/envs/ramutils/lib/python3.6/site-packages/bptools-1.3.0-py3.6.egg/bptools/odin/config.py", line 34, in _num_to_bank_label
KeyError: 4
Last few lines of jacksheet.txt
:
220 RY14
221 RY15
222 RY16
223 ECG1
224 ECG2
258 DC09
259 DC10
bptools/bptools/odin/config.py
Line 336 in 6203950
We shouldn't check if len(line)
. Specifically this can be an issue if the only thing on a line is whitespace.
This particularly affects Emory subjects (R1337E below):
Traceback (most recent call last):
File "C:\Users\OdinUser\src\SYS3\rampy\ramulator\ramulator.py", line 1011, in load_experiment_config
self.system_init()
File "C:\Users\OdinUser\src\SYS3\rampy\ramulator\ramulator.py", line 1019, in system_init
ret = self.init_experiment_runner()
File "C:\Users\OdinUser\src\SYS3\rampy\ramulator\ramulator.py", line 400, in init_experiment_runner
self.populate_electrode_table()
File "C:\Users\OdinUser\src\SYS3\rampy\ramulator\ramulator.py", line 379, in populate_electrode_table
self.configure_electrode_table(electrode_filename=electrode_filename, montage_filename=montage_filename)
File "C:\Users\OdinUser\src\SYS3\rampy\ramulator\ramulator.py", line 798, in configure_electrode_table
st = SeriesTransformation.create(electrode_filename, montage_file=montage_filename)
File "c:\users\odinuser\src\bptools\bptools\transform.py", line 50, in create
elec_conf = ElectrodeConfig(electrode_config_file)
File "c:\users\odinuser\src\bptools\bptools\odin\config.py", line 248, in __init__
self.read_config_file(filename)
File "c:\users\odinuser\src\bptools\bptools\odin\config.py", line 417, in read_config_file
contact.label = standardize_label(contact.label)
File "c:\users\odinuser\src\bptools\bptools\util.py", line 43, in standardize_label
label = ''.join(label.split())
AttributeError: 'long' object has no attribute 'split'
Traceback (most recent call last):
File "C:/Users/OdinUser/src/SYS3\rampy\ramulator\ramulator.py", line 1011, in load_experiment_config
self.system_init()
File "C:/Users/OdinUser/src/SYS3\rampy\ramulator\ramulator.py", line 1019, in system_init
ret = self.init_experiment_runner()
File "C:/Users/OdinUser/src/SYS3\rampy\ramulator\ramulator.py", line 400, in init_experiment_runner
self.populate_electrode_table()
File "C:/Users/OdinUser/src/SYS3\rampy\ramulator\ramulator.py", line 379, in populate_electrode_table
self.configure_electrode_table(electrode_filename=electrode_filename, montage_filename=montage_filename)
File "C:/Users/OdinUser/src/SYS3\rampy\ramulator\ramulator.py", line 798, in configure_electrode_table
st = SeriesTransformation.create(electrode_filename, montage_file=montage_filename)
File "c:\users\odinuser\src\bptools\bptools\transform.py", line 50, in create
elec_conf = ElectrodeConfig(electrode_config_file)
File "c:\users\odinuser\src\bptools\bptools\odin\config.py", line 256, in __init__
self.read_config_file(filename)
File "c:\users\odinuser\src\bptools\bptools\odin\config.py", line 425, in read_config_file
contact.label = standardize_label(contact.label)
File "c:\users\odinuser\src\bptools\bptools\util.py", line 59, in standardize_label
if label[-2] == "0":
IndexError: string index out of range
This should be done with a --monopolar
flag.
Example from:
bptools/bptools/odin/config.py
Lines 660 to 675 in 49a16ea
Line 670 turns a byte string into a str
something like "b'LA1'"
instead of "LA1"
.
bptools/bptools/odin/config.py
Lines 376 to 379 in e316f65
This can result in errors like:
IndexError: index 0 is out of bounds for axis 0 with size 0
when there are typos so that the labels in the area file don't match those in the jacksheet (e.g., LOFD instead of LOFCD). Workaround: catch the IndexError
and provide a helpful hint about the problem before re-raising the exception.
Main changes:
~
as delimiter instead of ,
|
as linebreak<h
<f
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.