-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove special treatment of DC in tfCorrection + fix load_TF_fromVNA #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I think I would give this a thumbs up as well. My only concern would have been a breakage at later stages (MPIUI and/or reconstruction) but if issues arise there, we can fix them there. @nHackel: any objections? |
I think this change sounds good! It might be a breaking change, but most recos will probably be fine, since we would have a minFreq anyway/no good SNR for the offset freq (I think). This, together with #96 and the potential TF change in MPIMeasurements.jl could be packaged as a new treatment of frequencies with no backward compatibility. If we go that route, we should have migration guides in the releases and also check if there are any other breaking changes we want to do |
This is not directly related to the original scope of the PR, but I also added new methods for combining TFs (which I need in MPIMeasurements when combining the channel TFs to form the TF to be written into the MDF) and split up the |
For inductive measurements the DC component gets lost, this would mean a real zero in the TF which can not be recovered.
At some point this has been handled by a keyword parameter
tfDCCorrection
, deciding if the TF should be applied to the DC components. This was changed to automatically detecting if all channels of the TF contain no zeros (or NaNs) and only then dividing by the TF-DC-value.This leads to the following issues:
Due to these reasons I want to propose just dropping the check for zeros in the TF all together as implemented in this PR. This results in the following:
The only issue I could see with this is that a NaN value in the frequency domain data has to be set to zero manually if the user wants to inverse fourier transform the data themselves, potentially breaking currently working scripts
What are your thoughts on this change? Does this break something else?