docs: def filter_desc(self, graintype=None, group=None, reference=None,
                      size=None, phase=None):
          '''
          This routine is to filter for description elements.  You can
          check what is available in the description by running,
  
          >>> i.header_desc()
  
          where i is the instance you loaded.
  
          You can run the filter multiple times!  You can filter for the
          following types:
  
          Parameters
          ----------
          graintype : string or list
              Give graintypes as either 'M' for only mainstream or more
              than one ['M','Z'].
          group : integer or list
              Group of graintypes, important for oxides and silicates,
              since they are split into groups and not into types.
              Example 1, or give a list [1,3].
          reference : string or list
              Give the reference you want to filter for, try an i.info()
              to pick the right name!  You can select a single
              referennce as string or multiple references in as a list.
          size : string
              Filter for grain sizes, give '<5.0' or '>5.0' as a string
              for larger or smaller than a given grainsize in um.  Only
              data with known grainsizes are chosen.  Often grain sizes
              are given in a times b, where a and b are the minumum and
              maximum measurements from an image.  If you give a >5.0
              then grains with the smaller dimension >5um are taken into
              account.  If you want <5.0 then grains with the upper
              dimension <5um are taken into account.
  
          '''
  
          # filter for graintype
          if graintype != None:
              indexing = []
              # index file on which lines to pick
              if type(graintype) == str:
                  graintype = [graintype]
              # filter
              for typ in graintype:
                  for i in range(len(self.desc)):
                      if self.desc[i][self.descdict['Type']] == typ:
                          indexing.append(i)
              # filter:
              self._filter_desc(indexing)
  
          # filter for graintype
          if phase != None:
              indexing = []
              # index file on which lines to pick
              if type(phase) == str:
                  phase = [phase]
              # filter
              for typ in phase:
                  for i in range(len(self.desc)):
                      if self.desc[i][self.descdict['Phase']] == typ:
                          indexing.append(i)
              # filter:
              self._filter_desc(indexing)
  
  
          # filter for group (oxides and silicates)
          if group != None:
              indexing = []
              # index file on which lines to pick
              if type(group) != list:
                  group = [group]
              # filter
              for grp in group:
                  for i in range(len(self.desc)):
                      if self.desc[i][self.descdict['Group']] == str(int(grp)):
                          indexing.append(i)
              # filter:
              self._filter_desc(indexing)
  
  
          # filter for reference
          if reference != None:
              indexing = []
              # index file on which lines to pick
              if type(reference) != list:
                  reference = [reference]
              # filter
              for ri in range(len(reference)):
                  for i in range(len(self.desc)):
                      if self.desc[i][self.descdict['Reference']] == reference[ri]:
                          indexing.append(i)
              # filter:
              self._filter_desc(indexing)
  
  
          # filter for grainzise
          if size != None:
              indexing = []
              # index file on which lines to pick
              # filter
              operator = size[0:1]
              size = float(size[1:len(size)])
              for i in range(len(self.desc)):
                  if  self.desc[i][self.descdict['Size (microns)']] != '':
                      try:
                          # print self.desc[i][self.descdict['Size (microns)']]
                          comperator1 = self.desc[i][self.descdict['Size (microns)']].split('x')[0]
                          comperator2 = self.desc[i][self.descdict['Size (microns)']].split('x')[1]
                          comperator = [float(comperator1),float(comperator2)]
                          if operator == '<':
                              comperator = np.min(comperator)
                          else:
                              comperator = np.max(comperator)
                      except IndexError or AttributeError:
                          try:
                              comperator = float(self.desc[i][self.descdict['Size (microns)']])
                          except ValueError:
                              continue
  
                      if operator == '>':
                          if comperator > size:
                              indexing.append(i)
                      elif operator == '<':
                          if comperator < size:
                              indexing.append(i)
                      else:
                          continue
  
              # filter:
              self._filter_desc(indexing)