Pixelated STEM object has no attribute 'peak_position_refinement_com',no attribute 'subtract_diffraction_background' and 'intensity_peaks'
Hi all, I am working on a NBED map following the tutorial 'Analyzing NBED data' step by step. I just found a few error msgs when I went through certain steps. The error msgs show no attribute 'peak_position_refinement_com', or show no attribute 'subtract_diffraction_background' or 'intensity_peaks'. The code I used is following: %matplotlib qt import hyperspy.api as hs import numpy as np import matplotlib.pyplot as plt import pixstem.api as ps import pixstem.io_tools as it c = ps.load_ps_signal("2-1000mmDiffraction SI.dm4", lazy=True) #NBED Patterns acquired from our system have reverse dimension. We need firstly transpose the data deimension #and then transfer it to pixelateSTEM signal class instead hyperspy basalsignal class trans=c.T #transverse the data dimension or use hs.transpose() s = it.signal_to_pixelated_stem(trans) s.plot() peak_array = s.find_peaks(lazy_result=False, show_progressbar=False) st = s.template_match_disk(disk_r=5, lazy_result=False, show_progressbar=False) peak_array = st.find_peaks(lazy_result=False, show_progressbar=False) st.add_peak_array_as_markers(peak_array) st.plot() s.add_peak_array_as_markers(peak_array) s.plot() peak_array_com = s.peak_position_refinement_com(peak_array, lazy_result=False, show_progressbar=False)
AttributeError Traceback (most recent call last) in ----> 1 peak_array_com = s.peak_position_refinement_com(peak_array, lazy_result=False, show_progressbar=False)
AttributeError: 'LazyPixelatedSTEM' object has no attribute 'peak_position_refinement_com' #s.add_peak_array_as_markers(peak_array_com, color='blue') #s.plot() s_rem = s.subtract_diffraction_background(lazy_result=False, show_progressbar=False) s_rem.plot()
AttributeError Traceback (most recent call last) in ----> 1 s_rem = s.subtract_diffraction_background(lazy_result=False, show_progressbar=False) 2 s_rem.plot()
AttributeError: 'LazyPixelatedSTEM' object has no attribute 'subtract_diffraction_background' peak_array_intensity_rem = s_rem.intensity_peaks(lazy_result=False, show_progressbar=False)
AttributeError Traceback (most recent call last) in ----> 1 peak_array_intensity_rem = s.intensity_peaks(lazy_result=False, show_progressbar=False)
AttributeError: 'LazyPixelatedSTEM' object has no attribute 'intensity_peaks'
Can somebody tell why there are error msgs here? Thanks.