def load(subject, ds=data_source(), url_template=URL_TEMPLATE):
  '''Each subject performed 14 experimental runs: two one-minute
  baseline runs (one with eyes open, one with eyes closed), and three
  two-minute runs of each of the four following tasks:

  1) A target appears on either the left or the right side of the
  screen. The subject OPENS AND CLOSES THE CORRESPONDING FIST until
  the target disappears. Then the subject relaxes.

  2) A target appears on either the left or the right side of the
  screen. The subject IMAGINES OPENING AND CLOSING THE CORRESPONDING
  FIST until the target disappears. Then the subject relaxes.

  3) A target appears on either the top or the bottom of the screen.
  The subject OPENS AND CLOSES EITHER BOTH FISTS (if the target is on
  top) or BOTH FEET (if the target is on the bottom) until the target
  disappears. Then the subject relaxes.

  4) A target appears on either the top or the bottom of the screen.
  The subject IMAGINES OPENING AND CLOSING EITHER BOTH FISTS (if the
  target is on top) OR BOTH FEET (if the target is on the bottom)
  until the target disappears. Then the subject relaxes.

  The EDF+ file contains the duration of each event, however it seems
  to be slightly variable. Based on the first subjects, it seems that
  between each task there is a resting task, and both the active task
  and resting task take about 4.15 +- .1 seconds.

  The file headers for one subject all contain the same start
  timestamp, so we cannot estimate the time between runs. 
  '''
  urls, runs = gen_urls(subject, url_template)
  log.debug('Generated URLs: %s.' % (urls,))
  
  # Load runs for this subject:
  rec = [load_schalk_run(ds.open(u), r) for (u, r) in zip(urls, runs)]
  runs, events = zip(*rec)

  # Combine information from different runs:
  X = np.hstack([r.X.astype(np.float32) for r in runs])
  dt = np.hstack([block_dt(r.X.shape[1], r.sample_rate) for r in runs])[1:]
  chan_lab = clean_chan_lab(runs[0].chan_lab)
  folds = np.hstack([
    np.ones(e.shape[1], int) * i for (i, e) in enumerate(events)])
  E = concatenate_events(events, [r.X.shape[1] for r in runs])


  return Recording(X=X, dt=dt, chan_lab=chan_lab, events=E, folds=folds, 
    event_lab=EVENTS, rec_id='schalk-physiobank-s%d' % subject, 
    license=LICENSE)
dataset/ETHPy150Open breuderink/eegtools/eegtools/data/schalk_physiobank.py/load/original