Beauchamp:Reconstruction and Electrode Labeling (Upenn)

From OpenWetWare
Jump to navigationJump to search
Brain picture
Beauchamp Lab

Reconstruction and Electrode Labeling (UPenn)

Once you've received confirmation (usually from Everett) that data are available on the portal, you can download data with the DownloadFromiEEGorg.m script. The script is located on the server in the rave_data directory. You need to connect to beauchamplab server to use this script. Here are the steps:

Connect to MacPro

Connect to the server, in Terminal, type in:


When asked "Are you sure you want to continue?", Answer "yes" When asked for the password, type in the beauchamplab password. If you see prompt: `(base) beauchamplab@beauchampsrv ~ % ` you are on the server now

If you get the error:

 ssh: Could not resolve hostname nodename nor servname provided, or not known

You need to (re)connect to the BCM VPN or try accessing the server from the campus network (cf.

Running the script

Navigate to script location and start headless matlab

 cd /Volumes/OneDrive/data/rave_data
 /Applications/ -nodesktop -nosplash

Start the downloading script in matlab in terminal, specifying the ProjectID and the runs (you must use double quotes " not ' when concatenating run names, else matlab creates a length 1 character array)

 DownloadFromiEEGorg ("HUP211", ["run1","run2"])

The script attempts to download only non-zero data by querying the event annotations. If there are more than 2 events, the user will be asked which events are correct, e.g.:

 Found multiple events!
 (1) Mask run 1
 (2) Tech notation: Video/EEG monitoring taking place
 (3) mask task run 1 end
 Pick two events to use for data range(separated by comma): 1, 3

Before downloading the data, the user confirms the size of the data:

 About to download 434.926758 seconds of data at 1024 Hz from 154 channels.
 Download the data? [Y]/n?

Raw data will be automatically downloaded to the rave_raw directory, organized by subject and run name (/Volumes/OneDrive/data/rave_data/raw/HUP211/run#). Confirmation of data download and photodiode detection are provided, followed by writing out the channel labels and detected sample rate to files in the subject's top-level directory.

 Writing out data to disk...done.
 Looking for photodiode on DC1...found. Downloading...done.
  Saving to photodiode.pd in /Volumes/OneDrive/data/rave_data/raw/HUP212/run1
 Writing out channel labels subject raw dir...done.
 Sample rate is: 1024. Writing to subject folder...done.

Note: If you requested more than one run, the script will effectively run once per run.

Optional script parameters

You can change the user name, password file, and save location by specifying optional parameters:

 DownloadFromiEEGorg (subject, block, path_for_data, ieeg_user_name, path_to_pwd_file) 

For example, if you want to save the raw data to the desktop:

 DownloadFromiEEGorg ("HUP211", ["run1","run2"],"/Users/beauchamplab/Desktop")

Finishing up

To exit matlab, use the quit function

 >> quit()
 (base) beauchamplab@beauchampsrv rave_data % 

To terminate the ssh connection:

 Connection to closed.