Exemplo n.º 1
0
    def read_data_string(self, s, stype, qmax, qdamp, name=""):
        """Read pdf data from a string into memory.

        s       -- string containing the contents of the data file
        stype   -- 'X' (xray) or 'N' (neutron)
        qmax    -- maximum q value
        qdamp   -- instrumental q-resolution factor
        name    -- tag with which to label data
        """
        curfit = self._fits[-1]
        fd = FitDataSet(name)
        fd.readStr(s)
        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_string(self, s, stype, qmax, qdamp, name=""):
        """Read pdf data from a string into memory.

        s       -- string containing the contents of the data file
        stype   -- 'X' (xray) or 'N' (neutron)
        qmax    -- maximum q value
        qdamp   -- instrumental q-resolution factor
        name    -- tag with which to label data
        """
        curfit = self._fits[-1]
        fd = FitDataSet(name)
        fd.readStr(s)
        fd.stype = stype
        fd.qmax = qmax
        fd.qdamp = qdamp
        curfit.add(fd)
        self._curdataset = len(curfit.datasets) - 1
        return