{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Introduction"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Foutz, T. J., Arlow, R. L., & McIntyre, C. C. (2012). Theoretical principles underlying optical stimulation of a channelrhodopsin-2 positive pyramidal neuron. Journal of Neurophysiology, 107(12), 3235\u20133245. doi:10.1152/jn.00501.2011"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "This folder contains the core source files used to generate the data and figures in the manuscript. The below example script is an ipython notebook file which can be used to generate Figure 2."
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Dependencies"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "These files were run on Mac OS 10.9 using Python 2.7.6 64-bit installed using Canopy 1.3. Canopy is a package from Enthought, who provides free licenses to academic users, and it includes all the dependencies other than NEURON (Mayavi, Matplotlib, numpy). NEURON was installed as a python library using the following installation bash script:\n",
      "    \n",
      "    sudo mkdir /nrn\n",
      "    sudo chown $USER:staff /nrn\n",
      "    cd /nrn\n",
      "    hg clone http://www.neuron.yale.edu/hg/neuron/iv\n",
      "    hg clone http://www.neuron.yale.edu/hg/neuron/nrn\n",
      "    cd /nrn/iv\n",
      "    ./build.sh\n",
      "    ./configure --prefix=/nrn CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64'\n",
      "    make\n",
      "    make install\n",
      "    make clean\n",
      "    cd /nrn\n",
      "    cd /nrn/nrn\n",
      "    make clean\n",
      "    ./build.sh\n",
      "    ./configure --prefix=/nrn --with-iv=/nrn PYLIBLINK='-framework Python' PYLIB='-framework Python' --with-nrnpython=dynamic CC='clang' CXX='clang++' CFLAGS='-O3 -Wno-return-type -Wno-implicit-function-declaration -Wno-implicit-int' CXXFLAGS='-O3 -Wno-return-type -Wno-implicit-function-declaration -Wno-implicit-int'\n",
      "    make\n",
      "    sudo make install\n",
      "    make clean\n",
      "    cd /nrn/nrn/src/nrnpython\n",
      "    python setup.py install"
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Abstract"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Theoretical principles un- derlying optical stimulation of a channelrhodopsin-2 positive pyrami- dal neuron. J Neurophysiol 107: 3235\u20133245, 2012. First published March 21, 2012; doi:10.1152/jn.00501.2011.\u2014Optogenetics is an emerging field of neuromodulation that permits scaled, millisecond temporal control of the membrane dynamics of genetically targeted cells using light. Optogenetic technology has revolutionized neuro- science research; however, numerous biophysical questions remain on the optical and neuronal factors impacting the modulation of neural activity with photon-sensitive ion channels. To begin to address such questions, we developed a computational tool to explore the under- lying principles of optogenetic neural stimulation. This \u201clight-neuron\u201d model consists of theoretical representations of the light dynamics generated by a fiber optic in brain tissue, coupled to a multicompart- ment cable model of a cortical pyramidal neuron embedded with channelrhodopsin-2 (ChR2) membrane dynamics. Simulations re- vealed that the large energies required to generate an action potential are primarily due to the limited conductivity of ChR2, and that the major determinants of stimulation threshold are the surface area of illuminated cell membrane and proximity to the light source. Our results predict that the activation threshold is sensitive to many of the properties of ChR2 (density, conductivity, and kinetics), tissue me- dium (scattering and absorbance), and the fiber-optic light source (diameter and numerical aperture). We also illustrate the impact of redistributing the ChR2 expression density (uniform vs. nonuniform) on the activation threshold. The model system developed in this study represents a scientific instrument to characterize the effects of opto- genetic neuromodulation, as well as an engineering design tool to help guide future development of optogenetic technology."
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Import NEURON library"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from neuron import h\n",
      "h.load_file(\"stdrun.hoc\")\n",
      "h.cvode_active(1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 1,
       "text": [
        "1.0"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Instantiate cell, stimulator and simulation classes"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Cell model is taken from *Distinct contributions of Na(v)1.6 and Na(v)12 in action potential initiation and backpropagation*, Hu *et al.*, Nat Neurosci (2009). For details regarding the cell and optical fiber models, see source code and manuscript."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from classes import Hu, Optrode, Sim\n",
      "cell = Hu()\n",
      "optrode = Optrode(h.soma)\n",
      "sim = Sim(cell,optrode,output_filename='csv/distance_threshold.csv')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Run simulation"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "This example recreates the data for Figure 2c in the manuscript. It determines the threhold for generating an action potential at a range of distances from the cell body, and for a range of fiber diameters. It takes about XXX minutes on my macbook pro laptop. The output is already in the csv folder. Uncomment this section if you desire to regenerate the results on your hardwar, or to adjust the parameters."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#distances=xrange(100, 2000 + 50, 50)\n",
      "#fiber_diameters = [0.1,0.2,0.4]\n",
      "#params   = [{'Distance (um)':d,\n",
      "#             'Fiber Optic Diameter (mm)':f} \n",
      "#            for d in distances \n",
      "#            for f in fiber_diameters]\n",
      "#sim.main(params)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Plot results"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "iPython notebooks can plot matplotlib inline if desired using the following *magic* command"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%pylab inline"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Populating the interactive namespace from numpy and matplotlib\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Use matplotlib to display the distance versus threshold results."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from matplotlib import pyplot\n",
      "from classes import Data\n",
      "from functions import make_legend\n",
      "\n",
      "# Simulation\n",
      "ds = Data('csv/distance_threshold.orig.csv')\n",
      "# ds = Data('csv/distance_threshold.csv') # Use this filename if you ran your own simulations\n",
      "ds.sort('Distance (um)')\n",
      "\n",
      "# Strength-Distance\n",
      "fig = pyplot.figure(figsize=(3.5,2.5))\n",
      "styles = iter(['b--','g-.','r'])\n",
      "for f in [0.1,0.2,0.4]:\n",
      "    ds.set_slice(ds.data['Fiber Optic Diameter (mm)']==f)\n",
      "    pyplot.semilogy(ds.slice['Distance (um)'],ds.slice['Threshold (W/cm2)'],\n",
      "                    styles.next(),\n",
      "                    label='%.1f' % f)\n",
      "pyplot.plot([1400], [38.0], '*', color='0.5',label='Aravanis (0.2)') # Aravanis data point\n",
      "pyplot.xlabel('Distance (um)')\n",
      "pyplot.ylabel('Threshold (W/cm2)')\n",
      "pyplot.xlim([0,2000])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 5,
       "text": [
        "(0, 2000)"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAC8CAYAAACaEwCbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXtclNX2/z8DopmEaeGIoKJcJC6CBJggXk4YWIjXdNTU\n8JYWaZpH7Hx/5wv2LZNOHeOYnrQjapSGecNS0DQIr5CKaKKIMZPEzbtcBIaZWb8/ds5xBOT2zPPM\n6H6/Xrx0nuHZ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Y6Dd3AeybvXv37gCAr776ClqtttG+ZDIZ+vXrh5KS\nEpw8eRIAUFFRAa1Wi9DQUKxdu1Y/YC9duoS7d+8a3P/ss8+isrJS/7h3797Izc2FWq3G7du38dNP\nPzXY74OznPspKSlB7969G32e0zL4jMGMqa6uxoABA1BXV4d27dph+vTpWLx4MQDDffrx8fFIS0uD\nhYUFPD09MXLkSMhkMlhaWsLHxweRkZF48803MX78eHz11VcICwvTLw3utfUgVlZWSEpKwttvv43q\n6mo8+eSTOHjwIGbPng2VSgVfX18QEbp164Zdu3YZ3GtpaQlPT0/k5eWhX79+6NmzJyZOnAhPT0/0\n6dMHvr6+Db7eB2sP3P//rKwsDBkypPVvJscAvomKIwmbNm1CWVkZoqOjBWlv6tSpWLJkCQYMGCBI\ne487fCnBkYQpU6Zg7969giQ4Xb16Fbdv3+ZGQUD4jIHD4dSDzxg4HE49uGHgcDj14IaBw+HUgxsG\nDodTD24YOBxOPbhh4HA49fj/5MsP6zoY5EUAAAAASUVORK5CYII=\n",
       "text": [
        "<matplotlib.figure.Figure at 0x102b88350>"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Visualize Simulation Rig"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "2D visualization of the neuron geometry can be done in matplotlib using the cell's *plot* method. The *plot* method generates the cell's trajectory with a color overlay determined by an arbitrary input function that is run for each NEURON section. In this example, the input function returns the section's intracellular voltage."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from matplotlib import pyplot\n",
      "plot_func = lambda sec:sec.v\n",
      "h.run()\n",
      "cell.plot(plot_func)\n",
      "pyplot.show()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "----------------------------------------------------------------------------------------------------\n",
        "DATA RANGE: "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " -74.3259201863 -70.0808863932\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAD5CAYAAADbY2myAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt0W+Wd7//31t33+1VybCe24/iSxCQkaQvUFBwCHUJy\naAOcLggF5swJa1p6OXOY1d9qJ8xvUejvrJ45M0yz1hwmnUlppwmlDQlt4wboGAoFB5JwSRwSJ7bj\nm2zHd9mSddl6fn9YiDgJQTiyJYfvay0W9taW/N2Soo/28zz7eTSllEIIIYSIgCHWBQghhFg4JDSE\nEEJETEJDCCFExCQ0hBBCRExCQwghRMRMsS4gUpqmxboEIYRYkKI5SHZBnWkopRbsf3/3d38X8xqk\n/tjX8VmsfyHXfjXUH20LKjSEEELEloSGEEKIiElozJP6+vpYl3BFpP7YWsj1L+TaYeHXH22amotG\nrzmgadqctM8JIcTVLNqfnXKmIYQQImISGkIIISImoSGEECJiEhpCCCEiJqEhhBAiYhIaQgghIiah\nIYQQImISGkIIISImoSGEECJiEhpCCCEiJqEhhBAiYhIaQgghIiahIYQQImISGkIIISImoSGEECJi\nEhpCCCEidkWh8cADD5CXl0dtbW142/DwMA0NDVRUVLB+/XpGR0fDtz3xxBOUl5dTWVnJwYMHw9sP\nHz5MbW0t5eXlPPLII1dSkhBCiDl0RaHx9a9/ncbGxhnbnnzySRoaGjh16hQ33XQTTz75JAAtLS3s\n2bOHlpYWGhsbefjhh8OrSW3bto2dO3fS2tpKa2vrRY8phBAiPlxRaFx//fVkZGTM2LZ//362bt0K\nwNatW3n++ecB2LdvH/fccw9ms5mSkhLKyspobm7G6XTicrlYs2YNAPfdd1/4PkIIIeKLKdoP2N/f\nT15eHgB5eXn09/cD0Nvby7p168L7ORwOenp6MJvNOByO8Ha73U5PT88lH3v79u3hn+vr62XBdyGE\nuEBTUxNNTU1z9vhRD43zaZqGpmlRe7zzQ0MIIcTFLvxC/d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zGhovvvjip76PxWLBYrEAcM0117BkyRJaW1sjmjW3sLAwqrPmzqb+K5n1N9r1ny/SY3nooYfC\ngfhpjsVut0e13tm6sOaurq4Z36ziRUFBAQA5OTls3ryZQ4cOkZeXR19fH/n5+TidTnJzc4FLvw7x\n8Hx/mnrj8X3zYb2wMN73fr+fO++8k3vvvZdNmzYB8/MaxGXz1PntioODg+i6DkBbWxutra0sXryY\ngoKCuJ01Vy3wWX+dTmf4571794ZHmHyaY/nwTRxrq1evprW1lY6ODnw+H3v27GHjxo2xLmsGt9uN\ny+UCYHJykoMHD1JbWzvjfbBr167wc/pxr0Osfdp64+19s5De90opHnzwQaqqqvjWt74V3j4vr0E0\ne/SvxG9+8xvlcDiUzWZTeXl5asOGDUoppZ577jlVXV2tVq5cqa655hr129/+Nnyft99+W9XU1Kgl\nS5aob3zjG+HtU1NT6qtf/aoqKytTa9euVe3t7TGrXymlHn/8cbVkyRK1dOlS1djYGJf1n+/ee+9V\ntbW1avny5eqOO+5QfX194ds+7bHEg9///veqoqJCLVmyRP3whz+MdTkXaWtrUytWrFArVqxQ1dXV\n4RqHhobUTTfdpMrLy1VDQ4MaGRkJ3+fjXof5cvfdd6uCggJlNpuVw+FQP/3pT2dVb6zeNxfWv3Pn\nzgX1vv/Tn/6kNE1TK1asUCtXrlQrV65UBw4cmJfXYMFMWCiEECL24rJ5SgghRHyS0BBCCBExCQ0h\nhBARk9AQQggRMQkNIYQQEZPQEEIIEbH/HyizeiV0Foh2AAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x108c25b10>"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "3D visualization of the neuron geometry requires Mayavi, a 3d visualization library based on VTK. It is done with a *display* method. Again, the color is determined by an arbitary function run on each NEURON section (here I use the same function as above). The optical fiber can also be represented using a *display* method."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "cell.display(plot_func)\n",
      "optrode.display(bounds=[[-1000,1000],[-1000,1000],[0,2000]])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "ename": "RuntimeError",
       "evalue": "module compiled against API version 9 but this version of numpy is 6",
       "output_type": "pyerr",
       "traceback": [
        "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mRuntimeError\u001b[0m                              Traceback (most recent call last)",
        "\u001b[0;31mRuntimeError\u001b[0m: module compiled against API version 9 but this version of numpy is 6"
       ]
      },
      {
       "ename": "ImportError",
       "evalue": "numpy.core.multiarray failed to import",
       "output_type": "pyerr",
       "traceback": [
        "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m                               Traceback (most recent call last)",
        "\u001b[0;32m<ipython-input-7-b6e8e5e563ad>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mcell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdisplay\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mplot_func\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      2\u001b[0m \u001b[0moptrode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdisplay\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbounds\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1000\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m1000\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1000\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m1000\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m2000\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/nrnmodels/20150518/153196/repo/FoutzEtAl2012/classes.py\u001b[0m in \u001b[0;36mdisplay\u001b[0;34m(self, func, segfunc, scaling, replace, clim, colormap)\u001b[0m\n\u001b[1;32m    178\u001b[0m             \u001b[0;32mfrom\u001b[0m \u001b[0menthought\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmlab\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpipeline\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    179\u001b[0m         \u001b[0;32mexcept\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 180\u001b[0;31m             \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmlab\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    181\u001b[0m             \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmlab\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpipeline\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    182\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mreplace\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/mayavi/mlab.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     26\u001b[0m \u001b[0;31m# Mayavi imports\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 27\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcamera\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mview\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mroll\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0myaw\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpitch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmove\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     28\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfigure\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mfigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mclf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgcf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msavefig\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;31m \u001b[0m\u001b[0;31m\\\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     29\u001b[0m     \u001b[0mdraw\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msync_camera\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mclose\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mscreenshot\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/mayavi/tools/camera.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     23\u001b[0m \u001b[0;31m# We can't use gcf, as it creates a circular import in camera management\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     24\u001b[0m \u001b[0;31m# routines.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mengine_manager\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mget_engine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     26\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     27\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/mayavi/tools/engine_manager.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     12\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpreferences\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpreference_manager\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     13\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mregistry\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mregistry\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mengine\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mEngine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     15\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moff_screen_engine\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mOffScreenEngine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     16\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnull_engine\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mNullEngine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/mayavi/core/engine.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     26\u001b[0m \u001b[0;31m# Local imports.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 27\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbase\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mBase\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     28\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscene\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mScene\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     29\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmayavi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcommon\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0merror\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mprocess_ui_events\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/mayavi/core/base.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     17\u001b[0m     HasTraits, WeakRef, on_trait_change)\n\u001b[1;32m     18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtraitsui\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTreeNodeObject\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 19\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtvtk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpyface\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtvtk_scene\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTVTKScene\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     20\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mapptools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpersistence\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mstate_pickler\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mpyface\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresource\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mresource_path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/pyface/tvtk_scene.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     22\u001b[0m      \u001b[0mProperty\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInstance\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mEvent\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRange\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mBool\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTrait\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mStr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     23\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 24\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtvtk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpyface\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlight_manager\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     26\u001b[0m \u001b[0mVTK_VER\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtvtk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mVersion\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvtk_version\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/pyface/light_manager.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m    128\u001b[0m \u001b[0;31m# `CameraLight` class.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    129\u001b[0m \u001b[0;31m######################################################################\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 130\u001b[0;31m \u001b[0;32mclass\u001b[0m \u001b[0mCameraLight\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mHasTraits\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    131\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    132\u001b[0m     \u001b[0;34m\"\"\"This class manages a tvtk.Light object and a LightGlyph object.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/pyface/light_manager.py\u001b[0m in \u001b[0;36mCameraLight\u001b[0;34m()\u001b[0m\n\u001b[1;32m    144\u001b[0m     activate = Trait(False, false,\n\u001b[1;32m    145\u001b[0m                      desc=\"specifies if the light is enabled or not\")\n\u001b[0;32m--> 146\u001b[0;31m     \u001b[0msource\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mInstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtvtk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mLight\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    147\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    148\u001b[0m     \u001b[0;31m# FIXME: Traits Delegation does not work correctly and changes to\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/tvtk_classes.zip/tvtk_classes/tvtk_helper.py\u001b[0m in \u001b[0;36m<lambda>\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    218\u001b[0m     \u001b[0mLabelHierarchyIterator\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproperty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mget_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'LabelHierarchyIterator'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    219\u001b[0m     \u001b[0mLabelRenderStrategy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproperty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mget_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'LabelRenderStrategy'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 220\u001b[0;31m     \u001b[0mLight\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproperty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mget_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Light'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    221\u001b[0m     \u001b[0mLightKit\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproperty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mget_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'LightKit'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    222\u001b[0m     \u001b[0mLineIntegralConvolution2D\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproperty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mget_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'LineIntegralConvolution2D'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/tvtk_classes.zip/tvtk_classes/tvtk_helper.py\u001b[0m in \u001b[0;36mget_class\u001b[0;34m(name)\u001b[0m\n\u001b[1;32m     34\u001b[0m     \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     35\u001b[0m         \u001b[0mfname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcamel2enthought\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 36\u001b[0;31m         \u001b[0mmod\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_module\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     37\u001b[0m         \u001b[0mklass\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmod\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     38\u001b[0m         \u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mklass\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/tvtk_classes.zip/tvtk_classes/tvtk_helper.py\u001b[0m in \u001b[0;36mget_module\u001b[0;34m(fname)\u001b[0m\n\u001b[1;32m     26\u001b[0m         \u001b[0;31m# inside the tvtk_classes ZIP file and are local to the\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     27\u001b[0m         \u001b[0;31m# current module: tvtk_helper.py\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 28\u001b[0;31m         \u001b[0mmod\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m__import__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'tvtk.tvtk_classes.%s'\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0mfname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mglobals\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlocals\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mfname\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     29\u001b[0m     \u001b[0;32mreturn\u001b[0m \u001b[0mmod\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     30\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/tvtk_classes.zip/tvtk_classes/light.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n",
        "\u001b[0;32m/Users/morse/anaconda/lib/python2.7/site-packages/tvtk/array_handler.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     27\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     28\u001b[0m \u001b[0;31m# Enthought library imports.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 29\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtvtk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0marray_ext\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mset_id_type_array\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     30\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     31\u001b[0m \u001b[0;31m# Useful constants for VTK arrays.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;31mImportError\u001b[0m: numpy.core.multiarray failed to import"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Move Neuron"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "To move the neuron in space, just use the *move* method. Here we move by 50 um along each axis. Here we stop the simulation during the light pulse at time 4 ms so that we can plot the irradiance of the section."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from mayavi import mlab\n",
      "mlab.figure()\n",
      "cell.move([50,50,50])\n",
      "h.tstop = 4\n",
      "h.run()\n",
      "plot_func = lambda sec:sec.irradiance_chanrhod\n",
      "cell.display(plot_func)\n",
      "optrode.display(bounds=[[-1000,1000],[-1000,1000],[0,2000]])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Further Questions"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Please see the source code and manuscript for more information regarding the model and simulation design. Feel free to contact the authors if additional code resources are needed.\n",
      "\n",
      "-- Tom Foutz (tfoutz@uw.edu) -- March 15, 2014 --"
     ]
    }
   ],
   "metadata": {}
  }
 ]
}