np_nwb
Tools for quickly generating .nwb files from non-standard Mindscope Neuropixels experiments.
Generating an .nwb file will entail:
- inputting a path to a folder of raw data from a single experiment (
session_folder) - creating an instance of
pynwb.NWBFileand writing to disk (nwb_file) - passing
nwb_file+session_folder, to various modules that add nwb components - each module should:
- accept or load an instance of
pynwb.NWBFilefromnwb_file - recognize the type of experiment contained in
session_folder - process raw data in
session_folderaccordingly - append tables to the
pynwb.NWBFileinstance - optionally write to disk
- return the
pynwb.NWBFileinstance
- accept or load an instance of
Each module should therefore provide a function implementing the following append() interface:
import logging
import pathlib
import tempfile
from typing import Optional
import np_tools
import pynwb
logger = logging.getLogger(__name__)
def append(
session_folder: str | pathlib.Path,
nwb_file: str | pathlib.Path | pynwb.NWBFile,
output_file: Optional[str | pathlib.Path] = None,
) -> pynwb.NWBFile:
"""Append one or more new components to an `.nwb` file.
- callable from within a Python process, by accepting & returning instances of `pynwb.NWBFile`
- callable from the command line, in which case all three input arguments are required, with `nwb_file` specified as a path
"""
session_folder = pathlib.Path(session_folder)
# ... process session_folder
if not isinstance(nwb_file, pynwb.NWBFile):
nwb_file = np_tools.load_nwb(nwb_file)
# ... append new components to nwb_file
if output_file is not None:
np_tools.save_nwb(nwb_file, output_file)
return nwb_file
Metadata
Release files for np-nwb 0.1.2
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 |
|---|---|---|---|---|
| np_nwb-0.1.2.tar.gz | 36.2 kB | Without provenance | Details for np_nwb-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| np_nwb-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for np_nwb-0.1.2-py3-none-any.whl |
Total release size: 81.5 kB
Release files / np_nwb-0.1.2.tar.gz
| Download URL | np_nwb-0.1.2.tar.gz |
|---|---|
| Size | 36.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
336c85347d2723a6e0e919db626300725f0c07e87908704b4a1f0c31c9408417
|
|
BLAKE2b-256 checksum How to use checksums |
c4da645bde35b26a32d144ce6be7cb43ece6fe82be54c2c4477ffe26053cc523
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.7.4 CPython/3.11.1
|
Release files / np_nwb-0.1.2-py3-none-any.whl
| Download URL | np_nwb-0.1.2-py3-none-any.whl |
|---|---|
| Size | 45.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71e4f8a7ad395630fca63748fbd0c2be9720be045bf2867f24bf2d7e92743539
|
|
BLAKE2b-256 checksum How to use checksums |
9f057b7c89f74492e9c3f58295e46b67532cd735521bbb90e6bb9e5c0e6a156c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.7.4 CPython/3.11.1
|
Security for np-nwb 0.1.2
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.