Spectrum Image visualisation by dragging a slider through the signal

23 views
Skip to first unread message

Thomas Aarholt

unread,
Sep 3, 2015, 7:48:01 AM9/3/15
to hyperspy-users
Hiya,
I would like to plot my low loss spectrum image (2 spatial dimensions), as an image where each pixel has an intensity dependant on the number of counts at at a certain energy coordinate or range of the signal at that pixel.

I've looked through the Hyperspy documentation, and been given a hint of a solution, given by this picture in this section of Data Visualization.

In short, I'd like to drag the red slider on the signal window on the left and watch the image on the right change accordingly.

Does anyone have any advice?

Best,

Tom

Francisco de la Peña

unread,
Sep 3, 2015, 8:16:24 AM9/3/15
to hypersp...@googlegroups.com
You can do that by changing the view of the data (more info here). The easiest way to do this is as follows:

    im = s.to_image()
    im.plot()

If it is just for visualisation purposes you could merge these two lines in one:

    s.to_image().plot()

Displaying the sum of the signal in a range selected interactively is not yet implemented, but it is planned for HyperSpy 0.9, see https://github.com/hyperspy/hyperspy/pull/425.

If you don't want to play with unreleased code, for the time being you could do it (much less conveniently) as follows:

    im.inav[10.:20.].plot()

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/d/optout.
Reply all
Reply to author
Forward
0 new messages