Browse Source

업데이트 'README.md'

Hio-Been Han 4 years ago
parent
commit
22d5c9ad77
1 changed files with 16 additions and 19 deletions
  1. 16 19
      README.md

+ 16 - 19
README.md

@@ -7,8 +7,11 @@ A set of high-density EEG (electroencephalogram) recording obtained from awake,
 * Authors: Eunjin Hwang, Hio-Been Han, Jeongyeong Kim, & Jee Hyun Choi [corresponding: jeechoi@kist.re.kr]
 * Version: 1.0.0
 * Related publication: [Hwang et al., 2019, *Brain Structure and Function*](https://link.springer.com/article/10.1007/s00429-019-01845-5). 
+* Dataset repository: G-Node GIN, https://gin.g-node.org/hiobeen/Mouse_hdEEG_ASSR_Hwang_et_al/
+
+**Step-by-step tutorial is included, fully functioning with _Google Colaboratory_ environment. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/gist/Hio-Been/c4ed1949eee53910718c1d35b0f20944/data_description_gin-mouse_hdeeg_assr_hwang_et_al.ipynb]
+
 
-**Step-by-step tutorial is included, fully functioning with _Google Colaboratory_ environment. [Open in COLAB [*data_description.ipynb*]](http://colab.research.google.com)**
 <br>
 <br>
 
@@ -47,7 +50,7 @@ As the data are saved in EEGLAB format, you need to install appropriate module t
 
 *[MNE-python]* https://martinos.org/mne/stable/index.html
 <br>
-
+<br>
 ## Part 1. Accessing dataset
 <br>
 
@@ -55,7 +58,7 @@ As the data are saved in EEGLAB format, you need to install appropriate module t
 
 The dataset has been uploaded on G-Node and can be accessed by git command, by typing <code>git clone https://gin.g-node.org/hiobeen/Mouse_hdEEG_ASSR_Hwang_et_al</code>. However, it's currently not functioning because of the large size of each dataset (>100 MB). Instead, you can use <code>gin</code> command or custom function written below to copy dataset into your work environment. Also, you need to install *MNE-Python* module using *pip* command to load EEGLAB-formatted EEG data.
 
-> Warning: Direct clonning using *git clone git@gin.g-node.org:/hiobeen/Mouse_hdEEG_ASSR_Hwang_et_al.git* may not work because of the large size of each dataset (>100 MB).
+> Warning: Direct cloning using *git clone git@gin.g-node.org:/hiobeen/Mouse_hdEEG_ASSR_Hwang_et_al.git* may not work because of the large size of each dataset (>100 MB).
 
 To download dataset and install MNE-python module into your environment (local machine/COLAB), try running scripts below.
 
@@ -84,7 +87,7 @@ def download_dataset( dataset_to_download = range(1,7), dir_dataset = dir_datase
     file_ids.append( 'rawdata/epochs_animal%s.fdt'%set_id )
 
   # Request & download
-  repo_url = 'https://gin.g-node.org/hiobeen/Mouse_hdEEG_ASSR_Hwang_et_al/raw/c18f6bf9c2d31f6a1f01621e0616f3d1d1e71e3a/'
+  repo_url = 'https://gin.g-node.org/hiobeen/Mouse_hdEEG_ASSR_Hwang_et_al/raw/9a35f6b1a53f87a96d76b8b7912738cb7d8d3d36/'
   for file_id in file_ids:
     fname_dest = "%s%s%s"%(dir_origin, dir_dataset, file_id)
     if path.isfile(fname_dest) is False:
@@ -275,8 +278,7 @@ Note that voltage calibration value (*CAL*) is set to 1e-6 in 0.11.0 version of
 
 ### 1-4. Getting channel coordinates
 
-As EEG are recorded in 38-electrode array and two electrodes among them were used as ground and reference site, total 36 channel data are avilable. The coordinates information are in the file [data/montage.csv], and can be accessed and visualized by following commands.  
-
+The EEG data are recorded with 38 electrode array, and two of the electrodes were used as ground and reference site - total 36 channel data are available. Coordinates of each electrode are in the file [data/montage.csv], and can be accessed and visualized by following script.
 
 
 ```python
@@ -407,14 +409,14 @@ Using <code>plot_multichan()</code> function, example single-trial EEG trace can
 # Demo 2-2b. Visualization of raw EEG time trace
 trial_index = 0
 y_center = plot_multichan(EEG.times, EEG.data[:,:,trial_index])
-plt.title('Example trial (index=%d) trace'%(1+trial_index)); plt.gcf().set_facecolor('w')
+plt.title('Example trial (index=%d) trace'%(1+trial_index))
 ```
 
 
 ![png](figure_output/output_19_0.png)
 
 
-Note that channel 1 to 36 contain actual EEG data from 36-channel electrode array (from FP1 to PO8), and channel 37 and 38 contain binary stimulus profile (0: no stimulation, 1: stimulation) of light and sound, respectively. 
+Note that channels 1 to 36 contain actual EEG data from 36-channel electrode array (from FP1 to PO8), and channel 37 and 38 contain binary stimulus profile (0: no stimulation, 1: stimulation) of light and sound, respectively. 
 
 ### 2-3. ERP in time domain
 
@@ -429,7 +431,7 @@ targetCondition = 5 # <- Try changing this
 trialIdx = np.where((EEG.events[:,2])==targetCondition)[0]
 erp = np.nanmean(EEG.data[:,:,trialIdx],2)
 c = plot_multichan(EEG.times, erp, spacing = 300 )
-plt.title('Condition #%d: %s (n=%d)'%(targetCondition, condNames[targetCondition-1],len(trialIdx))); plt.gcf().set_facecolor('w')
+plt.title('Condition #%d: %s (n=%d)'%(targetCondition, condNames[targetCondition-1],len(trialIdx))); 
 ```
 
 
@@ -470,7 +472,7 @@ plt.ylabel('Amplitude (mV/Hz)')
 plt.title('ERP signal in frequency domain')
 plt.gca().set_facecolor((1,1,1))
 
-plt.subplots_adjust(wspace=.3, hspace=.5); plt.gcf().set_facecolor('w')
+plt.subplots_adjust(wspace=.3, hspace=.5)
 ```
 
 
@@ -561,7 +563,7 @@ for targetCondition in conditions:
   plt.xlim([-.5,1.5])
   plt.ylim([5,80])
 
-plt.subplots_adjust(wspace=.3, hspace=.5); plt.gcf().set_facecolor('w')
+plt.subplots_adjust(wspace=.3, hspace=.5)
 ```
 
 
@@ -717,8 +719,7 @@ def plot_topo2d(data, clim=(-15,25), montage_file='%s%smontage.csv'%(dir_origin,
 
 **Optional) Bad channel identification**
 
-In typical EEG recordings, large amplitude artifacts coming from few bad channel(s) usually be a problem. To prevent this, researchers have developed various methods of artifact-rejection and bad-channel selection. Here, simple bad channel identification method is implemented using channel correlation. Data from the bad channels identified here will be ignored in topography and replaced by median value hereafter.
-
+In usual EEG recordings, large-amplitude artifacts coming from few bad channels sometimes be a problem. To prevent this, researchers have developed various methods of artifact-rejection and bad-channel selection. Here, simple bad channel identification method is implemented using channel correlation. Data from the bad channels identified here will be ignored in topography and replaced by median value hereafter.
 
 ```python
 # Demo 3-1b. Identification of bad-channel using correlation
@@ -795,7 +796,6 @@ Input data of EEG topography can be defined by any mean; voltage, band-limited p
 ```python
 # Demo 3-2. Raw voltage topography
 clim = [-20,30]
-plt.figure(figsize=(14,20))
 for targetCondition in conditions:
   trialIdx = np.where((EEG.events[:,2])==targetCondition)[0]
 
@@ -805,6 +805,7 @@ for targetCondition in conditions:
   parietal_erp = np.mean(erp[20:24,:],0)  # Average of parietal-area channels
 
   # Plot ERP trace
+  plt.figure(figsize=(14,20))
   plt.subplot(len(conditions),1,np.where(np.array(conditions)==targetCondition)[0]+1)
   color_f = (.68,.210,.27) # Custom color value
   color_p = (.01,.457,.74)
@@ -844,9 +845,7 @@ for targetCondition in conditions:
     topo_x = np.linspace(topo_shift[tIdx][0]-topo_size[0]*.5,topo_shift[tIdx][0]+topo_size[0]*.5,topos[tIdx].shape[0])
     topo_y = np.linspace(topo_shift[tIdx][1]-topo_size[1]*.5,topo_shift[tIdx][1]+topo_size[1]*.5,topos[tIdx].shape[1])
     plt.contourf( topo_x, topo_y, topos[tIdx], cmap=cm.jet, levels=topo_clim )
-
-plt.gcf().set_facecolor('w'); plt.show(); plt.close(); 
-
+  plt.show()
 ```
 
 
@@ -893,7 +892,6 @@ for periodIdx in range(len(period)):
   plt.subplot(1,len(period),periodIdx+1)
   plot_topo2d(power, clim=(0,3) )
   plt.title('%s, t = [%.1f, %.1f]s'%(periodName[periodIdx],period[periodIdx][0],period[periodIdx][1]))
-  plt.gcf().set_facecolor('w')
 
 ```
 
@@ -926,7 +924,6 @@ for targetCondition in conditions:
   plot_topo2d(power, clim=(0,7) )
   plt.title('%s'%condNames[targetCondition-1])
   if targetCondition is not conditions[0]: plt.ylabel('')
-  plt.gcf().set_facecolor('w')
 ```