Correction to: Nature Published online 16 February 2022

In the version of this article initially published, there were composition errors in units listed in the Methods. In the “Tethered-flight behaviour assay” section, first sentence of the second paragraph “2 cm” should have read “2 inch (or 5.08 cm),” while in the first sentence of the third paragraph of that section “2 cm × 2 cm” should have read “2 inch × 2 inch (or 5.08 cm × 5.08 cm).” In the “Two-photon calcium imaging” section, second sentence, “4 cm diameter, 3.5 cm height” should have read “4 inch diameter, 3.5 inch height (or 10.16 cm diameter, 8.89 cm height).” The changes have been made to the HTML and PDF versions of the article