Example #1
0
    def set_from_fileread(self, filename):
        """Read metadata and spectral data from file, and use those to set parameters of the SpectrumData object (self).

        Parameters
        ----------
        filename: str
        """
        reader = file_io.ObjectReader()
        reader.set_params_from_file(self, filename)
Example #2
0
    def set_from_fileread(self, filename):
        """Read metadata and spectral data from file, and use those to set parameters of the SpectrumData object (self).

        Parameters
        ----------
        filename: str
        """
        file_format = config.FILE_FORMAT
        reader = io.ObjectReader()
        reader.set_params_from_file(self, file_format, filename)
Example #3
0
    def create_from_file(cls, filename):
        """Read metadata and spectral data from file, and use those to create a new SpectrumData object.

        Parameters
        ----------
        filename: str

        Returns
        -------
        SpectrumData
            new SpectrumData object, initialized with data read from file
        """
        reader = file_io.ObjectReader()
        return reader.create_from_file(cls, filename)
Example #4
0
    def create_from_fileread(cls, filename):
        """Read metadata and spectral data from file, and use those to create a new SpectrumData object.

        Parameters
        ----------
        filename: str

        Returns
        -------
        SpectrumData
            new SpectrumData object, initialized with data read from file
        """
        file_format = config.FILE_FORMAT
        reader = io.ObjectReader()
        return reader.create_from_fileread(cls, file_format, filename)