-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][FIX] irfft: ramp correction and apodization fix for asymmetric interferograms #641
base: master
Are you sure you want to change the base?
Conversation
@stuart-cls I think the "original" (on your figure) asymmetric apodization was meant for SNOM IFGs and the intention was to have that shape, where not only the position of the ZPD is offset but also the apodization. In my understanding the reason for this is that the near field signal is contained only on one side of the ZPD and the other should be down-weighted. There is some literature on this: http://hdl.handle.net/10810/26669 NeaSpec does something very similar, but their calculations are proprietary. However, I think there is some actual scientific discussion missing... @raul-freitas, @levandoskije, what do you think? |
@borondics I'm pretty sure this part of the code predates SNOM! That said, I definitely don't want to break anything correct. I will simply note that for asymmetric interferograms in an FT-IR, downweighting the short side via shrinking the apodization window ("old") is not the same as downweighting the short side via the ramp ("new + ramp"), and the latter is the correct way. I'll review the literature you sent, I'm also waiting on other feedback. If you have any before / after data of what Neaspec is doing, please send it along: we can compare the two approaches. This is basically what I did for the Agilent imaging data to check for correctness. |
Hello @borondics and @stuart-cls. Maybe we can plan some synchronized activities soon. I have two new folks that will give some support to Orange-Quasar in here. |
I was just browsing SciPy for something and realized that many (all?) of the apodization functions are implemented there. Since SciPy is a dependency, should we simply use those functions to decrease the code? |
@borondics I'm aware of those functions. Originally I wanted to keep the dependencies of Dependencies aside, I looked at how those windows are implemented this time around and they don't work for either of the types of apodization we would like to do. Which brings me to the summary of the current state of this PR: based on our discussions offline, the thesis above, and feedback from others, I think we will have to distinguish between interferometer types:
where type (1) will use this symmetric + ramp approach and type (2) will use the existing approach of different apodization functions for each wing. |
Fixes an old error in the apodization function generation for asymmetric interferograms, found while adding a ramp correction to avoid double-counting in the symmetric section. Illustration of the issue:
The above figure illustrates how the original apodization code was handling the taper to zero needed in asymmetric interferograms. While it does bring the amplitude to zero at the edge of the short side, it obviously badly violates the symmetry requirements. This would not have been obvious on the original symmetric test interferograms.