Exemplo n.º 1
0
    def read_data(self, filename, stype, qmax, qdamp):
        """Read pdf data from file into memory.

        filename -- name of file from which to read data
        stype    -- 'X' (xray) or 'N' (neutron)
        qmax     -- maximum q value
        qdamp    -- instrumental q-resolution factor

        Raises:
            IOError when the file cannot be read from disk
        """
        curfit = self._fits[-1]
        name, ext = os.path.splitext(os.path.basename(filename))
        fd = FitDataSet(name)
        fd.read(filename)
        fd.stype = stype
        fd.qmax = qmax
        fd.qdamp = qdamp
        curfit.add(fd)
        self._curdataset = len(curfit.datasets) - 1
        return
Exemplo n.º 2
0
    def read_data(self, filename, stype, qmax, qdamp):
        """Read pdf data from file into memory.

        filename -- name of file from which to read data
        stype    -- 'X' (xray) or 'N' (neutron)
        qmax     -- maximum q value
        qdamp    -- instrumental q-resolution factor

        Raises:
            IOError when the file cannot be read from disk
        """
        curfit = self._fits[-1]
        name, ext = os.path.splitext(os.path.basename(filename))
        fd = FitDataSet(name)
        fd.read(filename)
        fd.stype = stype
        fd.qmax = qmax
        fd.qdamp = qdamp
        curfit.add(fd)
        self._curdataset = len(curfit.datasets) - 1
        return