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.0.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.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ndx_conelab-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 cd7a37defdef2140c13bfaccc968f0c0d0adaaa51f4e52719d9c29d04fb2c9c7
MD5 bf3702cab54306c186cd12a436e55f26
BLAKE2b-256 c12b812e8c6c6ce3079d91fab258668b98dd8f22d67a257c27d27535fc74f090

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ndx_conelab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b27b4b2cf29bc75dc138bd3995c94af6eaef24dd8296d1268db912f3701f68a
MD5 bec1c6b0427401921eb8960a85a7c832
BLAKE2b-256 6ad1e77dac92906edaab3388a9c88e960af1b34c43624c45caed9ee3971afcad

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