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.2.0.tar.gz (13.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.2.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ndx_conelab-0.2.0.tar.gz
  • Upload date:
  • Size: 13.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.2.0.tar.gz
Algorithm Hash digest
SHA256 512d5ac6a95a9d783c97e31abbba6da128b27d94d0a91e9aa4351fcc13bceeb8
MD5 36d0c543004451267b88fa839de02006
BLAKE2b-256 60380caa36de1c3a5a5eecb37bb83f423f6f263abbbee33eb877809499e2aba8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ndx_conelab-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0541bb5e158aa5fbf07cb30a77a66985aa662ae362180bd48c1aa3283e6174bb
MD5 c7c07676ee93151f27aa7118ccb76d84
BLAKE2b-256 3ba80eb2b70e815f89669ff3cb5fc73c1763c9ba96095f4f8580dcbc03ebf3b3

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