Sub-pixel Flag in align_zero_loss_peak Does Not Seeem to Work Properly

10 views
Skip to first unread message

Andrew Herzing

unread,
Jul 2, 2015, 11:39:48 AM7/2/15
to hypersp...@googlegroups.com
Hello,

I've been using hyperspy to align dual energy range EELS data by calculating an alignment on the low-loss data, which contains the ZLP, and applying the calculated shifts to the core-loss data.  In doing so, I would like to retain the integer scale of the energy axis (1 eV/channel) so I have set the 'subpixel' flag to False using the following line of code:

lowloss.align_zero_loss_peak(calibrate=True,also_align=[coreloss],subpixel=False)

However, this results in energy axes for both datasets that no longer contain integer values. Furthermore, it seems to produce the same result if subpixel is set to True or False.  Am I misunderstanding the functionality of the subpixel flag, or is this a bug in the alignment code?

Thanks very much,

Andy Herzing

Francisco de la Pena

unread,
Jul 2, 2015, 12:12:44 PM7/2/15
to hypersp...@googlegroups.com
Thank you for reporting this issue. This seems to be a linguistic problem: `subpixel` here refers to the accuracy of the shift estimation and, in this sense, it's working properly. If the result is indistinguishable from the result with `subpixel=True` is because the refinement step didn't align your dataset further. If you need integer values in the energy axes the following should solve your problem (assuming the that scale is 1):

    >>> lowloss.axes_manager[-1].offset = round(lowloss.axes_manager[-1].offset)

That said, I think that this qualifies as a bug, would you like to report it in the issues tracker issues tracker?

Best wishes,

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.

Andrew Herzing

unread,
Jul 2, 2015, 1:50:11 PM7/2/15
to hypersp...@googlegroups.com
Francisco,

Thanks very much for the prompt response.

Your workaround works quite well for my purposes for the time being, but I will add this to the issues tracker system.

Andy
Reply all
Reply to author
Forward
0 new messages