A method for closed-loop presentation of sensory stimuli conditional on the internal brain-state of awake animals