A method for in vivo circuit analysis of a brain of an individual, comprising: i) illuminating a first region of a brain with: a first set of light pulses; and a second set of light pulses, wherein the first set has a different temporal pattern of light pulses from the second set, wherein the first region comprises neurons that generate action potentials upon activation, using light pulses of the first and second sets, of a first light-activated polypeptide expressed by the neurons of the first region, wherein the action potentials are generated at a frequency that scales quantitatively with the temporal pattern of the light pulses of the first and second sets; ii) measuring, in a second region of the brain using functional magnetic resonance imaging (fMRI) scanning of a plurality of brain regions: a first change in neural activity induced by the first set of light pulses; and a second change in neural activity induced by the second set of light pulses; iii) identifying a dynamic functional connection from the neurons of the first region to neurons of the second region based on a first difference between the first measured change and the second measured change; characterized in that the method further comprises: iv) illuminating the first region by the first set of light pulses, with and without illumination of a third region with a third set of light pulses, wherein modulation of the activity of neurons of the third region is disrupted by activation, upon illumination of the third region, of a second light-activated polypeptide expressed by the neurons of the third region, wherein the third region comprises neurons whose activity is modulated by activity of the neurons of the first region; v) measuring, in the second region: a third change in neural activity induced by the first set of light pulses without illumination of the third region; and a fourth change in neural activity induced by the first set of light pulses with illumination of the third region by the third set of light pulses; and vi) identifying, based on a second difference between the third measured change and the fourth measured change, a modulatory node of the dynamic functional connection, the modulatory node comprising neurons of the third region, wherein the neurons of the third region have a functional connection between neurons of the first region and the second region. i) illuminating a first region of a brain with: a first set of light pulses; and a second set of light pulses, wherein the first set has a different temporal pattern of light pulses from the second set, wherein the first region comprises neurons that generate action potentials upon activation, using light pulses of the first and second sets, of a first light-activated polypeptide expressed by the neurons of the first region, wherein the action potentials are generated at a frequency that scales quantitatively with the temporal pattern of the light pulses of the first and second sets; a first set of light pulses; and a second set of light pulses, wherein the first set has a different temporal pattern of light pulses from the second set, ii) measuring, in a second region of the brain using functional magnetic resonance imaging (fMRI) scanning of a plurality of brain regions: a first change in neural activity induced by the first set of light pulses; and a second change in neural activity induced by the second set of light pulses; a first change in neural activity induced by the first set of light pulses; and a second change in neural activity induced by the second set of light pulses; iii) identifying a dynamic functional connection from the neurons of the first region to neurons of the second region based on a first difference between the first measured change and the second measured change; characterized in that the method further comprises: iv) illuminating the first region by the first set of light pulses, with and without illumination of a third region with a third set of light pulses, wherein modulation of the activity of neurons of the third region is disrupted by activation, upon illumination of the third region, of a second light-activated polypeptide expressed by the neurons of the third region, wherein the third region comprises neurons whose activity is modulated by activity of the neurons of the first region; v) measuring, in the second region: a third change in neural activity induced by the first set of light pulses without illumination of the third region; and a fourth change in neural activity induced by the first set of light pulses with illumination of the third region by the third set of light pulses; and a third change in neural activity induced by the first set of light pulses without illumination of the third region; and a fourth change in neural activity induced by the first set of light pulses with illumination of the third region by the third set of light pulses; and vi) identifying, based on a second difference between the third measured change and the fourth measured change, a modulatory node of the dynamic functional connection, the modulatory node comprising neurons of the third region, wherein the neurons of the third region have a functional connection between neurons of the first region and the second region.