Odor-electric shock learning and memory depends on the simultaneous blue light activation and electric shock stimulation. (A) Timescale of associative conditioning using 10 cycles, continuous blue light with an intensity of 100%, without electric shock. For the olfactory preference test amyl acetate with a dilution of 1:500 was used. (B) Timescale of associative conditioning using 10 cycles, 120 V for electric shocks, but without continuous blue light. For the olfactory preference test amyl acetate with a dilution of 1:500 was used. (C) Associative conditioning without electric shock stimulation but optogenetic Or47a activation led to olfactory preferences, which are statistically not significant within the three groups (one-way ANOVA, p = 0.4062). All three groups showed olfactory preferences, which are statistically significant from zero (one sample t-test, p < 0.0001 for all three groups). (D) Associative conditioning without optogenetic Or47a activation but electric shock stimulation led to olfactory preferences, which are statistically not significant within the three groups (one-way ANOVA, p = 0.3355). All three groups showed olfactory preferences, which are statistically significant from zero (one sample t-test, p < 0.0001 for all three groups). (E) The olfactory preference for amyl acetate conditioned with 120 V was already analyzed in Figure 4D and is just shown for comparison. Differences between groups are depicted below the respective box plots, at which ns indicates p ≥ 0.05. Different lowercase letters indicate statistical significant differences at level p < 0.05. Small circles indicate outliers. Sample size is indicated with the letter n.