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 Conclusion Appendix: alternative opsin and neuron models Multi-channel, bidirectional optogenetics Network setup Injecting a multi-channel Light Bidirectional control via a second opsin Open-loop stimulation 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 Run the experiment Conclusion Appendix All-optical control Preamble Brian network setup Microscope configuration 2p stimulation configuration Simulating an all-optical experiment Video visualization Set up the simulation Inject VideoVisualizer Run simulation and visualize Neo export Setup Exporting individual devices Whole-simulation export Trial structure Example analysis use case Advanced LFP Network setup Electrode setup