HyperSpy is really an awesome package for EELS analysis in python. It's very convenient for use and we can get more detail information from the dm files. Here are some sample code of HyperSpy for EELS spectrum image. ==================================== import hyperspy.api as hs ds=hs.load('si.dm3') ch=100 w=3 # average spectrum w=w//2 linesig=ds.inav[ch-w:ch+w+1].mean() # Get the x-axis and y-axis values xx=linesig.axes_manager[-1].axis yy=linesig.data print(' Figure 1 ') plt.figure(1) plt.plot(xx,yy) plt.xlabel(' %s (%s) ' % (linesig.axes_manager[-1].name, linesig.axes_manager[-1].units)) plt.ylabel(' Counts (a.u.) ') plt.legend([' smooth data ']) plt.show() # signal silcing E0=405 Ee=580 print( 'Assignd by energy range --> using float(E0)' ) E0=float(E0) Ee=float(Ee) lin01=linesig.isig[E0:Ee] print(' E0=%6.0f. , Ee=%6.0f. , data points=%i ' % (E0,Ee,linesig.isig[E0:Ee].axes_man...
Electron microscopy, Programming and Fun!!!