Methods and systems for performing optogenetics using X-rays or ultrasound waves are provided. Visible-light-emitting nanophosphors can be provided to a sample, and X-ray stimulation can be used to stimulate the nanophosphors to emit visible light. Alternatively, ultrasonic waves can be provided to the sample to cause sonoluminescence, also resulting in emission of visible light, and this can be aided by the use of a chemiluminescent agent present in the sample. The emitted light can trigger changes in proteins that modulate membrane potentials in neuronal cells.