{"id":27715,"library":"efel","title":"eFEL (Electrophys Feature Extract Library)","description":"eFEL is a Python library for extracting electrophysiological features from recorded or simulated voltage traces, used widely in neuroscience. Current version: 5.7.23. Release cadence: frequent patches, minor releases every few months.","status":"active","version":"5.7.23","language":"python","source_language":"en","source_url":"https://github.com/openbraininstitute/eFEL","tags":["neuroscience","electrophysiology","feature extraction","action potential","spike detection"],"install":[{"cmd":"pip install efel","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"getFeatureValues is called as efel.getFeatureValues() after importing the module, not a direct import.","wrong":"from efel import getFeatureValues","symbol":"getFeatureValues","correct":"import efel"},{"note":"","wrong":"","symbol":"setThreshold","correct":"import efel"},{"note":"","wrong":"","symbol":"reset","correct":"import efel"}],"quickstart":{"code":"import efel\nimport numpy as np\n\n# Generate a simple synthetic action potential trace\ntime = np.arange(0, 10, 0.1)  # 10 seconds, step 0.1 ms\nvoltage = np.zeros(len(time))\nvoltage[50:60] = 20  # simple spike\n\ntrace = {'T': time, 'V': voltage, 'stim_start': [100.0], 'stim_end': [900.0]}\n\n# Set threshold\nimport efel\nefel.setThreshold(-10)\n\n# Calculate features\nfeatures = efel.getFeatureValues([trace], ['Spikecount', 'AP_amplitude'])\nprint(features[0]['Spikecount'])\nprint(features[0]['AP_amplitude'])","lang":"python","description":"Basic usage: create a trace dict with T, V, stim_start, stim_end, then call getFeatureValues."},"warnings":[{"fix":"Use Python 3.10 or higher.","message":"eFEL v5.0+ requires Python >=3.10. v4.x used Python 3.6+. Upgrade your Python environment.","severity":"breaking","affected_versions":">=5.0"},{"fix":"Always index the list: results = efel.getFeatureValues(traces, features); print(results[0]['feature_name']).","message":"The function 'getFeatureValues' returns a list of dicts, not a single dict. Access results via index, e.g., results[0]['Spikecount'].","severity":"breaking","affected_versions":"all"},{"fix":"Ensure trace dict values are numpy arrays: trace = {'T': np.array(time), 'V': np.array(voltage), 'stim_start': np.array([100.0]), 'stim_end': np.array([900.0])}.","message":"Trace dictionaries must contain keys 'T', 'V', 'stim_start', 'stim_end' as numpy arrays. Using lists or missing keys will cause silent errors or KeyError.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace 'from efel.api import ...' with 'import efel' and call efel.getFeatureValues(), efel.setThreshold(), etc.","message":"The older API using efel.api is deprecated. Use the top-level module functions directly.","severity":"deprecated","affected_versions":">=5.0"}],"env_vars":null,"search_vec":"'5.7.23':27 'action':41 'cadenc':29 'current':25 'detect':44 'efel':1,6 'electrophi':2 'electrophysiolog':13,38 'everi':34 'extract':4,12,40 'featur':3,14,39 'frequent':30 'librari':5,10 'minor':32 'month':36 'neurosci':24,37 'patch':31 'potenti':42 'python':9 'record':16 'releas':28,33 'simul':18 'spike':43 'trace':20 'use':21 'version':26 'voltag':19 'wide':22","created_at":"2026-05-09T05:51:42.466378+00:00","updated_at":"2026-05-09T05:51:42.466378+00:00","problems":[{"fix":"Ensure trace dict has all required keys: 'T', 'V', 'stim_start', 'stim_end' with numpy array values of consistent size.","cause":"Trace dictionary missing required key 'T' or value is not a numpy array with length matching 'V'.","error":"KeyError: 'T'"},{"fix":"Check that T and V arrays have the same length. For example: assert len(trace['T']) == len(trace['V']).","cause":"Mismatched lengths of 'T' and 'V' arrays in the trace dictionary.","error":"ValueError: voltage and time arrays must have the same length"},{"fix":"Run 'pip install efel' in the correct Python environment. Ensure Python >=3.10.","cause":"eFEL not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'efel'"},{"fix":"Verify import: 'import efel'. Use 'efel.getFeatureValues' (case-sensitive) and upgrade to latest: 'pip install --upgrade efel'.","cause":"Importing the module but using an incorrect attribute name (e.g., typo) or using an old version.","error":"AttributeError: module 'efel' has no attribute 'getFeatureValues'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/openbraininstitute/eFEL","docs":null,"changelog":null,"pypi":"https://pypi.org/project/efel/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}