(A) Ethograms representing 32 flies stimulated with different light intensities (0.34, 0.68, 1.02, and 1.36 mW/cm2). The green bars represent the periods of light activation, lasting 2 min each, to optogenetically induce grooming. (B) Ethograms showing periodic f-h alternations (beige color), non-periodic f-h alternations (purple), and other (non-anterior grooming) behaviors (black). (C , D) Periodicity Indexes (PIs) for head sweeps and leg rubs, respectively, across the four light intensities. (E) Frequencies of leg rubs across the light intensity levels. (F) PIs for the long time scale. (G) Periodic to non-periodic behavior ratio (for the long time scale) across the four light intensities. (H) Similar as in (E) but for the long time scale.