Pynwb Release 2.0.0

Pynwb Release 2.0.0

PyNWB Release 2.0.0 Aug 13, 2021 Getting Started 1 Dependencies 3 2 Installation 5 2.1 Install release from PyPI.........................................5 2.2 Install release from Conda-forge.....................................5 2.3 Install latest pre-release.........................................6 3 For developers 7 3.1 Install from Git repository........................................7 3.2 Run tests.................................................7 3.3 Following PyNWB Style Guide.....................................8 4 How to contribute to NWB:N software and documents9 4.1 Code of Conduct.............................................9 4.2 Types of Contributions..........................................9 4.3 Contributing Patches and Changes.................................... 10 4.4 Issue Labels, Projects, and Milestones.................................. 11 4.5 Styleguides................................................ 11 4.6 Endorsement............................................... 12 5 FAQ 13 6 License and Copyright 15 7 Introduction 17 8 Software Architecture 19 8.1 Main Concepts.............................................. 22 8.2 Additional Concepts........................................... 24 9 NWB:N File Format 27 9.1 NWBFile................................................. 27 9.2 TimeSeries................................................ 27 9.3 Processing Modules........................................... 28 10 Citing PyNWB 31 10.1 BibTeX entry............................................... 31 10.2 Using RRID............................................... 32 i 10.3 Using duecredit.............................................. 32 11 Tutorials 33 11.1 General tutorials............................................. 33 11.2 Domain-specific tutorials......................................... 54 11.3 Advanced I/O............................................... 93 12 Extending NWB 117 12.1 Creating an extension.......................................... 117 12.2 The Spec API............................................... 119 12.3 Automatically generating a PyNWB API for an extension....................... 123 12.4 Building a custom API for an extension................................. 124 12.5 Documenting Extensions......................................... 128 13 Validating NWB files 129 14 API Documentation 131 14.1 pynwb.file module............................................ 131 14.2 pynwb.ecephys module.......................................... 151 14.3 pynwb.icephys module.......................................... 161 14.4 pynwb.ophys module........................................... 174 14.5 pynwb.ogen module........................................... 185 14.6 pynwb.retinotopy module........................................ 186 14.7 pynwb.image module........................................... 189 14.8 pynwb.behavior module......................................... 195 14.9 pynwb.base module........................................... 205 14.10 pynwb.misc module........................................... 212 14.11 pynwb.epoch module........................................... 217 14.12 pynwb package.............................................. 218 15 Software Process 239 15.1 Continuous Integration.......................................... 239 15.2 Coverage................................................. 239 15.3 Requirement Specifications....................................... 239 15.4 Versioning and Releasing........................................ 240 15.5 Coordinating with nwb-schema Repository and Releases........................ 240 16 How to Make a Roundtrip Test 243 16.1 TestMapRoundTrip ......................................... 243 16.2 TestDataInterfaceIO ....................................... 245 17 How to Make a Release 247 17.1 Prerequisites............................................... 247 17.2 Documentation conventions....................................... 247 17.3 Setting up environment.......................................... 247 17.4 PyPI: Step-by-step............................................ 248 17.5 Conda: Step-by-step........................................... 249 18 How to Update Requirements Files 251 18.1 requirements.txt............................................. 251 18.2 requirements-(dev|doc).txt........................................ 251 18.3 requirements-min.txt........................................... 252 19 Copyright 253 20 License 255 ii 21 Indices and tables 257 Python Module Index 259 Index 261 iii iv PyNWB, Release 2.0.0 PyNWB is a Python package for working with NWB files. It provides a high-level API for efficiently working with Neurodata stored in the NWB format. Neurodata Without Borders (NWB) is a project to develop a unified data format for cellular-based neurophysiology data, focused on the dynamics of groups of neurons measured under a large range of experimental conditions. The NWB team consists of neuroscientists and software developers who recognize that adoption of a unified data format is an important step toward breaking down the barriers to data sharing in neuroscience. Getting Started 1 PyNWB, Release 2.0.0 2 Getting Started CHAPTER 1 Dependencies PyNWB has the following minimum requirements, which must be installed before you can get started using PyNWB. 1. Python 3.7, 3.8, or 3.9 2. pip 3 PyNWB, Release 2.0.0 4 Chapter 1. Dependencies CHAPTER 2 Installation 2.1 Install release from PyPI The Python Package Index (PyPI) is a repository of software for the Python programming language. To install or update PyNWB distribution from PyPI simply run: $ pip install -U pynwb This will automatically install the following required dependencies: 1. hdmf 2. h5py 3. numpy 4. pandas 5. python-dateutil 2.2 Install release from Conda-forge Conda-forge is a community led collection of recipes, build infrastructure and distributions for the conda package manager. To install or update PyNWB distribution from conda-forge using conda simply run: $ conda install -c conda-forge pynwb 5 PyNWB, Release 2.0.0 2.3 Install latest pre-release This is useful to try out the latest features and also set up continuous integration of your own project against the latest version of PyNWB. $ pip install -U pynwb --find-links https://github.com/NeurodataWithoutBorders/pynwb/ ,!releases/tag/latest --no-index 6 Chapter 2. Installation CHAPTER 3 For developers 3.1 Install from Git repository For development an editable install is recommended. $ pip install -U virtualenv $ virtualenv ~/pynwb $ source ~/pynwb/bin/activate $ git clone --recurse-submodules [email protected]:NeurodataWithoutBorders/pynwb.git $ cd pynwb $ pip install -r requirements.txt $ pip install -e . 3.2 Run tests For running the tests, it is required to install the development requirements. $ pip install -U virtualenv $ virtualenv ~/pynwb $ source ~/pynwb/bin/activate $ git clone --recurse-submodules [email protected]:NeurodataWithoutBorders/pynwb.git $ cd pynwb $ pip install -r requirements.txt -r requirements-dev.txt $ pip install -e . $ tox For debugging it can be useful to keep the intermediate NWB files created by the tests. To keep these files create the environment variables CLEAN_NWB/CLEAN_HDMF and set them to 1. 7 PyNWB, Release 2.0.0 3.3 Following PyNWB Style Guide Before you create a Pull Request, make sure you are following PyNWB style guide (PEP8). To do that simply run the following command in the project’s root directory. $ flake8 8 Chapter 3. For developers CHAPTER 4 How to contribute to NWB:N software and documents 4.1 Code of Conduct This project and everyone participating in it is governed by our code of conduct guidelines. By participating, you are expected to uphold this code. Please report unacceptable behavior. 4.2 Types of Contributions 4.2.1 Did you find a bug? or Do you intend to add a new feature or change an existing one? • Identify the appropriate repository for the change you are suggesting: – Use nwb-schema for any changes to the NWB:N format schema, schema language, storage, and other NWB:N related documents – Use PyNWB for any changes regarding the PyNWB API and the corresponding documentation – Use MatNWB for any changes regarding the PyNWB API and the corresponding documentation • Ensure the feature or change was not already reported by searching on GitHub under PyNWB Issues and nwb-schema issues, respectively . • If you are unable to find an open issue addressing the problem then open a new issue on the respective repository. Be sure to include: – brief and descriptive title – clear description of the problem you are trying to solve*. Describing the use case is often more im- portant than proposing a specific solution. By describing the use case and problem you are trying to solve gives the development team and ultimately the NWB:N community a better understanding for the reasons of changes and enables others to suggest solutions. 9 PyNWB, Release 2.0.0 – context providing as much relevant information as possible and if available a code sample or an exe- cutable test case demonstrating the expected behavior and/or problem. • Be sure to select the appropriate labels (see Issue Labels, Projects, and Milestones) for your tickets so that they can be processed accordingly. • NWB:N is currently being developed primarily by staff at scientific research institutions and industry, most of which work on many different research projects. Please be patient, if our development team is not able to respond immediately to your issues. In particular issues that belong to later project milestones may not be reviewed or processed

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    281 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us