parameters: (self, filename, verbose=False)
docstring: Import MaxMin IPX format with pos, data, frequencies & geometry.
docstring_summary: Import MaxMin IPX format with pos, data, frequencies & geometry.
docstring_tokens: Import MaxMin IPX format with pos data frequencies & geometry .
function: def importMaxminData(self, filename, verbose=False):
          """Import MaxMin IPX format with pos, data, frequencies & geometry."""
          delim = None
          fid = open(filename)
          aline = ''
          i = 0  # just in case there is no header
          for i, aline in enumerate(fid):
              if aline.split()[0][0].isdigit():  # number found
                  break
              elif aline.find('COIL') > 0:  # [:6] == '/ COIL':
                  self.coilSpacing = float(aline.replace(':', ': ').split()[-2])
              elif aline.find('FREQ') > 0:  # [:6] == '/ FREQ':
                  mya = aline[aline.find(':') + 1:].replace(',', ' ').split()
                  myf = [float(aa) for aa in mya if aa[0].isdigit()]
                  self.frequencies = np.array(myf)
  
          fid.close()
  
          if verbose:
              print("CS=", self.coilSpacing, "F=", self.frequencies)
          if aline.find(',') > 0:
              delim = ','
  
          nf = len(self.frequencies)
          if verbose:
              print("delim=", delim, "nf=", nf)
          A = np.loadtxt(filename, skiprows=i, delimiter=delim, comments='/').T
          x, y, self.IP, self.OP = A[0], A[1], A[
              2:nf * 2 + 2:2].T, A[3:nf * 2 + 2:2].T
          if max(x) == min(x):
              self.x = y
          else:
              self.x = x
function_tokens: def importMaxminData ( self , filename , verbose = False ) : delim = None fid = open ( filename ) aline = '' i = 0 # just in case there is no header for i , aline in enumerate ( fid ) : if aline . split ( ) [ 0 ] [ 0 ] . isdigit ( ) : # number found break elif aline . find ( 'COIL' ) > 0 : # [:6] == '/ COIL': self . coilSpacing = float ( aline . replace ( ':' , ': ' ) . split ( ) [ - 2 ] ) elif aline . find ( 'FREQ' ) > 0 : # [:6] == '/ FREQ': mya = aline [ aline . find ( ':' ) + 1 : ] . replace ( ',' , ' ' ) . split ( ) myf = [ float ( aa ) for aa in mya if aa [ 0 ] . isdigit ( ) ] self . frequencies = np . array ( myf ) fid . close ( ) if verbose : print ( "CS=" , self . coilSpacing , "F=" , self . frequencies ) if aline . find ( ',' ) > 0 : delim = ',' nf = len ( self . frequencies ) if verbose : print ( "delim=" , delim , "nf=" , nf ) A = np . loadtxt ( filename , skiprows = i , delimiter = delim , comments = '/' ) . T x , y , self . IP , self . OP = A [ 0 ] , A [ 1 ] , A [ 2 : nf * 2 + 2 : 2 ] . T , A [ 3 : nf * 2 + 2 : 2 ] . T if max ( x ) == min ( x ) : self . x = y else : self . x = x