# doc-cache created by Octave 10.1.0
# name: cache
# type: cell
# rows: 3
# columns: 11
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 391
 BIOSIG/T501 display coupling 

 PLOT_COUPLING	displays MxM coupling according [1]
    several utility functions are included. 
 MAIN demonstrates the use of these functions


 REFERENCES: 
 [1] Nolte G, Bai O, Wheaton L, Mari Z, Vorbach S, Hallett M. 	
	Identifying true brain interaction from EEG data using the imaginary part of coherency.
	Clin Neurophysiol. 2004 Oct;115(10):2292-307. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
 BIOSIG/T501 display coupling 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
locphys2locphys


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1369
 Purpose: create 'physical' locations from neoroscan-data

 usage: [loc_phys,names]=loc2locphys(fn,ind_phys,loctype)

 output: loc_phys  nX5 matrix; each row contains information 
                   about a physical electrode in the form 
                   [channelnumber x_coord y_coord x'_coord y'_coord]
                   the primed coordinates  differ from the 
                   non-primed coordinates if loctype is set to 1. 
                   Then the primed coordinates are slightly shifted to 
                    avoid overlapping subplots in plots with subplots 
                    placed on electrode locations. 
           names  list of channel names

 input: fn    filename of neurocan-file with electrode locations and names
        ind_phys  row-vector of indices which are regarded as 'physical'
                   i.e. electrodes on the scalp
                  (e.g. if we have 64 channels and channels 31,32,61,62,63,64 
                   do not refer to electrodes on the scalp, then 
                   ind_phys=[1:30,33:60];
        loctype    if set to 1:    calculate modified coordinates for plotting purposes 
                   any other value: set the shifted locations to the original 

  $Id$ 
  Copyright (C) 2003,2004 Guido Nolte
  Adapted by Alois Schloegl 
  This function is part of the BioSig project
  http://biosig.sf.net/	



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
 Purpose: create 'physical' locations from neoroscan-data



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
main


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 326
General:
 To visualize e.g. a cross-spectrum or coherence in a 'head-in-head', 
 plot you  need some functional data (e.g. a cross-spectral matrx cs)
 and the locations of the channels. A location-variable for N channels 
 is either an Nx3 matrix, if the locations are given in 3D, or a 
 Nx2 matrix if they are given in 2D. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
General:
 To visualize e.g. a cross-spectrum or coherence in a 'head-in-head'...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
mk_sensors_plane


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
undocumented function: loc_phys = mk_sensors_plane (sensors, pars)


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
undocumented function: loc_phys = mk_sensors_plane (sensors, pars)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
plot_coherence_dots


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1983
 usage plot_coherence(data,locs,pars);
 makes head-in-head plots
 data is an NxN matrix where N is the number of channels
 locs is (ideally) an Nx5 matrix:
      1st column: a channel i gets a circle only if locs(i,1)>.5 
                  if locs is an Mx5 matrix with M<N
                  the absolute values of the first column 
                  are interpreted as indices of scalp-electrodes.
                  If the values themselves are smaller than 0 then
                  these electrodes are only included within each 
                  small circle but do not correspond to a small circle itself.
      2nd and 3rd column: x,y coordinates of electrodes in 2D
      4th and 5th column: x,y coordinates of centers of spheres
                          slight deformation of electrode locations 
                          to avoid overlapping spheres
      if locs is Nx2, the 2 columns are interpreted as x,y coordinates 
      for both electrodes and circle-centers. 
      if locs is Nx3, the 2nd and 3rd column are interpreted as x,y coordinates 
      for both electrodes and sphere-centers. The first as interpreted as for 
      5xN case.
 pars sets parameters; 
      pars.scale sets color-scale; it is a 1x2 vector denoting min 
                 and max of colorbar. defaults is  pars.scale=[-max(max(abs(data))),max(max(abs(data)))];
      pars.resolution sets resolution. Default is pars.resolution=25
                      Increasing it makes better pictures but is slower
      pars.global_size  sets global size factor of small circles and distancec between circles.                   
                        default: global_size=1
      pars.relative_size  sets size factor for distances leaving circle-size unchanged                   
                        default: relative_size=1
      pars.head_up    moves the big circle (the head) up. Default: head_up=0
      pars.head_right    moves the big circle (the head) to the right. Default: head_right=0




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 usage plot_coherence(data,locs,pars);
 makes head-in-head plots
 data is an ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
plot_coherence_rand


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1983
 usage plot_coherence(data,locs,pars);
 makes head-in-head plots
 data is an NxN matrix where N is the number of channels
 locs is (ideally) an Nx5 matrix:
      1st column: a channel i gets a circle only if locs(i,1)>.5 
                  if locs is an Mx5 matrix with M<N
                  the absolute values of the first column 
                  are interpreted as indices of scalp-electrodes.
                  If the values themselves are smaller than 0 then
                  these electrodes are only included within each 
                  small circle but do not correspond to a small circle itself.
      2nd and 3rd column: x,y coordinates of electrodes in 2D
      4th and 5th column: x,y coordinates of centers of spheres
                          slight deformation of electrode locations 
                          to avoid overlapping spheres
      if locs is Nx2, the 2 columns are interpreted as x,y coordinates 
      for both electrodes and circle-centers. 
      if locs is Nx3, the 2nd and 3rd column are interpreted as x,y coordinates 
      for both electrodes and sphere-centers. The first as interpreted as for 
      5xN case.
 pars sets parameters; 
      pars.scale sets color-scale; it is a 1x2 vector denoting min 
                 and max of colorbar. defaults is  pars.scale=[-max(max(abs(data))),max(max(abs(data)))];
      pars.resolution sets resolution. Default is pars.resolution=25
                      Increasing it makes better pictures but is slower
      pars.global_size  sets global size factor of small circles and distancec between circles.                   
                        default: global_size=1
      pars.relative_size  sets size factor for distances leaving circle-size unchanged                   
                        default: relative_size=1
      pars.head_up    moves the big circle (the head) up. Default: head_up=0
      pars.head_right    moves the big circle (the head) to the right. Default: head_right=0




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 usage plot_coherence(data,locs,pars);
 makes head-in-head plots
 data is an ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
plot_coupling


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2198
 usage plot_coupling(data,locs,pars);
 makes head-in-head plots
 data is an NxN matrix where N is the number of channels
 locs is (ideally) an Nx5 matrix:
      1st column: a channel i gets a circle only if locs(i,1)>.5 
                  if locs is an Mx5 matrix with M<N
                  the absolute values of the first column 
                  are interpreted as indices of scalp-electrodes.
                  If the values themselves are smaller than 0 then
                  these electrodes are only included within each 
                  small circle but do not correspond to a small circle itself.
      2nd and 3rd column: x,y coordinates of electrodes in 2D
      4th and 5th column: x,y coordinates of centers of spheres
                          slight deformation of electrode locations 
                          to avoid overlapping spheres
      if locs is Nx2, the 2 columns are interpreted as x,y coordinates 
      for both electrodes and circle-centers. 
      if locs is Nx3, the 2nd and 3rd column are interpreted as x,y coordinates 
      for both electrodes and sphere-centers. The first as interpreted as for 
      5xN case.
 pars sets parameters; 
      pars.scale sets color-scale; it is a 1x2 vector denoting min 
                 and max of colorbar. defaults is  pars.scale=[-max(max(abs(data))),max(max(abs(data)))];
      pars.resolution sets resolution. Default is pars.resolution=25
                      Increasing it makes better pictures but is slower
      pars.global_size  sets global size factor of small circles and distancec between circles.                   
                        default: global_size=1
      pars.relative_size  sets size factor for distances leaving circle-size unchanged                   
                        default: relative_size=1
      pars.head_up    moves the big circle (the head) up. Default: head_up=0
      pars.head_right    moves the big circle (the head) to the right. Default: head_right=0

 REFERENCES: 
 [1] Nolte G, Bai O, Wheaton L, Mari Z, Vorbach S, Hallett M. 	
	Identifying true brain interaction from EEG data using the imaginary part of coherency.
	Clin Neurophysiol. 2004 Oct;115(10):2292-307. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 usage plot_coupling(data,locs,pars);
 makes head-in-head plots
 data is an N...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
select_chans


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
undocumented function: [locs_n, inds] = select_chans (locs, nin)


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
undocumented function: [locs_n, inds] = select_chans (locs, nin)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
sensor3d2sensor2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
undocumented function: s2d = sensor3d2sensor2d (sensors, lr, ud)


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
undocumented function: s2d = sensor3d2sensor2d (sensors, lr, ud)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
showfield_general


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 399
 usage showfield_general(z,loc); 
 displays fields/potentials specified z in channels at locations 
 specified in locs as a contour-plot

 pars is optional
   pars.scale sets the scale of the color map. Either a 1x2 vector
         corresponding to minimum and a maximum or just a number (say x) 
          then the scale is from [-x x]. The default is 
          scale=[ -max(abs(z)) max(abs(z)) ]



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 usage showfield_general(z,loc); 
 displays fields/potentials specified z in ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
sphfit


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 322
 SPHFIT fits a sphere to a set of surface points

 input: 
 vc   nx3 matrix, where each row represents the location
      of one surface point. vc can have more than 3 columns 
      (e.g. orientations) - then only the first 3 columns are used

 center  1x3 vector denoting the center
 radius  scalar denoting the radius 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
 SPHFIT fits a sphere to a set of surface points





