├── README.md └── ndarray_file_example ├── FileSpec2.3001.ns5 ├── header.json └── read_ndarray_file.py /README.md: -------------------------------------------------------------------------------- 1 | # Neuroscience Data Structure (NDS) 2 | 3 | The objective of this project is to put together a set of specifications and tools that would allow the standardization of a directory structure containing experimental data recorded with animal models in neuroscience. 4 | For this, we aim at capitalizing on the success of BIDS for human neuroimaging data, while retaining the specificities of data sets obtained in animal models. 5 | Such a standardized data structure will facilitate obtaining reproducible research and data sharing following the FAIR principles. 6 | 7 | [Note that the name Neuroscience Data Structure and the associated acronym NDS are purely provisonal] 8 | -------------------------------------------------------------------------------- /ndarray_file_example/FileSpec2.3001.ns5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/INCF/neuroscience-data-structure/a46d724e50d46d69895fc9021fa7f7abc12c01d4/ndarray_file_example/FileSpec2.3001.ns5 -------------------------------------------------------------------------------- /ndarray_file_example/header.json: -------------------------------------------------------------------------------- 1 | { 2 | "offset": 983, 3 | "shape": [900300, 10], 4 | "dtype": "int16" 5 | } 6 | -------------------------------------------------------------------------------- /ndarray_file_example/read_ndarray_file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import numpy as np 4 | import json 5 | 6 | folder = './' 7 | filename = folder + 'FileSpec2.3001.ns5' 8 | 9 | 10 | with open('header.json', 'r') as f: 11 | d = json.load(f) 12 | 13 | sigs = np.memmap(filename, mode='r', 14 | dtype=d['dtype'], 15 | offset=d['offset'], 16 | shape=tuple(d['shape']), 17 | order='C') 18 | 19 | print(sigs.shape, sigs.dtype) 20 | --------------------------------------------------------------------------------