docs: def plot_signal_sum(ax, params, fname='LFPsum.h5', unit='mV', scaling_factor=1.,
                      ylabels=True, scalebar=True, vlimround=None,
                      T=[800, 1000], ylim=[-1500, 0], color='k', fancy=False,
                      label='', transient=200, clip_on=False, rasterized=True,
                      **kwargs):
      '''
      on axes plot the summed LFP contributions
      
      args:
      ::
          
          ax : matplotlib.axes.AxesSubplot object
          fname : str/np.ndarray, path to h5 file or ndim=2 numpy.ndarray 
          unit : str, scalebar unit
          scaling_factor : float, scaling factor (e.g. to scale 10% data set up)
          ylabels : bool, show labels on y-axis
          scalebar : bool, show scalebar in plot
          vlimround : None/float, override autoscaling of data and scalebar
          T : list, [tstart, tstop], which timeinterval
          ylim : list of floats, see plt.gca().set_ylim
          color : str/colorspec tuple, color of shown lines
          fancy : bool,
          label : str, line labels
          rasterized : bool, rasterize line plots if true
          kwargs : additional keyword arguments passed to ax.plot()
      
      
      returns:
      ::
          
          vlimround : float, scalebar scaling factor, i.e., to match up plots
      
      '''
  
      if type(fname) == str and os.path.isfile(fname):
          f = h5py.File(fname)
          #load data
          data = f['data'].value
              
          tvec = np.arange(data.shape[1]) * 1000. / f['srate'].value    
  
          #for mean subtraction
          datameanaxis1 = f['data'].value[:, tvec >= transient].mean(axis=1)
          
          #close dataset
          f.close()
      elif type(fname) == np.ndarray and fname.ndim==2:
          data = fname
          tvec = np.arange(data.shape[1]) * params.dt_output
          datameanaxis1 = data[:, tvec >= transient].mean(axis=1)
      else:
          raise Exception, 'type(fname)={} not str or numpy.ndarray'.format(type(fname))
  
      # slice
      slica = (tvec <= T[1]) & (tvec >= T[0])
      data = data[:,slica]
      
      #subtract mean in each channel
      #dataT = data.T - data.mean(axis=1)
      dataT = data.T - datameanaxis1
      data = dataT.T
  
      # normalize
      data = data*scaling_factor
      
      zvec = np.r_[params.electrodeParams['z']]
      zvec = np.r_[zvec, zvec[-1] + np.diff(zvec)[-1]]
      vlim = abs(data).max()
      if vlimround is None:
          vlimround = 2.**np.round(np.log2(vlim))
      else:
          pass
      yticklabels=[]
      yticks = []
      
      if fancy:
          colors=phlp.get_colors(data.shape[0])
      else:
          colors = [color]*data.shape[0]
      
      for i, z in enumerate(params.electrodeParams['z']):
          if i == 0:
              ax.plot(tvec[slica], data[i] * 100 / vlimround + z,
                      color=colors[i], rasterized=rasterized, label=label,
                      clip_on=clip_on, **kwargs)
          else: 
              ax.plot(tvec[slica], data[i] * 100 / vlimround + z,
                      color=colors[i], rasterized=rasterized, clip_on=clip_on,
                      **kwargs)
          yticklabels.append('ch. %i' % (i+1))
          yticks.append(z)
       
      if scalebar:
          ax.plot([tvec[slica][-1], tvec[slica][-1]],
                  [-1300, -1400], lw=2, color='k', clip_on=False)
          ax.text(tvec[slica][-1]+np.diff(T)*0.02, -1350,
                  r'%g %s' % (vlimround, unit),
                  color='k', rotation='vertical',
                  va='center')
  
      ax.axis(ax.axis('tight'))
      ax.yaxis.set_ticks(yticks)
      if ylabels:
          ax.yaxis.set_ticklabels(yticklabels)
      else:
          ax.yaxis.set_ticklabels([])
  
      for loc, spine in ax.spines.iteritems():
          if loc in ['right', 'top']:
              spine.set_color('none')            
      ax.xaxis.set_ticks_position('bottom')
      ax.yaxis.set_ticks_position('left')
      ax.set_xlabel(r'$t$ (ms)', labelpad=0.1)
      ax.set_ylim(ylim)
      
      return vlimround