a Schematic representation of the thermal imaging system. b Thermal images of the arena in the three experimental conditions, and (c), at the same scale, thermal conditions predicted by the simulation (see scale bars for temperature). d Side view of a 3 x 8mm section of the experimental chamber, centered on the interface between floor tiles set at 25°/30°, 25°/35°, and 25°/40 °C, respectively, and showing the predicted thermal conditions (note that the glass cover on top is not to scale). e Top view of the simulated thermal gradients the fly encounters at the cool/hot boundary, produced by slicing the 3D model at the height of the antennae (~700 μm; note that the 3 panels are not aligned; scalebar: temperature in °C). f Representative fly trajectories overlaid atop the gradients in (e). Tracks are color-coded by translational speed (see scalebar). Each dot represents the position of the fly head (acquired at 30 Hz). A green dot indicates the fly head position upon entry in the boundary region. g Maximum rate of temperature change (top) and maximum inter-antennal temperature difference (bottom) experienced by flies traversing the border in the three experimental conditions. h Schematic representation of the 2-photon calcium imaging setup and of the cell types targeted for recording (temperature receptor neurons, TRN and second-order projection neurons, TPN). i Average stimuli (bottom) and response traces (top) recorded from TRN axon terminals (orange trace, left) and TPN (purple trace, right) each separately targeted by transgenic expression of G-CaMP7f (traces represent average ±STD of NTRN = 5 from 5 flies, NTPN = 6 from 6 flies). j Orange and purple dots, peak fluorescence averages from data in (i), ± STD (bin width starting at 0.1 °C and doubling in size for each consecutive bin; asterisk = significantly different from zero, one sample t test, P < 0.05; t test TRN: P0.1 = 3.5e−3, P0.2 = 1.5e−6, P0.5 = 4.1e−4; TPN: P0.1 = 2.1e−3, P0.2 = 1.5e−4, P0.5 = 9.0e−5). k, l Exposure to a larger heat stimulus does not lead to sensitization to smaller stimuli. k Average stimuli (bottom) and responses (top) ± STD. l Average peak signal recorded before (a, a′) and after (b, b′) a 6 °C stimulus are not different (n.s. not significant; paired t tests; (k) and (l) are from NTRN = 18, NTPN = 12 from 7 and 6 animals, respectively; note that the twin peaks in (a, a′, b, and b′) are considered independently in (l)).