Schematic diagram with example data describing the principal data preprocessing workflow used to remove noise and artifacts from raw photometry signals and convert them into appropriate units for comparison across sessions and subjects. Each box describes the function and methods for implementation of a discrete preprocessing stage. Example data are from photometry recordings targeting the nucleus accumbens core of wild-type C57BL/6 mice co-expressing dLight1.1 (pAAV5-CAG-dLight1.1) and a tdTomato control (pssAAV-2/5-hSyn1-chI-tdTomato-WPRE-SV40p(A)), during performance of a flexible, reward-guided decision-making task. Example input and output signals from each preprocessing stage (direction indicated by arrows) illustrate how the signals are modified at each step in the process. When multiple implementation options exist for a given stage, the method applied to the example data is indicated in the description. Where useful for illustrating the impact of a given preprocessing stage on both long and short timescales, both session data (approx. 90 min session, left plots) and a zoomed-in view of a 60-s window (right plots, with gray background) are plotted side-by-side. The onset of reward cues is indicated by blue ticks and triangles in session and 60-s window plots, respectively. dLight signals are plotted in green with units indicated on the left y axis, and tdTomato (control) signals plotted in red with units indicated on the right y axis. The double exponential fits of the denoised signals used to estimate photobleaching are overlaid in black. The correlation between tdTomato (control) and dLight signals at each time point in the session was used to estimate motion artifacts (right of movement correction box). The estimated signal due to motion artifacts (blue trace, offset by -0.04 for ease of viewing) is plotted along with the final motion-corrected signal. The normalized units (Zscore) of the final, motion-corrected signals are indicated on the left y axis, and raw units (volts) on right y axis.