ndx-tank-metadata
NWB LabMetaData extension for Tank lab.
Install
$ pip install ndx-tank-metadata
Usage
This extension is built for extending the LabMetaData schema with custom fields requested for the conversion of Virmen metadata. The extension is built into the Tank lab conversion pipeline (tank-lab-to-nwb) and is not necessary to be installed separately. Alternatively, it can be used from a python script as demonstrated below.
import os
from pynwb import NWBFile, NWBHDF5IO
from datetime import datetime
from ndx_tank_metadata import LabMetaDataExtension, RigExtension, MazeExtension
nwbfile = NWBFile('description', 'id', datetime.now().astimezone())
# Add rig information
rig = {'name': 'rig',
'rig': 'VRTrain6',
'simulationMode': 0,
'hasDAQ': 1,
'hasSyncComm': 0,
'minIterationDT': 0.01,
'arduinoPort': 'COM5',
'sensorDotsPerRev': [1967.6, 1967.6, 1967.6, 1967.6],
'ballCircumference': 63.8,
'toroidXFormP1': 0.5193,
'toroidXFormP2': 0.5171,
'colorAdjustment': [0., 0.4, 0.5],
'soundAdjustment': 0.2,
'nidaqDevice': 1,
'nidaqPort': 1,
'nidaqLines': [0, 11],
'syncClockChannel': 5,
'syncDataChannel': 6,
'rewardChannel': 0,
'rewardSize': 0.004,
'rewardDuration': 0.05,
'laserChannel': 1,
'rightPuffChannel': 2,
'leftPuffChannel': 3,
'webcam_name': 'Live! Cam Sync HD VF0770'}
rig_extension = RigExtension(**rig)
# Create mazes table
maze_extension = MazeExtension(name='mazes',
description='description of the mazes')
maze_dict = {'world': 1,
'lStart': '5',
'lCue': '45',
'lMemory': '10',
'cueDuration': 'NaN',
'cueVisibleAt': 'Inf',
'cueProbability': 'Inf',
'cueDensityPerM': '3',
'nCueSlots': '3',
'tri_turnHint': 1,
'color': [],
'turnHint_Mem': 0,
'numTrials': 10,
'numTrialsPerMin': 2,
'criteriaNTrials': 1,
'warmupNTrials': [],
'numSessions': 0,
'performance': 0,
'maxBias': 1,
'warmupMaze': [],
'warmupPerform': [],
'warmupBias': [],
'warmupMotor': [],
'easyBlock': 0,
'easyBlockNTrials': 10,
'numBlockTrials': 20,
'blockPerform': 0.7}
# Add each maze to extension
maze_extension.add_row(**maze_dict)
# Create LabMetaData container
lab_metadata_dict = dict(
name='LabMetaData',
experiment_name='test',
world_file_name='test',
protocol_name='test',
stimulus_bank_path='test',
commit_id='test',
location='test',
num_trials=245,
session_end_time=datetime.utcnow().isoformat(),
rig=rig_extension,
mazes=maze_extension
)
# Populate metadata extension
lab_metadata = LabMetaDataExtension(**lab_metadata_dict)
# Add to file
nwbfile.add_lab_meta_data(lab_metadata)
filename = 'test_labmetadata.nwb'
with NWBHDF5IO(filename, 'w') as io:
io.write(nwbfile)
Metadata
Release files for ndx-tank-metadata 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ndx-tank-metadata-0.2.0.tar.gz | 3.8 kB | Without provenance | Details for ndx-tank-metadata-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ndx_tank_metadata-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for ndx_tank_metadata-0.2.0-py3-none-any.whl |
Total release size: 9.8 kB
Release files / ndx-tank-metadata-0.2.0.tar.gz
| Download URL | ndx-tank-metadata-0.2.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6268a6cfe268c73665d34f2227902a5efbc1d1d23ff01c4466c10d60ab4efcbe
|
|
BLAKE2b-256 checksum How to use checksums |
4c0fd3d23deae930b5296dde1fbb29906522440974e2e9d9af0d2a2105818e9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3.post20210118 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
|
Release files / ndx_tank_metadata-0.2.0-py3-none-any.whl
| Download URL | ndx_tank_metadata-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b593808dc5c6adb49a4e9fb359a74339d9fb8b38c2102415d44114cc8319fff2
|
|
BLAKE2b-256 checksum How to use checksums |
c802178d6e5839b04c5fcfdaf331bd19cd965523dad83e9fdb942cbce483193f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3.post20210118 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
|
Security for ndx-tank-metadata 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.