Skip to main content

NWB extension for custom Task Parameters used in the Cone Lab.

Project description

ndx-conelab

NWB extension for custom Task Parameters used in the Cone Lab.

This package provides the NWB extension definition (YAML) and Python API for storing and retrieving Cone Lab-specific task parameters within NWB 2.0 files.

Installation

pip install ndx-conelab

(Once published to PyPI)

Or, for local development:

git clone https://github.com/JConeLab/ndx-conelab.git # Or your repo URL
cd ndx-conelab
pip install -e .

Usage

Once installed, PyNWB will automatically be able to read NWB files containing the conelab.TaskParameters neurodata type.

To create this data type in a new NWB file:

from pynwb import NWBHDF5IO, NWBFile
from datetime import datetime
from ndx_conelab import TaskParameters # Import the custom class

# ... (create your NWBFile object) ...
nwbfile = NWBFile(
    session_description='My session description',
    identifier='MY_SESSION_ID',
    session_start_time=datetime.now().astimezone(),
    # ... other required fields ...
)

# Create an instance of your custom TaskParameters
conelab_task_params = TaskParameters(
    name="MyExperimentTaskParams", # Name is required (from LabMetaData parent)
    reaction_time_window_ms=1000,
    intertrial_interval_ms=2000,
    iti_jitter_percentage=0.2,
    # ... fill in other parameters as needed ...
    description="Parameters for the RDK task, easy difficulty."
)

# Add the TaskParameters object to the NWB file.
# Since TaskParameters inherits from LabMetaData, it can be added directly
# using add_lab_meta_data(). PyNWB will typically store this under 
# /general/lab_meta_data/<object_name>/ 
# (e.g., /general/lab_meta_data/MyExperimentTaskParams/ in this case)
nwbfile.add_lab_meta_data(conelab_task_params)

# ... (write your NWB file) ...
# with NWBHDF5IO('test_nwb_with_conelab_extension.nwb', 'w') as io:
#     io.write(nwbfile)

Extension Definition

The extension schema is defined in ndx_conelab/spec/:

  • conelab.namespace.yaml
  • conelab.extensions.yaml

This defines a TaskParameters group inheriting from LabMetaData to store various experimental parameters.

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

ndx_conelab-0.1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

ndx_conelab-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file ndx_conelab-0.1.1.tar.gz.

File metadata

  • Download URL: ndx_conelab-0.1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ndx_conelab-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2c8c2b752926cada2ba1f9f574d242c2c0a74d0e34e7769accc0c5dcbfbabee
MD5 84673b4b497c35419cae31c9cfd7e371
BLAKE2b-256 3f577fd8b75d08edd59e0884a5347730b76885ad2b2f9deb416d3bc37312a8f3

See more details on using hashes here.

File details

Details for the file ndx_conelab-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ndx_conelab-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ndx_conelab-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d531f7eb50756d32d7aec264e6978b261a5720c252807d931f81e4de381040
MD5 bd3a47b70516b65d2d355107458f96b6
BLAKE2b-256 aaa709bc008ada9db965e5deb7cef5e41255d1cde76d485ab480f1d01ad000c1

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