{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\nSweep QC Features\n=================\n\nEstimate sweep QC features\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "from __future__ import print_function\n\nimport os\nimport pandas as pd\nfrom ipfx.data_set_utils import create_data_set\nfrom ipfx.qc_feature_extractor import sweep_qc_features\nfrom allensdk.api.queries.cell_types_api import CellTypesApi\n\n# Download and access the experimental data\nct = CellTypesApi()\nnwb_file = os.path.join(\n    os.path.dirname(os.getcwd()), \n    \"data\",\n    \"nwb2_H17.03.008.11.03.05.nwb\"\n)\nspecimen_id = 595570553\nsweep_info = ct.get_ephys_sweeps(specimen_id)\n\ndata_set = create_data_set(sweep_info=sweep_info, nwb_file=nwb_file)\n\n# run sweep QC\nsweep_features = sweep_qc_features(data_set)\n\nprint(pd.DataFrame(sweep_features).head())"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}