-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUG] vmdpy - use with odd length data leads to even length decomposition #6602
Comments
I found that the first line of that code has a function that identifies the length of the data.
I don't really understand the intent of this code, but it is the reason for the reduced data length. |
This is an automatic reply, confirming that your email was received.I will reply as soon as possible.Thank you!
|
me too.The length of the odd sequence length will be one less after decomposition. Does anyone know how to solve it? |
I believe I fixed the issue, (it now does not remove parts of the sequence if odd but I am unaware if the math overall still holds up) it has to do with directly copy from the matlab reference. In the matlab code
the authors did not FLOOR or CEIL T/2 which leads to half steps being rounded up automatically not floored. i.e. 5/2 will be 3.
And REPLACE (lines 46-48)
WITH
You will need to
@xuyaojian123 @WenjieXu2000 If you could verify this solution works for you and the math remains unaffected that would be wonderful. |
This worked for me. I compared a set of IMFs with even sequence lengths produced by the original code and the new code and the values are identical. And now it can also do odd sequence lengths. Thanks! |
万分感谢 |
in #6598, @Cai-Chengyi posted a link to a repo with a potential fix: https://github.com/shenmusmart/VMD_python |
@LorchZachery, this seems like a fix - would you, or anyone else in this thread, like to make a PR with the fix and add a test? |
Thank you very much for the vmdpy template you provided, but I have the following problems when I use it: the length of my original sequence is fifty-nine, but the length of the subsequence obtained after decomposition has become fifty-eight. What is the reason for the situation? Is there any way to solve this problem?
The text was updated successfully, but these errors were encountered: