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)
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)
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)
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)