Skip to main content

Weegit - electrophysiology marking application

Project description

Weegit

PyPI Downloads PyPI - Python Version

Introduction

Weegit is a cross-platform application for electrophysiology marking. Works with Windows/Mac/Linux.

It uses specific filesystem architecture that is maintained by the application.

$EXPERIMENT_weegit
├── header.json
├── lfp
│   ├── $CH_IDX.lfp
├── sessions
│   ├── $SESSION_NAME.json

Weegit GUI

Run weegit through terminal to start GUI.

$ weegit

Developers

Weegit has a convenient interface to work with its data.

Convert your experiment data to weegit format

from pathlib import Path
from weegit.converter.weegit_io import WeegitIO

PATH_TO_EXP_PARENT_DIR = Path("/path/to/parent/dir/")
EXP_NAME = "20252222"
EXP_DIR = PATH_TO_EXP_PARENT_DIR / EXP_NAME
OUT_WEEGIT_FOLDER = PATH_TO_EXP_PARENT_DIR / (EXP_NAME + "_weegit")
for progress in WeegitIO.convert_from_source_to_weegit(EXP_DIR):
    print(f"\rProgress: {progress}%", end='', flush=True)

print(list(OUT_WEEGIT_FOLDER.glob("*")))

Note: This requires separate $EXPERIMENT folder. Current supported formats are: old Weegit, rhs (XDAQ)

Work with the weegit data

from pathlib import Path
from weegit.core.weegit_session import WeegitSessionManager, UserSession

# Init session
session = WeegitSessionManager()
session.init_from_folder(Path(OUT_WEEGIT_FOLDER))

# Work with data
print(session.experiment_data.header)
sweep_idx, start_point, end_point = 0, 0, 10_000
for ch_idx in range(session.experiment_data.header.number_of_channels):
    channel_data = session.experiment_data.data_memmaps[ch_idx][sweep_idx, start_point:end_point]
    print(f"Channel {session.experiment_data.header.channel_info.name[ch_idx]} max voltage val: ",
          max(session.experiment_data.from_int16_to_voltage_val(channel_data, ch_idx)))

# Work with GUI session
session_filename = UserSession.session_name_to_filename("your_session")
session.switch_sessions(session_filename)
print(session.current_user_session.gui_setup)

# Work with events
for event in session.user_session.events_table:
    # skip events in period
    if "PERIOD_NAME" in event.periods:
        continue

# Work with spikes
for sweep_idx, spikes in session.user_session.cached_spikes.items():
    print("Sweep", sweep_idx, "spikes:", spikes)

License

The code and data files in this distribution are licensed under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. See https://www.gnu.org/licenses/ for a copy of this license.

Project details


Download files

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

Source Distribution

weegit-0.0.17.tar.gz (85.6 kB view details)

Uploaded Source

Built Distribution

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

weegit-0.0.17-py3-none-any.whl (99.2 kB view details)

Uploaded Python 3

File details

Details for the file weegit-0.0.17.tar.gz.

File metadata

  • Download URL: weegit-0.0.17.tar.gz
  • Upload date:
  • Size: 85.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.12

File hashes

Hashes for weegit-0.0.17.tar.gz
Algorithm Hash digest
SHA256 71cf862d9b0b9dc5011f0887c97667f3b09a949b4e06219327eea07fd12f22de
MD5 1b8660170ada3cf249ef5991b63ac001
BLAKE2b-256 42f93541cda04eaaa07d673f33ddb5fcaf175e1dfc58aa4bedbc4a5e5a4a4f5e

See more details on using hashes here.

File details

Details for the file weegit-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: weegit-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 99.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.12

File hashes

Hashes for weegit-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 ec06041060d96b1b52cb9eeffc9898d069e335077b278f24050f2d766e260c1b
MD5 21f77bdd9e19e6a283865d0fbb5e18ce
BLAKE2b-256 1247c4a5ecc122d30b1e07ee2530c9faf64db89669d6506978323de90815a24b

See more details on using hashes here.

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