Converting spectrum images into numpy arrays

37 views
Skip to first unread message

Andrew Thron

unread,
Dec 3, 2013, 2:42:47 PM12/3/13
to hypersp...@googlegroups.com
HyperSpy Users, 

This is a simple question. Is it possible to convert a 2D spectrum image into a numpy array? I want to measure the goodness of fit for Voigt functions that I fitted to my spectra. I am trying to convert to numpy arrays so I can test the goodness of fit in SciPy

Cheers, 
Andrew 

Francisco de la Peña

unread,
Dec 3, 2013, 4:03:47 PM12/3/13
to hypersp...@googlegroups.com
Andrew,

The Signal class stores the data as a numpy array in the data attribute i.e. if the HyperSpy Signal instance of your 2D spectrum is `s`, the array that contains the data is in `s.data`.

Cheers,

Francisco


--
You received this message because you are subscribed to the Google Groups "hyperspy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperspy-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages