A method and a Cranial Electrical Stimulator CES for operation in a diagnosis, treatment, research, and test mode related to brain disorders, namely to mental disorders, and to neurological disorders, such as migraine and epilepsy, are disclosed. Diagnosis is based on a detected condition of passage of an electric signal via a pathway in the brain defined as passing from a first to a second electrode of a pair of electrodes from an array attached to the skull of a patient. Treatment is achieved by injecting a treatment signal in the pathway detected as having a condition.