wilson-eft / wilson

A Python package for the running and matching of Wilson coefficients above and below the electroweak scale
https://wilson-eft.github.io
MIT License
26 stars 19 forks source link

Fix Issue #31 #32

Closed jackypheno closed 5 years ago

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 152


Totals Coverage Status
Change from base Build 150: 0.009%
Covered Lines: 8266
Relevant Lines: 8542

💛 - Coveralls
DavidMStraub commented 5 years ago

Thanks! I fixed the failing test. Do you plan to add a unit test?

jackypheno commented 5 years ago

Thanks! I fixed the failing test. Do you plan to add a unit test?

Yes, sure. I will work it out on this weekend. I can make a separate pull request for that.

DavidMStraub commented 5 years ago

Thanks, no rush. You can commit directly to this PR.

DavidMStraub commented 5 years ago

Hi,

apparently something was wrong with the last commit; there was a huge merge commit. Maybe your branch was not up to date with the master branch? Can you try rebasing? Feel free to force-push to your fork if necessary.

DavidMStraub commented 5 years ago

Hi @jackypheno, does this PR have to wait for #33 or can it be merged (after fixing the rebase)?

jackypheno commented 5 years ago

Hi David,

Yes it can be merged independent of #33, but apart from rebasing, another problem is the unittest that I wrote are failed with the error:

====================================================================== FAIL: test__translate_warsaw_to_warsawup (wilson.test_wilson.TestWilson)

Traceback (most recent call last): File "/home/travis/build/wilson-eft/wilson/wilson/test_wilson.py", line 113, in test__translate_warsaw_to_warsawup self.assertAlmostEqual(wc_out.dict['qd1_1211'], V[0,0]np.conj(V[1,1])1e-6) AssertionError: (8.985504500508895e-07+6.380077339460156e-11j) != (9.48826326858361e-07+3.1900386556550895e-11j) within 7 places

I am trying to understand the difference in these two numbers.

DavidMStraub commented 5 years ago

Hi,

your test fails because you forgot to take into account that the WCs need to be completed by the redundant entries before the flavour rotation, namely one has to add the entry Cqd1_2111, which is the complex conjugate of 1211 since Cqd1 is hermitian.

So instead of V[0, 0] * V[1, 1].conjugate() * 1e-6, it should be V[0, 0] * V[1, 1].conjugate() * 1e-6 + V[1, 0] * V[0, 1].conjugate() * 1e-6.

By the way, when using assertAlmostEqual, one has to be careful when using small numbers. In this case one should explicitly specify the places or delta argument, otherwise the test might succeed simply because it thinks the small numbers are "almost zero".

jackypheno commented 5 years ago

Hi David,

Oh you're right! I have fixed it.

Thanks