Note
Click here to download the full example code
Sweep QC FeaturesΒΆ
Estimate sweep QC features
Out:
/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/docs/gallery/qc_examples/sweep_qc.py:25: VisibleDeprecationWarning: Function create_ephys_data_set is deprecated. Instead of using ipfx.data_set_utils.create_data_set, use ipfx.dataset.create.create_ephys_data_set
data_set = create_data_set(sweep_info=sweep_info, nwb_file=nwb_file)
/home/docs/checkouts/readthedocs.org/user_builds/ipfx/envs/v1.0.0.1/lib/python3.7/site-packages/hdmf/spec/namespace.py:470: UserWarning: ignoring namespace 'hdmf-common' because it already exists
warn("ignoring namespace '%s' because it already exists" % ns['name'])
/home/docs/checkouts/readthedocs.org/user_builds/ipfx/envs/v1.0.0.1/lib/python3.7/site-packages/hdmf/spec/namespace.py:470: UserWarning: ignoring namespace 'core' because it already exists
warn("ignoring namespace '%s' because it already exists" % ns['name'])
/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/create.py:124: VisibleDeprecationWarning: Class EphysDataSet is deprecated. Import EphysDataSet from ipfx.dataset.ephys_dataset rather than ipfx.ephys_dataset
data=nwb_data,
sweep_number stimulus_units ... tags stimulus_amplitude
0 5 pA ... [] 151.875
1 6 pA ... [] 151.875
2 7 pA ... [] 137.875
3 8 pA ... [] 100.000
4 9 pA ... [] 200.000
[5 rows x 28 columns]
from __future__ import print_function
import os
import pandas as pd
from ipfx.data_set_utils import create_data_set
from ipfx.qc_feature_extractor import sweep_qc_features
from allensdk.api.queries.cell_types_api import CellTypesApi
# Download and access the experimental data
ct = CellTypesApi()
nwb_file = os.path.join(
os.path.dirname(os.getcwd()),
"data",
"nwb2_H17.03.008.11.03.05.nwb"
)
specimen_id = 595570553
sweep_info = ct.get_ephys_sweeps(specimen_id)
data_set = create_data_set(sweep_info=sweep_info, nwb_file=nwb_file)
# run sweep QC
sweep_features = sweep_qc_features(data_set)
print(pd.DataFrame(sweep_features).head())
Total running time of the script: ( 0 minutes 18.866 seconds)