-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Describe the functionality you would like to see.
In the context of taking hyperspectral maps, sometimes you may have a sample where in different regions one would expect peaks at different wavelengths to become dominant.
It's useful to be able to quickly scan over a given wavelength (or energy!) range, and see how the intensity of signals within that range vary spatially.
Describe the context
If implemented correctly, this could be used for a number of different hyperspectral signals.
The Dorset software for Chronos CL systems has this feature, but as far as I know this doesn't exist in Lumispy/ Hyperspy.
Proposed Solution
Perhaps this specific sort of analysis is outside of the scope of Lumispy. However, I thought something like this might fit well into the utils section of the library.
I have put together a provisional implementation here:
I've called the feature 'AutoPeakMap'... not sure if this is the best name!
An example would be:
from lumispy.utils.analysis import AutoPeakMap, RangeChannel, plot_auto_peakmap
cl = hs.load(path, signal_type='CL_SEM')
apm = AutoPeakMap(cl,
RangeChannel('red', range_=[730, 760]),
RangeChannel('green', range_=[300, 400]))
apm.plot()
Renders two plots, the 'navigator', in the hyperspy sense:
and the 'signal':
The ranges in the 'navigator' can be moved around interactively and the signal plot will update accordingly.
For more quick and dirty analysis I implemented a convenience method:
plot_auto_peakmap(cl)
Which chooses sensible (enough) defaults for the RangeChannels.
If this is something you think could slot into LumiSpy, I'll go ahead and write the tests and expand the docstrings etc.
Feedback on the implementation/ naming more than welcome!
Thanks,
Hugh

