Skip to main content

Electrophys Feature Extract Library (eFEL)

Project description

eFEL banner
Latest Release latest release
Documentation latest documentation
License license
Build Status actions build status
Coverage coverage
Gitter
Citation DOI

Introduction

The Electrophys Feature Extraction Library (eFEL) allows neuroscientists to automatically extract features from time series data recorded from neurons (both in vitro and in silico). Examples are the action potential width and amplitude in voltage traces recorded during whole-cell patch clamp experiments. The user of the library provides a set of traces and selects the features to be calculated. The library will then extract the requested features and return the values to the user.

The core of the library is written in C++, and a Python wrapper is included. At the moment we provide a way to automatically compile and install the library as a Python module. Instructions on how to compile the eFEL as a standalone C++ library can be found here.

How to cite

When you use this eFEL software for your research, we ask you to cite it (this includes poster presentations) by referring to the "Cite this repository" button at the top of the repository page to get various citation formats, including APA and BibTeX.

For detailed citation information, please refer to the CITATION.cff file.

Requirements

  • Python 3.9+
  • Pip (installed by default in newer versions of Python)
  • C++ compiler that can be used by pip
  • Numpy (will be installed automatically by pip)
  • The instruction below are written assuming you have access to a command shell on Linux / UNIX / MacOSX / Cygwin

Installation

The easiest way to install eFEL is to use pip

pip install efel

In case you don't have administrator access this command might fail with a permission error. In that case you could install eFEL in your home directory

pip install efel --user

Or you could use a python virtual environment

virtualenv pythonenv
. ./pythonenv/bin/activate
# If you use csh or tcsh, you should use:
# source ./pythonenv/bin/activate.csh
pip install efel

If you want to install straight from the github repository you can use

pip install git+git://github.com/openbraininstitute/eFEL

Quick Start

First you need to import the module

import efel

To get a list with all the available feature names

efel.get_feature_names()

Note that the extra-cellular features, the bpap_attenuation feature and the check_ais_initiation feature are not listed above because they have to be used in a special way, as described here for extra-cellular features, here for bpap_attenuation feature and here for check_ais_initiation feature.

To change the spike detection threshold setting (default is -20 mV)

efel.set_setting('Threshold', -30)

For a full list of available settings, please refer to the Setting class

The python function to extract features is get_feature_values(...). Below is a short example on how to use this function. The code and example trace are available here

"""Basic example 1 for eFEL"""

import efel
import numpy

def main():
    """Main"""

    # Use numpy to read the trace data from the txt file
    data = numpy.loadtxt('example_trace1.txt')

    # Time is the first column
    time = data[:, 0]
    # Voltage is the second column
    voltage = data[:, 1]

    # Now we will construct the datastructure that will be passed to eFEL

    # A 'trace' is a dictionary
    trace1 = {}

    # Set the 'T' (=time) key of the trace
    trace1['T'] = time

    # Set the 'V' (=voltage) key of the trace
    trace1['V'] = voltage

    # Set the 'stim_start' (time at which a stimulus starts, in ms)
    # key of the trace
    # Warning: this need to be a list (with one element)
    trace1['stim_start'] = [700]

    # Set the 'stim_end' (time at which a stimulus end) key of the trace
    # Warning: this need to be a list (with one element)
    trace1['stim_end'] = [2700]

    # Multiple traces can be passed to the eFEL at the same time, so the
    # argument should be a list
    traces = [trace1]

    # set the threshold for spike detection to -20 mV
    efel.set_setting('Threshold', -20)

    # Now we pass 'traces' to the efel and ask it to calculate the feature
    # values
    traces_results = efel.get_feature_values(traces,
                                           ['AP_amplitude', 'voltage_base'])

    # The return value is a list of trace_results, every trace_results
    # corresponds to one trace in the 'traces' list above (in same order)
    for trace_results in traces_results:
        # trace_result is a dictionary, with as keys the requested features
        for feature_name, feature_values in trace_results.items():
            print("Feature %s has the following values: %s" %
                (feature_name, ', '.join([str(x) for x in feature_values])))


if __name__ == '__main__':
    main()

The output of this example is

Feature AP_amplitude has the following values: 72.5782441262, 46.3672552618, 41.1546679158, 39.7631750953, 36.1614653031, 37.8489295737
Feature voltage_base has the following values: -75.446665721

This means that the eFEL found 5 action potentials in the voltage trace. The amplitudes of these APs are the result of the 'AP_amplitude' feature. The voltage before the start of the stimulus is measured by 'voltage_base'. Results are in mV.

Full documentation

The full documentation can be found here

Funding

This work has been partially funded by the European Union Seventh Framework Program (FP7/2007­2013) under grant agreement no. 604102 (HBP), the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 720270, 785907 (Human Brain Project SGA1/SGA2) and by the EBRAINS research infrastructure, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3). This project/research was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

Copyright (c) 2009-2024 Blue Brain Project/EPFL

Copyright (c) 2025 Open Brain Institute

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

efel-5.7.20.tar.gz (140.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

efel-5.7.20-cp312-cp312-win_amd64.whl (237.7 kB view details)

Uploaded CPython 3.12Windows x86-64

efel-5.7.20-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

efel-5.7.20-cp312-cp312-macosx_10_13_x86_64.whl (260.2 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

efel-5.7.20-cp311-cp311-win_amd64.whl (237.7 kB view details)

Uploaded CPython 3.11Windows x86-64

efel-5.7.20-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

efel-5.7.20-cp311-cp311-macosx_10_9_x86_64.whl (260.1 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

efel-5.7.20-cp310-cp310-win_amd64.whl (237.7 kB view details)

Uploaded CPython 3.10Windows x86-64

efel-5.7.20-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

efel-5.7.20-cp310-cp310-macosx_10_9_x86_64.whl (260.1 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

efel-5.7.20-cp39-cp39-win_amd64.whl (237.7 kB view details)

Uploaded CPython 3.9Windows x86-64

efel-5.7.20-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

efel-5.7.20-cp39-cp39-macosx_10_9_x86_64.whl (260.1 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file efel-5.7.20.tar.gz.

File metadata

  • Download URL: efel-5.7.20.tar.gz
  • Upload date:
  • Size: 140.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efel-5.7.20.tar.gz
Algorithm Hash digest
SHA256 0cfb56abf9fdb0199f3bcfc8dc0037cb86f06623b528cd9d896a25c1f9df4089
MD5 c1d8ab53e7055c430e0cfdf66948d622
BLAKE2b-256 c934b81c91b1392adfcaf9de31a842694d780fafb44488a257b9303374664c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20.tar.gz:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.20-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 237.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efel-5.7.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 80507ab9984fb77d2c68e45c084e67aa0b042603e7a84c56896308329bebf44c
MD5 790dc2f6169f62e9497d11876bbd3d26
BLAKE2b-256 97e837d9708a4b39f4c923eb43d174fc3325bf11ba6dba6f0f9f523ffe0f4d5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ce9ca3f0c831afe5ea1c17784c46b105b6beaf1f194d542d6e832c3e35eafe0d
MD5 4962cb89c2ad1ea73db87dd2fd3e9efd
BLAKE2b-256 aa006cdcb6ffc2e9195aac8d1d4602ceb8fd105c974226c7da4aa7715ebf48b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 473c753f62f3e82766e13639b6591e9e61e0653b554bb376ec1184f64888bda0
MD5 063b80a239b4855a7ee447feb9eee25e
BLAKE2b-256 03faee67d9225d69725f124694daaa9a9a5c60a67ac0aa38f3c564221e5f1632

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.20-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 237.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efel-5.7.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 de54975c7b8aa32cabf7444a8b97218f63f4cff63b8107d9395805cf7804915a
MD5 2ba8e047396c8b8307c24213e6d36871
BLAKE2b-256 3aebcd7093a2f574e7f7ce96ea466a27459b61de2adfe586a16918e5cdc10f60

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cddc616566932cbe4ee3ac728a76796c1d2450d5be12e6a4e2b7bcb279ff85e7
MD5 81e85e5cd35f7e50d60cea38c2abfdd2
BLAKE2b-256 27e82c211389b0f9e73c63585af66169f74a3e476383879eb1963d6c076a342c

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4cc71c0e85f7ef8c0e44dc246cb1c461c27764b662efe784466e73eaef5d0483
MD5 fc15b1d8cf4627a1307dc561434e299f
BLAKE2b-256 975696d0928656dd1dff2e80e4c711f35589e51159cabc2869378e053f0a56ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.20-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 237.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efel-5.7.20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 200eb9d940d509b62c8a9b78a6ca7b4693b071839803efc36065b08f06044ce8
MD5 c5b27c2978ca2038d811aba4d19f3f5d
BLAKE2b-256 933d9f3847e0566d1044b43a342110b7827bfd517cd7eebf7e18a898e0ce3d4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b649ec670c415c21dd5d0574e616e92299d0e88bb1acc6f0000f24d6d989e38e
MD5 753abf3e9cbee28d5476384b62b11ca8
BLAKE2b-256 875f4b3abff14ce4b4fd797c1a3f6ea335ca942614e484aa0103e68474656099

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fc374f12b95f0fd01c36dc8676c7d255d1b2b1e72844f816d7781bbfa20cd6c4
MD5 2ed2099d5e5aad7157deaf8d28f15cab
BLAKE2b-256 5f783bdaccb9e56fe3ffc4c5d57b8ca9ce58b742967fb3cec2045d977c1f4d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 237.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efel-5.7.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 68531094593edbd256e26ea8fdeb2ad9505cb18b708f7510663dead2398d7489
MD5 b60dd50c323561986480f8107f00dfbd
BLAKE2b-256 8aeb0dedd31b974cc1f4c23f23f895a3b5d4722f540fda6d839e80610c43aac2

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp39-cp39-win_amd64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af97d76416359797a1bdd22a9ecbee28847755ffa551f8c164813bef39013ffe
MD5 88e8fd5c2e2c74d76d50030a1dcd20c3
BLAKE2b-256 827447b76ada990bddeaec20604844501f7c655058bccda571b48826bd637041

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efel-5.7.20-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.20-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d4f8f75561707c0a2dee16e917f0e3fd43d93adfdd610b2cd08b8b81ece71fe
MD5 f9c2e126948b718310327f96afeeca41
BLAKE2b-256 a31cec523aa7027370fd63be925a117f42f098c815a15f0c9681fed7efd629aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.20-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: publish.yml on openbraininstitute/eFEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page