User Tools

Site Tools


plotcurves

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plotcurves [2010/06/20 01:19]
jochen altered the example for bry's data
plotcurves [2011/05/27 17:54] (current)
jochen added additional keyboard commands
Line 24: Line 24:
  
 % this filters channel 1 into a new channel (10) % this filters channel 1 into a new channel (10)
-% all parameters are default, the post-filtering cut-off is set to 0.5s +% all parameters are default, the post-filtering cut-off is set to 0.2s 
-gsr.Filter(1,​ struct('​dest',​ 10, '​post',​ 0.5));</​code>​+gsr.Filter(1,​ struct('​dest',​ 10, '​post',​ 0.2));</​code>​
  
 ===== Function reference ('help plotcurves'​) ===== ===== Function reference ('help plotcurves'​) =====
Line 36: Line 36:
         obj         xff object with plotable data or SxC double data         obj         xff object with plotable data or SxC double data
         opts        optional settings         opts        optional settings
 +         ​.cuediff ​  ​difference between cue and onset (only useful if
 +                    fixed interval!; default: -2)
          ​.curves ​   Cx2 cell array with names and a 1x3 double array          ​.curves ​   Cx2 cell array with names and a 1x3 double array
                     containing [channelnumber,​ onset, offset]                     containing [channelnumber,​ onset, offset]
-                    for multiple ​curves, the mean will be computed +                    ​for curves ​in a set, the mean/std. error is computed 
-         ​.freq ​     data sampling frequency (if not in object) +                    - onset and offset are given in seconds 
-         .resfreq ​  ​resampling frequency+         ​.dchannel ​ data channel (for onset detection, default: 1) 
 +         ​.dfilt ​    ​detection filter length (in seconds, default: 0.5) 
 +         ​.dminlat ​  ​minimum detection latency (after one point, def: 0.5) 
 +         ​.freq ​     data sampling frequency (if not in object, def: 100
 +         .ochannel ​ onset channel number (will add curves, default: []) 
 +         ​.odchannel original data channel (allows to filter effect) 
 +         ​.onsets ​   Ox1 onset vector in seconds 
 +         ​.owin ​     1x2 onset window in seconds (default: [-2, 18])
          ​.sets ​     Sx2 cell array with names and lists of curve indices          ​.sets ​     Sx2 cell array with names and lists of curve indices
-         ​.spot ​     Sx1 cell array with Cx1 X or Cx2 x/y coordinates +         ​.spot ​     Sx1 cell array with Cx1 X or Cx2 x/y time-points
-         ​.spotcol ​  Sx3 RGB color (either [0 .. 255] or [0 .. 1])+
          ​.spotnames Sx1 cell array with strings          ​.spotnames Sx1 cell array with strings
          ​.spottype ​ Sx1 cell array with either of          ​.spottype ​ Sx1 cell array with either of
-                    {'​free'​},​ '​max',​ '​min',​ '​minmax'​+                    ​'​cue', ​{'​free'​},​ '​max',​ '​min',​ '​minmax', 'onset'
          ​.var ​      1xV struct with fields          ​.var ​      1xV struct with fields
            ​.calc ​   either of '​dx',​ {'​dy'​},​ '​mean',​ '​std',​ '​var',​ '​x',​ '​y'​            ​.calc ​   either of '​dx',​ {'​dy'​},​ '​mean',​ '​std',​ '​var',​ '​x',​ '​y'​
 +           ​.name ​   variable name
            ​.spot ​   1x1 or 1x2 index into S            ​.spot ​   1x1 or 1x2 index into S
            ​.trans ​  apply additional transformation to each value, one of            ​.trans ​  apply additional transformation to each value, one of
                     {'​none'​},​ '​log',​ '​log+1',​ '​sqrt'​                     {'​none'​},​ '​log',​ '​log+1',​ '​sqrt'​
-         ​.varnames  ​ 
    
   Output fields:   Output fields:
Line 59: Line 67:
         varc        computed variables         varc        computed variables
         spot        updated spots         spot        updated spots
-        sets        updates sets (new indices)</​file>​+        sets        updates sets (new indices) 
 +  
 +  Note: where appropriate,​ the options are taken from obj.RunTimeVars 
 +        if not specified in the call!</​file>​
  
 ===== GUI ===== ===== GUI =====
Line 82: Line 93:
   * '''​d'''​ key -> decrease zoom (de-magnify)   * '''​d'''​ key -> decrease zoom (de-magnify)
   * '''​f'''​ key -> toggle force-to-curve checkbox   * '''​f'''​ key -> toggle force-to-curve checkbox
 +  * '''​i'''​ / '''​o'''​ keys -> toggle whether this curve (onset) is included (i) or omitted (o) from averages
   * '''​m'''​ key -> increase zoom (magnify)   * '''​m'''​ key -> increase zoom (magnify)
 +  * '''​p'''​ key -> places a currently highlighted marker at a peak (max or min, depending on data)
   * '''​r'''​ key -> reset axes limits (to initial curve setting)   * '''​r'''​ key -> reset axes limits (to initial curve setting)
   * '''​u'''​ key -> toggle use-curve checkbox   * '''​u'''​ key -> toggle use-curve checkbox
Line 189: Line 202:
 % - onsets are coded in channel 8 (0Volts nothing, 5 Volts boxes) % - onsets are coded in channel 8 (0Volts nothing, 5 Volts boxes)
 % - cue onffset is 2 seconds % - cue onffset is 2 seconds
 +% - thus, the window is increased! [-4, 20]
 % - variables and spots as defined % - variables and spots as defined
 pcopts = struct( ... pcopts = struct( ...
Line 195: Line 209:
     '​ochannel', ​ 8, ...     '​ochannel', ​ 8, ...
     '​cuediff', ​  2, ...     '​cuediff', ​  2, ...
 +    '​owin', ​     [-4, 20],...
     '​var', ​      vars, ...     '​var', ​      vars, ...
     '​spot', ​     {spot}, ...     '​spot', ​     {spot}, ...
plotcurves.1276989557.txt.gz · Last modified: 2010/06/20 01:19 by jochen