Closed mmikhasenko closed 2 months ago
Btw, you do not need to download it ever, just open the pluto and put
https://gist.github.com/mmikhasenko/ee7c71ead37692f0cf4653e9c52171ea
to the address of the notebook
When both components are zero, the phi
angle is pretty much undefined.
See the values below, these are the last digits of float that make the difference,
It's fine in general. Importantly, the rotation is consistently propagated over the chain.
What we learn is that aligning is not necessary a good thing when working with numerical methods.
btw, you mentioned that making phi=0 did not work for you, it's rather pi. The reason is the same: atan2(~0,~0)
is an arbitrary number
It's not worth the effort trying to fix it, we should just avoid 0, and pi when comparing.
Let's add a line in README and close the issue.
Yes I had the same thought. Good that its cleared up though.
Maybe we could redefine it in such a way, that we rotate only theta and pick phi based on the direction of other momenta?
I think there is no other momentum that can be used
True. That Was my struggle back when I implemented this. It does not work well in rest frame :D
In the example below, the angles
_23
are the angles onf the momentum p2+p3. They are clearly (0,pi) since px = 0 and py=0, while the code returns-0.92
for phi.Attaching the notebook to a public gist.
I do not exclude that the problem is on Julia site. We have to reproduce the notebook in clean python session.