TITLE: Fiber Photometry Acquisition
AUTHORS: Jonathan Tang

[DESCRIPTION]
Fiber Photometry Acquisition parameters and protocol for Tang et al 2023.  

[BEFORE_START]
Mice have undergone surgery 1 month prior to the acquisition. 

[GUIDELINES]
Closed-Loop Optogenetics Setup and Parameters:  
For close loop optogenetics, a computer running a Bonsai script captured and recorded wireless sensor motion data and video information as described above in grey-walled open-field experiment. Here, data is also streamed to a customMATLAB code which analyzes action composition changes over the course of action reinforcement, we used the EMD metric to label individual 300 ms motion histograms with an actionID. For each arriving 300-ms segment we calculate the EMD distance
between each cluster exemplar (or representative) of the ground truth cluster library from the grey open field behavior recording. The motion features histogram is assigned to the action for which comparison with the exemplar gave the lowest EMD score (most similar to target) among stall comparisons. Decision making for stimulation has a range of 35-55 ms time gap between action performance and sent decision for stimulation. To trigger optogenetics, a Multi-Pulse WidthModulation (PWM) generator (Harp Multi-PWM Generator hardware v1.1, Assembly v1, Harp v1.4, Firmware v1.1; Harp Multi-PWMGenerator software v2.1.0; Champalimaud Scientific Platform) converts each decision to trigger laser into electrical signals for 15 light pulses of 10 ms pulse duration at 25 Hz, with each train of pulses occurring over 600 ms and at 25% duty
cycle. The multi-PWM signal is passed through a 12 V, 7.2 W amplifier (Champalimaud Scientific Platform) and fixed frequency driver(Opto-electronic, MODA110-D4-30 (2001.320220)) to control the activities of a 473 nm, blue low noise laser (ShanghaiDream Lasers Technology, Co, Ltd. SDL-473-200T), which was sent through an acousto-optic modulator(Opto-electronic, MTS110-A3-V1S (1001 / 330433)).The laser component that is modulated is then reflected by a mirror and funneled to a mono fiberoptic patchcord, which is then coupled to a commutator. The output laser is then passed through a dual-optic fiber patchcord and connected to the implant cannula. Power adjustment out of the tip of patchcord was made so that ~5mW was emitted from each end of the dual optic fiber cannula. To ensure common time stamps from different channels, a clock synchronization device (HarpClock Sync v1.0;Champalimaud Scientific Platform) was performed between the basestation and multi-PWM device.

[STEPS]
SECTION: Habituation
1. One-month post-surgery, mice were habituated to head-mounted equipment for 2 days. 

On day 1, an actual or mock wireless inertial sensor(~2.5 cm H x 1 cm L x 0.5 cm W with ~ 2.5-3.0 cm antennae, ~1.8 g weight)glued to the 4-position connector(Harwin Inc., M52-040023V0445) was attached to the implanted receptacle connector on the skull cap. 
Individual mice roamed freely in the home cage for 1 hour. 
SECTION: Habituation
2. On day 2, a multi-fiber bundled patch cord (3 fiber bundle, 400/440μm diameter for a maximum of inner diameter at 900 μm, 0.37 NA, 3.5 m long, 1.25 mm fiber tip diameter, low-autofluorescence; Doric, BBP(3)_400/440/900-0.37_3.5m_FCM-3xMF1.25_LAF) was attached to individual mice in addition to the wireless sensor and optogenetic patchcord. 
Individual mice were allowed to habituate to the equipment for 1 hour in its home cage. 
SECTION: Recording Day
3. Mice were attached to the head-mounted equipment and subjected to 30 frames per second photometry recording (FP3002, Neurophotometrics), with 75-150 μW 560 nm LED illuminating rDA1m, and equivalent closed loop optogenetic parameters described in Guidelines section.
SECTION: Recording Day
4. To test for DA release in the context of closed loop optogenetic setup, an average of 30 hits of blue light were delivered randomly within the span of 30 minutes. 
SECTION: Recording Day
5. To evaluate DA release in the context of food reward, mice were placed on an IACUC approved food deprivation protocol and kept within 85% of original weight. Mice were placed in an operant chamber with a nosepoke linked to a lick detector (PyControl). Each lick detection triggers dispensing 2 μl 10% sucrose. 

Note: Since animals tend to accidentally trigger lick detector at the beginning of sessions, between 40-50 sucrose dispensing events were gathered per animal and rDA1m activities associated with the last 35 rewards of the session were used for analysis.