def to_simulation(self): from hyperspy.signals.spectrum_simulation import ( SpectrumSimulation) dic = self._get_signal_dict() signal_type = self.mapped_parameters.signal_type dic['mapped_parameters']['signal_type'] = \ signal_type + '_simulation' simu = SpectrumSimulation(dic) if hasattr(self, 'learning_results'): simu.learning_results = copy.deepcopy(self.learning_results) simu.tmp_parameters = self.tmp_parameters.deepcopy() return simu
def to_simulation(self): from hyperspy.signals.spectrum_simulation import SpectrumSimulation dic = self._get_signal_dict() signal_type = self.mapped_parameters.signal_type if signal_type is None: signal_type = "" dic['mapped_parameters']['signal_type'] = \ signal_type + '_simulation' simu = SpectrumSimulation(dic) if hasattr(self, 'mva_results'): simu.mva_results = copy.deepcopy(self.mva_results) return simu