Text this: Closed-loop two-photon functional imaging in a freely moving animal