code: def to_struct_file(self, f):
          
          if isinstance(f, str):
              f = open(f,'w')
          f.write("VARIOGRAM {0}\n".format(self.name))
          f.write("  VARTYPE {0}\n".format(self.vartype))
          f.write("  A {0}\n".format(self.a))
          f.write("  ANISOTROPY {0}\n".format(self.anisotropy))
          f.write("  BEARING {0}\n".format(self.bearing))
          f.write("END VARIOGRAM\n\n")
docs: write the Vario2d to a PEST-style structure file
  
          Parameters
          ----------
          f : (str or file handle)
              item to write to