diff --git a/docs/gallery/domain/ecephys.py b/docs/gallery/domain/ecephys.py index ee2d69a16..c2fed9804 100644 --- a/docs/gallery/domain/ecephys.py +++ b/docs/gallery/domain/ecephys.py @@ -350,10 +350,26 @@ ecephys_module.add(event_detection) -####################### -# # If you do not want to store the raw voltage traces and only the waveform 'snippets' surrounding spike events, -# # you should use :py:class:`~pynwb.ecephys.SpikeEventSeries` objects. +###################################### +# If you do not want to store the raw voltage traces and only the waveform 'snippets' surrounding spike events, +# you should use :py:class:`~pynwb.ecephys.SpikeEventSeries` objects. # +# NWB also provides a way to store features of spikes, such as principal components, using the +# :py:class:`~pynwb.misc.FeatureExtraction` class. + +from pynwb.ecephys import FeatureExtraction + +feature_extraction = FeatureExtraction( + name="PCA_features", + electrodes=all_table_region, + description=["PC1", "PC2", "PC3", "PC4"], + times=[.033, .066, .099], + features=np.random.rand(3, 12, 4), # time, channel, feature +) + +ecephys_module.add(feature_extraction) + +##################################### # Designating electrophysiology data # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # As mentioned above, :py:class:`~pynwb.ecephys.ElectricalSeries` objects