All AnalysisΒΆ

Run all analyses on NWB file

Out:

/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/docs/gallery/analysis_examples/all_analysis.py:33: 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,
/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/stimulus_protocol_analysis.py:68: RuntimeWarning: Mean of empty slice
  output[mf] = np.nanmean(mfd)
{'rheobase_sweep_num': 34, 'thumbnail_sweep_num': 36, 'vrest': -67.88411102294921, 'ri': 196.8751847743988, 'sag': 0.1976964920759201, 'tau': 19.018985944621015, 'vm_for_sag': -86.21875, 'f_i_curve_slope': 0.35240601435252655, 'adaptation': 0.05018917956237554, 'latency': 0.028179999999999872, 'avg_isi': 44.4504761904762, 'upstroke_downstroke_ratio_long_square': 2.7872165672263765, 'peak_v_long_square': 38.28125, 'peak_t_long_square': 0.56728, 'trough_v_long_square': -52.343753814697266, 'trough_t_long_square': 0.5685800000000001, 'fast_trough_v_long_square': -52.3125, 'fast_trough_t_long_square': 0.5685199999999999, 'slow_trough_v_long_square': None, 'slow_trough_t_long_square': None, 'threshold_v_long_square': -38.312503814697266, 'threshold_i_long_square': 70.0, 'threshold_t_long_square': 0.56688, 'upstroke_downstroke_ratio_ramp': 2.8088185451956593, 'peak_v_ramp': 39.395832, 'peak_t_ramp': 5.09762, 'trough_v_ramp': -54.96875, 'trough_t_ramp': 5.099006666666667, 'fast_trough_v_ramp': -54.9375, 'fast_trough_t_ramp': 5.098966666666667, 'slow_trough_v_ramp': -52.645835876464844, 'slow_trough_t_ramp': 5.123726666666667, 'threshold_v_ramp': -38.875, 'threshold_i_ramp': 115.0, 'threshold_t_ramp': 5.097200000000001, 'upstroke_downstroke_ratio_short_square': 2.838388503286185, 'peak_v_short_square': 40.020832, 'peak_t_short_square': 0.5032933333333333, 'trough_v_short_square': -69.06771, 'trough_t_short_square': 0.6069233333333334, 'fast_trough_v_short_square': -52.583332, 'fast_trough_t_short_square': 0.5043666666666667, 'slow_trough_v_short_square': None, 'slow_trough_t_short_square': None, 'threshold_v_short_square': -43.401043, 'threshold_i_short_square': 540.0, 'threshold_t_short_square': 0.5029399999999999}

import os

from allensdk.api.queries.cell_types_api import CellTypesApi
from ipfx.data_set_utils import create_data_set
from ipfx.data_set_features import extract_data_set_features

# 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)
sweep_info = [
    sweep for sweep in sweep_info
    if sweep["stimulus_name"] != "Test"
]

# remove test sweeps
sweep_info = [
    sweep for sweep in sweep_info
    if sweep["stimulus_name"] != "Test"
]

data_set = create_data_set(sweep_info=sweep_info, nwb_file=nwb_file)

cell_features, sweep_features, cell_record, sweep_records = \
    extract_data_set_features(data_set, subthresh_min_amp=-100.0)

print(cell_record)

Total running time of the script: ( 0 minutes 39.936 seconds)

Gallery generated by Sphinx-Gallery