I started using hyperspy to work on hyperspectral camera data, and I'm really impressed.
My experimental setup acquires time-resolved images of a light pulse, and I can then do a FFT to see the images at discrete frequencies. That goes something like this:
s = hs.signals.Signal2D(cube)
s.plot()
\\\\
S = s.transpose().fft().transpose()
S.plot()
That works very well.
When I want to introduce units, I assume that the scale parameter should be the stepsize. Eg. time step between samples or mm on acquisition plane. I define the units using:
s.axes_manager[0].scale_as_quantity = '{:f} ps'.format(𝝙t*1e12)
s.axes_manager[1].scale_as_quantity = '{:f} mm'.format(30/256)
s.axes_manager[2].scale_as_quantity = '{:f} mm'.format(30/255)
But here is the issue:
When I then plot the temporal data, I get a x-axis that has labels in the range [0; 801] (the first dimensionality of the time data), and not [0-16] as I expect. Furthermore, when I drag the cursor line, it moves only a fraction of the cursor displacement on the screen. I.e. when I drag the red cursor line across the entire plot, it only moves about 1/10 as the cursor.
I assume I'm using the units wrong, but I have not been able to find any pointers on that.
Cheers,
Christian