Tutorials# Electrode recording Network setup Specifying electrode coordinates Specifying signals to record Simulation and results Optogenetic stimulation Create a Markov opsin-compatible network Assign coordinates and configure optogenetic model Open-loop optogenetic stimulation IO processor setup Run simulation and plot results Conclusion Appendix: alternative opsin and neuron models Configure LIF models Comparing to more realistic models Opsin configuration Simulation Results Multi-channel, bidirectional optogenetics Network setup Injecting a multi-channel Light Bidirectional control via a second opsin Open-loop stimulation Run simulation and plot results Conclusion On-off control Set up network Run simulation IO processor setup Conclusion PI control Create the Brian network Run simulation without control: Constructing a closed-loop simulation Run the simulation Conclusion LQR optimal control using ldsctrlest Network setup Coordinates, stimulation, and recording Prepare controller Fit model Design controller LQR optimal control Run the experiment Conclusion Appendix Adaptive control Post-hoc firing rate estimate Video visualization Set up the simulation Network Coordinates and optogenetics Simulator, optogenetics injection Processor Inject VideoVisualizer Run simulation and visualize Neo export Setup Exporting individual devices Whole-simulation export Trial structure Example analysis use case