-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use extension in docs to simplify linking to common targets Move advanced data I/O tutorials to their own section and move parallel I/O tutorial Update Changelog for tutorials Updated deprecation warning in SweepTable tutorial Fix minor spelling error in make_test_files Several corrections and enhancments for the icephys tutorial Moved functions to create icephys test file from tests to pynwb Moved functions to create icephys test file from tests to pynwb Start for new tutorial to show conversion of icephys tables to pandas dataframes Test to_hierarchical_dataframe and to_denormalized_dataframe functions Updated tutorial to convert icephys tabels to pandas Fix minor spelling error in NWBFile docstring Add TimeseriesReferenceVectorData.get method to mask missing values on load Update IntracellularRecordingsTable. Update add_recording defaults for startindex and count to None and update to_dataframe method to handle missing values in TimeSeriesReferenceVectorData Update create_icephys_testfile to create testdata with missing stimuli Update existing tests to match the new behavior Update icephys tutorial for match new behavior Update icephys pandas tutorial to demonstrate new behavior Remove debug print statements Add table augmentation and queries to the icephys_pandas tutorial Fix flake8 Update to use keyword args Clarify text in icephys tutorial Fix flake8 on tutorial Fix flake8 Update to use dev branch of nwb-schema Set default name and default description for TimeSeriesReferenceVectorData added icephys_testutils to pynwb.testing.__init__ Added test for IntracellularRecordingsTable.to_dataframe with options Always use MaskedArrya in TimeSeriesReferenceVectorData instead of MaskedConstant Add tests for TimeSeriesReferenceVectorData.get Updated change log Fix minor docstring issue in TimeSeriesReferenceData.get Clarify docstring for TimeSeriesReferenceData.get Fix build warnings in docs (#1380) * Remove unused and outdated convert.rst from the docs Fix #1378 * Fix extra numbered footnote reference in ophys tutorial * Change code block highlighting from c to bash to avoid build warning * Fix duplicate target here warning in 3_spec_api.rst * Fix missing section label for crossreferencing between the extension tutorial and gallery * Updated Changelog Update CHANGELOG.md Update icephys.py Update docs/gallery/domain/plot_icephys.py Update plot_icephys.py Minor text fixes Update plot_icephys_pandas.py Minor text edits Update icephys_testutils.py Minor docstring edits Update file.py Fix typos Update docs/gallery/domain/plot_icephys.py Replace master with main Mention use of create_icephys_testfile function Co-authored-by: Ryan Ly <rly@lbl.gov> Remove old comment in TimeSeriesReferenceVectorData Co-authored-by: Ryan Ly <rly@lbl.gov> Fix typo in changelog Fix broken link target Fix flake8 in docs/gallery Minor text fixes Minor text and formatting fixes Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Use namedtuple instead of numpy masked structed array to represent values of TimeSeriesReferenceVectorData Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update tests/unit/test_icephys_metadata_tables.py Co-authored-by: Ryan Ly <rly@lbl.gov> Fix bad indent in test Update base.py - minor text edits Use hdmf 3.1.1 Enhance introspection, slicing, and data addition for TimeSeriesReference and TimeSeriesReferenceVectorData Updated icephys query tutorial to use latest get_linked_tables behavior and improve rendering Fix flake8 in gallery Fix spelling in error message Update src/pynwb/base.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update src/pynwb/base.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update src/pynwb/base.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update src/pynwb/base.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update src/pynwb/base.py Co-authored-by: Ryan Ly <rly@lbl.gov> Update src/pynwb/base.py Co-authored-by: Ryan Ly <rly@lbl.gov> Fix bug in TimeSeriesReference.timestamps and add comments Fix gallery tests to handle allensdk pinning pynwb/hdmf Fix rebase
- Loading branch information
Showing
40 changed files
with
2,010 additions
and
894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
.. _general-tutorials: | ||
|
||
|
||
Advanced I/O | ||
------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
''' | ||
Parallel I/O using MPI | ||
====================== | ||
The HDF5 storage backend supports parallel I/O using the Message Passing Interface (MPI). | ||
Using this feature requires that you install ``hdf5`` and ``h5py`` against an MPI driver, and you | ||
install ``mpi4py``. The basic installation of pynwb will not work. Setup can be tricky, and | ||
is outside the scope of this tutorial (for now), and the following assumes that you have | ||
HDF5 installed in a MPI configuration. | ||
''' | ||
|
||
# sphinx_gallery_thumbnail_path = 'figures/gallery_thumbnails_parallelio.png' | ||
|
||
#################### | ||
# Here we: | ||
# | ||
# 1. **Instantiate a dataset for parallel write**: We create TimeSeries with 4 timestamps that we | ||
# will write in parallel | ||
# | ||
# 2. **Write to that file in parallel using MPI**: Here we assume 4 MPI ranks while each rank writes | ||
# the data for a different timestamp. | ||
# | ||
# 3. **Read from the file in parallel using MPI**: Here each of the 4 MPI ranks reads one time | ||
# step from the file | ||
# | ||
# .. code-block:: python | ||
# | ||
# from mpi4py import MPI | ||
# import numpy as np | ||
# from dateutil import tz | ||
# from pynwb import NWBHDF5IO, NWBFile, TimeSeries | ||
# from datetime import datetime | ||
# from hdmf.data_utils import DataChunkIterator | ||
# | ||
# start_time = datetime(2018, 4, 25, 2, 30, 3, tzinfo=tz.gettz('US/Pacific')) | ||
# fname = 'test_parallel_pynwb.nwb' | ||
# rank = MPI.COMM_WORLD.rank # The process ID (integer 0-3 for 4-process run) | ||
# | ||
# # Create file on one rank. Here we only instantiate the dataset we want to | ||
# # write in parallel but we do not write any data | ||
# if rank == 0: | ||
# nwbfile = NWBFile('aa', 'aa', start_time) | ||
# data = DataChunkIterator(data=None, maxshape=(4,), dtype=np.dtype('int')) | ||
# | ||
# nwbfile.add_acquisition(TimeSeries('ts_name', description='desc', data=data, | ||
# rate=100., unit='m')) | ||
# with NWBHDF5IO(fname, 'w') as io: | ||
# io.write(nwbfile) | ||
# | ||
# # write to dataset in parallel | ||
# with NWBHDF5IO(fname, 'a', comm=MPI.COMM_WORLD) as io: | ||
# nwbfile = io.read() | ||
# print(rank) | ||
# nwbfile.acquisition['ts_name'].data[rank] = rank | ||
# | ||
# # read from dataset in parallel | ||
# with NWBHDF5IO(fname, 'r', comm=MPI.COMM_WORLD) as io: | ||
# print(io.read().acquisition['ts_name'].data[rank]) | ||
|
||
#################### | ||
# To specify details about chunking, compression and other HDF5-specific I/O options, | ||
# we can wrap data via ``H5DataIO``, e.g, | ||
# | ||
# .. code-block:: python | ||
# | ||
# data = H5DataIO(DataChunkIterator(data=None, maxshape=(100000, 100), | ||
# dtype=np.dtype('float')), | ||
# chunks=(10, 10), maxshape=(None, None)) | ||
# | ||
# would initialize your dataset with a shape of (100000, 100) and maxshape of (None, None) | ||
# and your own custom chunking of (10, 10). | ||
|
||
#################### | ||
# Disclaimer | ||
# ---------------- | ||
# | ||
# External links included in the tutorial are being provided as a convenience and for informational purposes only; | ||
# they do not constitute an endorsement or an approval by the authors of any of the products, services or opinions of | ||
# the corporation or organization or individual. The authors bear no responsibility for the accuracy, legality or | ||
# content of the external site or for that of subsequent links. Contact the external site for answers to questions | ||
# regarding its content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.