Skip to main content

Alyx Connector, based on the Open Neurophysiology Environment

Project description

Open Neurophysiology Environment - HaissLab flavour

The Open Neurophysiology Environment is a scheme for accessing neurophysiology data from an alyx database server, in a standardized manner. For information on how to manage file names when registering data with ONE to an alyx server, please click here. This github page contains an API for searching and loading ONE-standardized data, stored either on a user’s local machine or on a remote server. Please Click here for the main documentation page.

NB: The API and backend database are still under active development, for the best experience please regularly update the package by running :
pip install --force-reinstall --no-deps git+https://gitlab.pasteur.fr/haisslab/data-management/ONE.git.
This will force the reinstallation of the package, without the need to do a pip uninstall ONE-api first, and without reinstalling the dependancies like numpy etc (hence faster).

Requirements

ONE runs on Python 3.7 or later, and is tested on the latest Ubuntu and Windows (3.7 and 3.8 only).

Installing

Installing the package via pip typically takes a few seconds. To install, activate your developpement environment :

conda activate <myenvironment>

Then run the One-api install using :

pip install git+https://gitlab.pasteur.fr/haisslab/data-management/ONE.git

Set up

For setting up ONE for a given database e.g. our local version of Alyx at HaissLab:

from one import ONE
one = ONE(base_url='http://157.99.138.172:8080')

Once you've setup the server, subsequent calls will use the same parameters:

from one import ONE
one = ONE() #uses the same parameters entered the first time and stored by default in C:\Users\<myusername>\AppData\Roaming\.one\.157.99.138.172_8080: 

For using ONE with a local cache directory (not recommanded for now):

from one import One
one = One(cache_dir='/home/user/downlaods/ONE/behavior_paper')

Using ONE

To search for sessions:

from one import ONE
one = ONE()
print(one.search_terms())  # A list of search keyword arguments

# Search session with wheel timestamps from January 2021 onward
eids = one.search(date_range=['2021-01-01',], dataset='wheel.timestamps')
['d3372b15-f696-4279-9be5-98f15783b5bb'] # this is a list of unique ids of sessions returned. Here only one has been found with given parameters

# Search for project sessions with two probes
eids = one.search(data=['probe00', 'probe01'], project='brainwide')

Further examples and tutorials can be found in the main IBL documentation documentation.

(Not currentely supported :)

To load data:

from one.api import ONE
one = ONE()

# Load an ALF object
eid = 'a7540211-2c60-40b7-88c6-b081b2213b21'
wheel = one.load_object(eid, 'wheel')

# Load a specific dataset
eid = 'a7540211-2c60-40b7-88c6-b081b2213b21'
ts = one.load_dataset(eid, 'wheel.timestamps', collection='alf')

# Download, but not load, a dataset
filename = one.load_dataset(eid, 'wheel.timestamps', download_only=True)

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

one_haisslab-1.3.4.tar.gz (133.9 kB view details)

Uploaded Source

Built Distribution

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

one_haisslab-1.3.4-py3-none-any.whl (108.2 kB view details)

Uploaded Python 3

File details

Details for the file one_haisslab-1.3.4.tar.gz.

File metadata

  • Download URL: one_haisslab-1.3.4.tar.gz
  • Upload date:
  • Size: 133.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for one_haisslab-1.3.4.tar.gz
Algorithm Hash digest
SHA256 700390be4c41b20fb79530af4225f100eda01efd0faf5eab41f702fb703f4230
MD5 b4d6004f3c33ff3b57144a315e7e1286
BLAKE2b-256 ac4ba6d13d2a28663b8e3b7d48009b2d9674150353462a47cd5c947538ba6108

See more details on using hashes here.

File details

Details for the file one_haisslab-1.3.4-py3-none-any.whl.

File metadata

  • Download URL: one_haisslab-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 108.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for one_haisslab-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 496b869408e4c3f2888caa4b1259118ba00fa50e7e0cad8e9f3ae8c8962045b9
MD5 3b51a9bc9d0956f74b14daf7c1c431bf
BLAKE2b-256 48f0ddc9ede4759f8baba33cd4d80ec294788862425b967fd656088fd1f5cba1

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