-
Notifications
You must be signed in to change notification settings - Fork 14
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
Impr/fix refactor sfcf read #164
Conversation
Thanks for the fix. Some of the tests seem to be failing. I think the reason could be that |
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.
I started looking into your changes in sfcf.py and saw a few lines of duplicate code:
- I think lines 85 & 86 can be removed as they are overwritten in the next block anyways
- Either lines 74 & 75 or 103 & 104 could be removed.
Another thing that I haven't been very consistent with is raising more specific Exceptions (for example in _find_correlator
).
Oh yes, oyou are right... I have to say I did not have a look into the kwargs statements, thank you for telling me. |
This is in fact the case... the only solution I would have is to throw an exception in this case... However interestingly, in my test set-up this does not appear... I am using Python 3.10.6 with pytest 7.2.2. As I cannot reproduce the error, I cannot fix the function (or the test for that matter). |
In case of One way of fixing the error could be to add an |
I also cannot reproduce the error on my machine. Maybe the error is connected to the way how you clean the test environment. I would suggest using pytest's |
Okay, this brings us one step closer. Apparently the tests fail because the program tries to extract the correlator |
I am already looking into that, but so far I have no idea... the only explanation I can come up with would be, that the exclusion in ll. 211,212 in sfcf.py are not working in this very specific case... Why this would be the case... I don't know... |
I think pyerrors/pyerrors/input/sfcf.py Line 213 in a8ec3f9
should maybe not be in the for loop? |
Yep, I just saw that line too... weird that this does appear in any case... |
That seems to have done the trick. Now I also remember, that a similar issue was also present in a very early version of the code, except that this clipping never appeared in reality back then. |
Thanks a lot. I will merge these changes so that we can do some extended testing on develop. |
This should fix #163. I refactored large parts of the read_sfcf method and I am now using the same method to sort the replika as the openQCD methods do since #153.
Although I found a small mistake in my analysis script that could also be the reason #163 appeared in the first place, like this, the sorting of replika should be more consistent between the read methods of sfcf and openQCD data.