跳转到主要内容

使用Python整理、可视化、注释和分享您的行为电生理数据

项目描述

使用Python整理、可视化、注释和分享您的行为电生理数据

发行版:

PyPI project Anaconda Cloud project Installers

源代码:

GitHub source code conda-forge feedstock constructor recipe

测试状态:

Tests status conda-forge build status Documentation status Coverage status

引用:

Zenodo archive eNeuro article

文档 | 发布说明 | 问题跟踪器

neurotic 是一个适用于Windows、macOS和Linux的应用程序,可让您轻松审查和注释您的电生理数据和同时捕获的视频。它是将您的兼容Neo数据(请参阅neo.io了解文件格式)加载到ephyviewer而无需进行任何编程的简便方法。与您的同事共享单个元数据文件,他们也将很快查看相同的数据集!

要使用此应用程序,首先将您的数据集组织在一个元数据文件中,如下所示(见配置元数据

my favorite dataset:
    description: This time it actually worked!

    data_dir:           C:\local_dir_containing_files
    remote_data_dir:    http://myserver/remote_dir_containing_downloadable_files  # optional
    data_file:          data.axgx
    video_file:         video.mp4
    # etc

    video_offset: -3.4  # seconds between start of video and data acq
    epoch_encoder_possible_labels:
        - label01
        - label02
    plots:
        - channel: I2
          ylim: [-30, 30]
        - channel: RN
          ylim: [-60, 60]
        # etc

    filters:  # used only if fast loading is off (lazy=False)
        - channel: Force
          lowpass: 50
        # etc
    amplitude_discriminators:  # used only if fast loading is off (lazy=False)
        - name: B3 neuron
          channel: BN2
          units: uV
          amplitude: [50, 100]
        # etc

another dataset:
    # etc

neurotic中打开您的元数据文件并选择一个数据集。如果数据文件和视频文件尚未位于您的本地计算机上,应用程序可以为您下载它们,甚至可以从受密码保护的服务器或Google Drive下载。最后,点击启动,应用程序将使用标准查看器布局通过ephyviewer向您显示数据。

Screenshot

在上述截图中,视频帧显示了一种贪婪的海蛞蝓(加州海蛞蝓)吞食一块固定在力传感器上的不可断裂的海藻带。从肌肉和主要的控制摄食的主要神经记录的植入电极。使用时序编码器标记海藻进入嘴中的时间。使用neurotic 可自定义参数检测对应于已识别神经元活动的尖峰。

查看器易于导航且直观(见用户界面

  • 按下播放按钮将实时滚动您的数据和视频,或者如果更改了速度参数,则以更高或更低的速率滚动。

  • 使用箭头/WASD键可以以可变增量逐时间步进。

  • 通过在事件列表中单击事件或在时序编码器的表条目中单击来跳转到特定时间。

  • 要显示更多或更少的时间,请右键单击并向右或向左拖动以收缩或展开时间。

  • 在迹线查看器或视频查看器中滚动鼠标滚轮以缩放。

  • 可以使用时序编码器将有趣事件发生的时间段排除在外,以便稍后进行审查或进一步分析(保存为CSV文件)。

  • 所有面板都可以随时隐藏、分离、堆叠或重新定位。

即使不需要视频同步功能,电生理学家也会发现这个工具很有用!

使用neurotic!便携性很容易 在您的元数据文件中使用相对路径以及远程可访问的数据存储,例如GIN或Google Drive上的共享驱动器,以使元数据文件完全便携。相同的元数据文件可以复制到不同的计算机,下载的文件将自动保存到正确位置。数据存储可以设置密码保护,并且neurotic将提示您输入用户名和密码。这使得与同事分享neurotic体验变得容易!🤪

安装neurotic

neurotic需要Python 3.6或更高版本。

备选方法:pip

使用以下方式从PyPI安装neurotic

pip install neurotic

请注意,通过 pip 安装会跳过一个依赖项:PyAV,这是显示视频所必需的,没有它,neurotic 将忽略视频。在某些系统上,特别是 Windows,使用 pip 安装 PyAV 并不容易。单独安装 PyAV 的最简单方法是使用 conda

conda install -c conda-forge av

更新 neurotic

更新 neurotic 的推荐方法取决于原始的安装方式。

如果您不确定使用了哪种方法,使用 condapip 更新可能有效。独立的安装程序也可能安全,尽管这可能导致同时安装多个版本。

使用独立安装程序更新

如果您之前使用独立安装程序安装了 neurotic,您可以使用另一个安装程序安装新版本,无论是安装到不同的目录还是首先卸载旧版本。安装程序可以从 GitHub 发布页面下载

👉在此处下载安装程序(列在“资产”下)👈

或者,如果您平台上的新安装程序目前不可用,或者您只想使用更快的方法,您可以使用安装程序提供的命令行工具(在 Windows 的“Anaconda Prompt”或 macOS 和 Linux 的终端中)

conda update -c conda-forge neurotic

使用 conda 更新

如果您使用 conda 安装了 neurotic,您可以使用以下命令更新到最新版本

conda update -c conda-forge neurotic

使用 pip 更新

如果您使用 pip 安装了 neurotic,您可以使用以下命令更新到 PyPI 上可用的最新版本

pip install -U neurotic

开发版本

如果您对尝试 neurotic 的未发布新功能感兴趣,您可以使用以下命令从 GitHub 安装最新开发版本

pip install -U git+https://github.com/jpgill86/neurotic.git

请注意,如果您安装了开发版本,您可能还需要 ephyviewer 的最新开发版本,您可以使用以下方式获得

pip install -U git+https://github.com/NeuralEnsemble/ephyviewer.git

入门

使用独立安装程序或 conda 安装的 Windows 用户应该能够从开始菜单启动 neurotic

Mac 和 Linux 用户以及 Windows 用户可以使用终端、命令行或 Anaconda Prompt 启动应用程序

  1. 根据您的操作系统、安装方法和环境设置,您可能只需通过调用其名称从命令行启动应用程序

    neurotic
  2. 如果命令不被识别,您可能需要首先激活安装应用程序的 conda 环境

    conda activate <environment name>

    如果您使用独立安装程序,环境名称可能是“neurotic”,因此您会使用

    conda activate neurotic

    然后您可以再次尝试调用应用程序名称

    neurotic

提供了一些示例。选择一个,使用“下载数据”菜单操作下载相关数据,然后点击“启动”。有关导航的帮助,请参阅 用户界面

在启动前禁用“快速加载”将启用包括幅度阈值尖峰检测和信号过滤在内的其他功能。

要检查与示例相关的元数据文件或对其进行修改,请点击“编辑元数据”。有关格式的详细信息,请参阅 配置元数据

如果您喜欢使用 Jupyter 笔记本,您可以启动一个包含使用 neurotic API 教程的示例笔记本

neurotic --launch-example-notebook

命令行界面也接受其他参数

usage: neurotic [-h] [-V] [--debug | --no-debug] [--lazy | --no-lazy]
                [--thick-traces | --no-thick-traces]
                [--show-datetime | --no-show-datetime]
                [--ui-scale {tiny,small,medium,large,huge}]
                [--theme {light,dark,original,printer-friendly}]
                [--use-factory-defaults] [--launch-example-notebook]
                [file] [dataset]

neurotic lets you curate, visualize, annotate, and share your behavioral ephys
data.

positional arguments:
  file                  the path to a metadata YAML file (default: an example
                        file)
  dataset               the name of a dataset in the metadata file to select
                        initially (default: the first entry in the metadata
                        file)

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --debug               enable detailed log messages for debugging
  --no-debug            disable detailed log messages for debugging (default)
  --lazy                enable fast loading (default)
  --no-lazy             disable fast loading
  --thick-traces        enable support for traces with thick lines, which has
                        a performance cost
  --no-thick-traces     disable support for traces with thick lines (default)
  --show-datetime       display the real-world date and time, which may be
                        inaccurate depending on file type and acquisition
                        software
  --no-show-datetime    do not display the real-world date and time (default)
  --ui-scale {tiny,small,medium,large,huge}
                        the scale of user interface elements, such as text
                        (default: medium)
  --theme {light,dark,original,printer-friendly}
                        a color theme for the GUI (default: light)
  --use-factory-defaults
                        start with "factory default" settings, ignoring other
                        args and your global config file

alternative modes:
  --launch-example-notebook
                        launch Jupyter with an example notebook instead of
                        starting the standalone app (other args will be
                        ignored)

Defaults for arguments and options can be changed in a global config file,
.neurotic\neurotic-config.txt, located in your home directory.

引用 neurotic

要在您的出版物中引用 neurotic,请参阅

吉尔,J. P.,加西亚,S.,丁,L. H.,吴,M.,& 查伊尔,H. J. (2020). 神经质:神经科学互动表征工具。eNeuro,7(3)。 https://doi.org/10.1523/ENEURO.0085-20.2020

可以从Zenodo的存档中引用软件的特定版本。

文档

有关配置元数据、工作示例、API参考指南、发行说明等详细信息,请参阅文档

项目详情


下载文件

下载适合您平台文件的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源分发

neurotic-1.5.0.tar.gz (129.3 kB 查看哈希值)

上传时间

构建分发

neurotic-1.5.0-py3-none-any.whl (132.0 kB 查看哈希值)

上传时间 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面