Scalp EEG data were collected from an EEG cap housing a 64-electrode BrainVision actiCAP system (Brain Products GmbH, Munich, Germany) that covered the entire brain according to the extended International 10–20 system [
23]. Active circuits for impedance conversion were integrated into the slim actiCAP electrodes, enabling high signal quality at higher impedances than conventional passive electrodes allow. The electrodes were referenced online to an electrode placed on the Fz plane, and a common ground connection was established at the FPz site. The EEG signals were amplified and digitised using a BrainAmp DC amplifier (Brain Products GmbH, Munich, Germany) linked to Brain Vision Recorder software (version 2.1, Brain Products GmbH, Munich, Germany).
Somatosensory-evoked and paired-pulse stimulation was delivered to each patient during the daily EEG recordings. For the two stimulation tests, a Digitimer DS7A device (Digitimer, Welwyn Garden City, Hertfordshire, UK) with constant-current square-wave pulses (0.2-ms width, proximal cathode) was used; the intensity of electrical stimulation of the right median nerve at the wrist was twice the subjective sensory threshold, and no pain response or visible twitching of the flexor digitorum superficialis was elicited. The patients were comfortably seated on a chair in an illuminated room and asked to remain awake with their eyes closed. Evoked brain activity was continually recorded at a digital sampling rate of 1000 Hz. For the somatosensory test, electrical stimulation was delivered at 4 Hz/s to collect 1000 samples of SSEPs, including a prestimulus baseline of 50 ms and poststimulus measurement of 100 ms, for a sufficient number of samples to reliably determine average brainstem responses [
24]. For the paired-pulse paradigm, the stimulation comprised paired pulses applied to the right median nerve with an interstimulus interval of 500 ms and an interpair interval of 8 s [
25]. The length of each recorded trial, except for the prestimulus baseline of 50 ms, was 150 ms. At least 100 artefact-free responses to the first and second pulses of the paired stimuli (hereafter referenced as ‘first response’ and ‘second response’, respectively) were recorded. Notably, to avoid fatigue, a 10-min break was granted between the two tests.
Distributed current source modelling of EEG data was performed using depth-weighted minimum norm estimates (MNEs) [
6,
20,
26], which accurately resolve source localisation, even for deep generators [
27,
28]. The neuronal dynamics of cortical and subcortical sources were determined using a deep brain model that describes the signal patterns generated by a unit dipole, realistically distributing current dipoles over the neocortex and subcortical structures [
28]. This forward model uses the symmetric boundary element method [
29], which provides more accurate results than spherical models provide. Structural brain imaging was performed using a 3 T MR system (Magnetom Tim Trio; Siemens, Malvern, PA, USA) with the following parameters: repetition time, 9.4 ms; echo time, 4 ms; recording matrix, 256 × 256 pixels; field of view, 256 mm; and slice thickness, 1 mm. The shapes of surfaces separating the scalp, skull, and brain compartments were identified using FreeSurfer 7.0 software (Harvard, Cambridge, MA, USA), which was also used for the subcortical segmentation of brain volume. The inverse operator of MNE analysis was used to estimate the distribution of the current sources that account for the data recorded at the electrodes. The aforementioned analysis resulted in distributed and dynamic brain activation that could be mapped onto the reconstructed surface and volume for each patient; consequently, the time-varying current intensity could be extracted from the brainstem (‘volume scout’ function) and S1 (‘surface scout’ function). In the somatosensory-evoked task, the peak current intensity in the brainstem at 12–13 ms and S1 at 17–18 ms was obtained [
18]. To highlight the components from the subcortical generators, the current density values were transformed into
z scores which represented the number of standard deviations from the baseline level. To compare the dynamic neural excitability of different migraine attacks, the current density in each phase of the migraine cycle (
Pre2,
Pre1,
Ictal,
Post1, and
Interictal phases) was also normalised in relation to the ictal day (
Ictal) of the cycle. For the paired-pulse task, the peak S1 current density was obtained, and the gating ratio was subsequently determined (current density of second response/current density of first response) [
6,
20,
25]. Data analysis was performed using Brainstorm software [
30], which has been partially described in our previous papers [
6,
20].