-
Notifications
You must be signed in to change notification settings - Fork 13
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
minor bug in hwp_sys.set_parameters() #335
Comments
Hi Miguel,
Yes I would say you are right on both things! We should have that for block under the "jones" case, and I guess also and you are correct about the default mueller values, we should have |
About your other error, maybe @paganol can help not sure what is the issue with |
For me a simple solution would be to simply change the initialization of the attribute channel in the class FreqChannelInfo in 281 from detectors.py.
to
inserting the underscore. I tried it and I no longer get the error. |
Hi @mj-gomes , thanks for having spotted these errors and for proposing a solution! Once this is fixed, it would be good to add some tests to ensure that the error won’t appear again in the future. Should we release a patch release (0.13.1) once a PR is merged? |
Hello @ziotom78, I will write some tests to ensure the solutions presented work, I'll get back to you when they are ready. |
When using the hwp_sys.py code using Mueller as the input matrix (in set_parameters) I think I found one small bug, because I get this error:
This is my set_parameters call:
This is a code snippet of the region of hwp_sys.py code where the error comes from :
I would say that the for block should be inside the if mueller_or_jones == "jones" block, and the last for block should be inside the else block (for the mueller case), because we don't have the beta parameter when using Mueller Matrix as input.
Also, I realized that, in this hwp.sys code, the jones matrix elements that are attributed by default when none are given correspond to the ideal case, while for the Mueller case they don't (they are all zero, instead of having the 1's in the diagonal). Is this intentional or is it something to change?
--
EDIT : I was going to create another issue, but since this error also comes from hwp_sys.set_parameters(), I add it in here. There might be another bug when giving a single frequency to the Channel parameter as in the example at the top.
If, in line 984 of hwp.sys, I change [Channel.channel] to ['140.0_GHz'] it works, so the problem should be either in the definition of the dictionnary keys, or in the string coming from lbs.FreqChannelInfo(bandcenter_ghz=140), because the dictionnary does not accept '140.0 GHz' without the underscore as a key, however it is the one coming from the frequency channel definition. Or maybe I should not define the frequency channel like I did?
The text was updated successfully, but these errors were encountered: