parameters: (M, tau, thk, res=None, z=None,
                     cmin=None, cmax=None, islog=True)
return_statement: return lgm, tch
docstring: Display an SIP Debye block model as image.
docstring_summary: Display an SIP Debye block model as image.
docstring_tokens: Display an SIP Debye block model as image .
function: def showsip1dmodel(M, tau, thk, res=None, z=None,
                     cmin=None, cmax=None, islog=True):
      """
          Display an SIP Debye block model as image.
      """
      if z is None:
          z = N.cumsum(N.hstack((0., thk)))
  
      P.cla()
      pal = P.cm.get_cmap()
      pal.set_under('w')
      pal.set_bad('w')
      if isinstance(M, pg.Vector):
          M = N.asarray(M)
  
      if islog:
          M = N.log10(M)
  
      M = M.reshape((len(z), len(tau)))
      im = P.imshow(M, interpolation='nearest', cmap=pal)
      if cmax is None:
          cmax = N.max(M)
  
      if cmax is None:
          cmax = N.max(M)
  
      im.set_clim((cmin, cmax))
  
      a = []
      for t in tau[::2]:
          a.append("%g" % rndig(t * 1000, 2))
  
      P.xticks(N.arange(0, len(tau), 2), a)
  
      a = []
      for zi in z:
          a.append(str(zi))
  
      P.yticks(N.arange(len(z)) - 0.5, a)
      P.xlabel(r'$\tau$ in ms')
      P.ylabel('z in m')
      P.ylim((len(z) - 0.5, -0.5))
      P.colorbar(orientation='horizontal', aspect=40, shrink=0.6)
  
      if res is not None:
          xl = P.xlim()[1]
          for i in range(len(res)):
              P.text(xl, i, r' %g $\Omega$m' % rndig(res[i], 2))
  
      lgm = N.zeros((len(z), 1))
      tch = N.zeros((len(z), 1))
      lgt = N.log(tau)
      if islog:
          M = 10**M
  
      for n in range(len(M)):
          m = N.abs(M[n])
          tch[n] = N.sum(m)
          lgm[n] = N.exp(N.sum(m * lgt) / N.sum(m))
  
      tpos = N.interp(N.log(lgm), N.log(tau), N.arange(len(tau)))
      P.plot(tpos, N.arange(len(z)), 'w*')
  
      P.title('logarithmized spectral chargeability')
      P.show()
      return lgm, tch
function_tokens: def showsip1dmodel ( M , tau , thk , res = None , z = None , cmin = None , cmax = None , islog = True ) : if z is None : z = N . cumsum ( N . hstack ( ( 0. , thk ) ) ) P . cla ( ) pal = P . cm . get_cmap ( ) pal . set_under ( 'w' ) pal . set_bad ( 'w' ) if isinstance ( M , pg . Vector ) : M = N . asarray ( M ) if islog : M = N . log10 ( M ) M = M . reshape ( ( len ( z ) , len ( tau ) ) ) im = P . imshow ( M , interpolation = 'nearest' , cmap = pal ) if cmax is None : cmax = N . max ( M ) if cmax is None : cmax = N . max ( M ) im . set_clim ( ( cmin , cmax ) ) a = [ ] for t in tau [ : : 2 ] : a . append ( "%g" % rndig ( t * 1000 , 2 ) ) P . xticks ( N . arange ( 0 , len ( tau ) , 2 ) , a ) a = [ ] for zi in z : a . append ( str ( zi ) ) P . yticks ( N . arange ( len ( z ) ) - 0.5 , a ) P . xlabel ( r'$\tau$ in ms' ) P . ylabel ( 'z in m' ) P . ylim ( ( len ( z ) - 0.5 , - 0.5 ) ) P . colorbar ( orientation = 'horizontal' , aspect = 40 , shrink = 0.6 ) if res is not None : xl = P . xlim ( ) [ 1 ] for i in range ( len ( res ) ) : P . text ( xl , i , r' %g $\Omega$m' % rndig ( res [ i ] , 2 ) ) lgm = N . zeros ( ( len ( z ) , 1 ) ) tch = N . zeros ( ( len ( z ) , 1 ) ) lgt = N . log ( tau ) if islog : M = 10 ** M for n in range ( len ( M ) ) : m = N . abs ( M [ n ] ) tch [ n ] = N . sum ( m ) lgm [ n ] = N . exp ( N . sum ( m * lgt ) / N . sum ( m ) ) tpos = N . interp ( N . log ( lgm ) , N . log ( tau ) , N . arange ( len ( tau ) ) ) P . plot ( tpos , N . arange ( len ( z ) ) , 'w*' ) P . title ( 'logarithmized spectral chargeability' ) P . show ( ) return lgm , tch