code: def __fromfile(self, filename, astype=None):
          
          assert os.path.exists(filename),"LinearAnalysis.__fromfile(): " +\
                                          "file not found:" + filename
          ext = filename.split('.')[-1].lower()
          if ext in ["jco", "jcb"]:
              self.log("loading jco: "+filename)
              if astype is None:
                  astype = Jco
              m = astype.from_binary(filename)
              self.log("loading jco: "+filename)
          elif ext in ["mat","vec"]:
              self.log("loading ascii: "+filename)
              if astype is None:
                  astype = Matrix
              m = astype.from_ascii(filename)
              self.log("loading ascii: "+filename)
          elif ext in ["cov"]:
              self.log("loading cov: "+filename)
              if astype is None:
                  astype = Cov
              if _istextfile(filename):
                  m = astype.from_ascii(filename)
              else:
                  m = astype.from_binary(filename)
              self.log("loading cov: "+filename)
          elif ext in["unc"]:
              self.log("loading unc: "+filename)
              if astype is None:
                  astype = Cov
              m = astype.from_uncfile(filename)
              self.log("loading unc: "+filename)
          else:
              raise Exception("linear_analysis.__fromfile(): unrecognized" +
                              " filename extension:" + str(ext))
          return m
docs: a private method to deduce and load a filename into a matrix object.
          Uses extension: 'jco' or 'jcb': binary, 'mat','vec' or 'cov': ASCII,
          'unc': pest uncertainty file.
  
          Parameters
          ----------
          filename : str
              the name of the file
  
          Returns
          -------
          m : pyemu.Matrix
  
          Raises
          ------
          exception for unrecognized extension