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.17.tar.gz (108.9 kB view details)

Uploaded Source

Built Distributions

efel-5.7.17-cp312-cp312-win_amd64.whl (228.0 kB view details)

Uploaded CPython 3.12Windows x86-64

efel-5.7.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

efel-5.7.17-cp312-cp312-macosx_10_13_x86_64.whl (260.0 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

efel-5.7.17-cp311-cp311-win_amd64.whl (228.0 kB view details)

Uploaded CPython 3.11Windows x86-64

efel-5.7.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

efel-5.7.17-cp311-cp311-macosx_10_9_x86_64.whl (259.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

efel-5.7.17-cp310-cp310-win_amd64.whl (228.0 kB view details)

Uploaded CPython 3.10Windows x86-64

efel-5.7.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

efel-5.7.17-cp310-cp310-macosx_10_9_x86_64.whl (259.9 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

efel-5.7.17-cp39-cp39-win_amd64.whl (228.0 kB view details)

Uploaded CPython 3.9Windows x86-64

efel-5.7.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

efel-5.7.17-cp39-cp39-macosx_10_9_x86_64.whl (259.8 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for efel-5.7.17.tar.gz
Algorithm Hash digest
SHA256 448c8dacc62433fc518fa996fd457c81a03e20bc6cefe355353ee05a22eda406
MD5 36e8114a03ae9645350071496bdf1bf6
BLAKE2b-256 de06a0a9e82d16ec0877d03572ecfe3ff0e8862f33ae154ce9bd6e2be1481fd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17.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.17-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for efel-5.7.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 41286d22b07d71697c1ffd3a17c7f239a2ed48d9874c4dad9ec4cd8e463722c2
MD5 9612385d9f42133e201001c9e33594f5
BLAKE2b-256 db44c9074ef41bedbadce1d9e192134fd62b36f0cac438ae1ace45343d803ccf

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf8484553136bb10718bfa373bc846c4f6fed162da5faeaa1d0fc17e5f71e5b5
MD5 8e3027d336ffe042447905077200f82b
BLAKE2b-256 10fd61c647edfdb3e1565d1cfc686fbbf01bab8bf619af1500c82fbc6998be26

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_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.17-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2a51990bfab55a8a0aef476c3258260611c510e1e7dbfbc0b6288c657ddbec6e
MD5 05d4297886c502774eebeb72f4d728cc
BLAKE2b-256 882b12e0c5056a4c8449d371992617f3961ed8f115da2be432a9d88c3f6a9987

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for efel-5.7.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 38f9b97816c8d7140fd6425141a9839fc9d4846b079fbd084910a90392f04bc4
MD5 0f2e79205890dc3efb9cdfe26a7b7725
BLAKE2b-256 90aa961a719a3db6223926dfa3a40a77164c8197cbb9de30f9832efc88dac52e

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4202622bd2d439dbb3a6dcaefa537b4713d2dfd5480d6035c1d378ec46e4627
MD5 cca3dc89c5dcc75ae177b837cee1a73c
BLAKE2b-256 aba02bd11334d2dcfa2710c06f102e841c3fb6761e70ea97b2bfc26e17dc1f8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_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.17-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dd75f674b3914bbca3430bd0d2398a3a361e59f22c0df1ef9320fec2f95d3aa0
MD5 5a68fe09cddccbdca8f9248c301a1804
BLAKE2b-256 b17d6f1de7566ebf5f57b87348a2e09d14d86b2ed94333bdc9f8cb19972437f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp310-cp310-win_amd64.whl.

File metadata

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

File hashes

Hashes for efel-5.7.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 daa6b1ddfba5176b2e478e93ffbae25ff8ab304ff11900e05da113c0bcde3b0f
MD5 9486549bc9dbc511cfc1b262571a6ba4
BLAKE2b-256 d2f21c0a0c59e80d8e987b469bcb25f3b4db031dffbf8f6500b9d22dbef5e1b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c0715803356e9c7650d2f80197d470385f82eacc15ba76bd1d248f7661ababd
MD5 5f298527d4d77bdc41b402dff9cd355a
BLAKE2b-256 3759e1762f09f7283c495e39430b25425924f353bf69d920bfed9b854f0ce179

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_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.17-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e0b8525f0e1dc93536e48e82e457ce4752d63a9edeec97fed437f5cfaae0b769
MD5 a99851067356429e376732392f0fac90
BLAKE2b-256 125ec7189b8396a8ba8d2f60e39d4bce284bb7b53e51a873c49dbedfe16f27cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp39-cp39-win_amd64.whl.

File metadata

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

File hashes

Hashes for efel-5.7.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 99376700e0c5f7bb8ec1b43be4dca15b5af009afba1c982c91f5f6d3d6fe8a78
MD5 ddf7b2d8798fd734a7d565b4dafe718f
BLAKE2b-256 24670bea82f665ce2d49c8af74d69f33a4e89ffd95f74f13c791f9cc05114de1

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ab2f812b4fce42e994e7e5ce42630d3c2610ddaa7273f569a4dbd126027bf3e
MD5 a182dbeab6f9d203ef75aacbd34fafc9
BLAKE2b-256 0aba6e2cf0d460b0f2f99d0231159fb38e83b981854d85c35517abcc8aa696b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_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.17-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.17-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eeb715368fb36a4499d126e7d5d24defa2c6177057fcbcf0310cae6a2ba6d007
MD5 e0d963a06829133500794b383df8048a
BLAKE2b-256 5ab1ad5a350271c29c0cbab07c54c9c32fd78dae8380db60cde68a3bdd70e395

See more details on using hashes here.

Provenance

The following attestation bundles were made for efel-5.7.17-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page