Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Issue with SAMFire on a single-component signal
>>> m = sc.create_model(auto_add_lines=False)
>>> samf = m.create_samfire()
[0:apply]:
---------------------------------------------------------------------------AttributeError Traceback (most recent call last)<string> in <module>()
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/samfire_utils/samfire_pool.py in <lambda>(worker, m_dict)
148 self.rworker = ipp_Reference('worker')
149 direct_view.apply(lambda worker, m_dict:
--> 150 worker.create_model(m_dict, 'z'), self.rworker,
151 m_dict)
152 direct_view.apply(lambda worker, ts: worker.setup_test(ts),
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/samfire_utils/samfire_worker.py in create_model(self, signal_dict, model_letter)
58 par.map = par.map.copy()
59
---> 60 var = self.model.signal.metadata.Signal.Noise_properties.variance
61 if isinstance(var, BaseSignal):
62 var.data = var.data.copy()
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/misc/utils.py in __getattribute__(self, name)
333 name = name.decode()
334 name = slugify(name, valid_variable_name=True)
--> 335 item = super(DictionaryTreeBrowser, self).__getattribute__(name)
336 if isinstance(item, dict) and '_dtb_value_' in item and "key" in item:
337 return item['_dtb_value_']
AttributeError: 'DictionaryTreeBrowser' object has no attribute 'Noise_properties'
[1:apply]:
---------------------------------------------------------------------------AttributeError Traceback (most recent call last)<string> in <module>()
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/samfire_utils/samfire_pool.py in <lambda>(worker, m_dict)
148 self.rworker = ipp_Reference('worker')
149 direct_view.apply(lambda worker, m_dict:
--> 150 worker.create_model(m_dict, 'z'), self.rworker,
151 m_dict)
152 direct_view.apply(lambda worker, ts: worker.setup_test(ts),
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/samfire_utils/samfire_worker.py in create_model(self, signal_dict, model_letter)
58 par.map = par.map.copy()
59
---> 60 var = self.model.signal.metadata.Signal.Noise_properties.variance
61 if isinstance(var, BaseSignal):
62 var.data = var.data.copy()
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/misc/utils.py in __getattribute__(self, name)
333 name = name.decode()
334 name = slugify(name, valid_variable_name=True)
--> 335 item = super(DictionaryTreeBrowser, self).__getattribute__(name)
336 if isinstance(item, dict) and '_dtb_value_' in item and "key" in item:
337 return item['_dtb_value_']
AttributeError: 'DictionaryTreeBrowser' object has no attribute 'Noise_properties'
[2:apply]:
---------------------------------------------------------------------------AttributeError Traceback (most recent call last)<string> in <module>()
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/samfire_utils/samfire_pool.py in <lambda>(worker, m_dict)
148 self.rworker = ipp_Reference('worker')
149 direct_view.apply(lambda worker, m_dict:
--> 150 worker.create_model(m_dict, 'z'), self.rworker,
151 m_dict)
152 direct_view.apply(lambda worker, ts: worker.setup_test(ts),
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/samfire_utils/samfire_worker.py in create_model(self, signal_dict, model_letter)
58 par.map = par.map.copy()
59
---> 60 var = self.model.signal.metadata.Signal.Noise_properties.variance
61 if isinstance(var, BaseSignal):
62 var.data = var.data.copy()
/Users/thomas/Dropbox/0_Git/GitHub/hyperspy_aar/hyperspy/misc/utils.py in __getattribute__(self, name)
333 name = name.decode()
334 name = slugify(name, valid_variable_name=True)
--> 335 item = super(DictionaryTreeBrowser, self).__getattribute__(name)
336 if isinstance(item, dict) and '_dtb_value_' in item and "key" in item:
337 return item['_dtb_value_']
AttributeError: 'DictionaryTreeBrowser' object has no attribute 'Noise_properties'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.