<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromfile(self, path='filters'):
 r"""Load filter values from ascii-files. Load filter base and filter coefficients from ascii files in the directory `path`; `path` can be a relative or absolute path. Examples -------- """


        # Get name of filter
        name = self.savename

        # Get absolute path
        path = os.path.abspath(path)

        # Get filter base
        basefile = os.path.join(path, name + '_base.txt')
        with open(basefile, 'r') as f:
            self.base = np.fromfile(f, sep="\n")

        # Get filter coefficients
        for val in ['j0', 'j1', 'sin', 'cos']:
            attrfile = os.path.join(path, name + '_' + val + '.txt')
            if os.path.isfile(attrfile):
                with open(attrfile, 'r') as f:
                    setattr(self, val, np.fromfile(f, sep="\n"))

        # Add factor
        self.factor = np.around(np.average(self.base[1:]/self.base[:-1]), 15)