Skip to content

Commit

Permalink
Merge pull request #150 from jiangyi15/dispersion_integral
Browse files Browse the repository at this point in the history
feat: dispersion integral models
  • Loading branch information
jiangyi15 authored Oct 31, 2024
2 parents 3a62e16 + 81896cd commit c12c1a3
Show file tree
Hide file tree
Showing 5 changed files with 621 additions and 9 deletions.
1 change: 1 addition & 0 deletions tf_pwa/amp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .amp import AmplitudeModel, create_amplitude
from .base import *
from .core import *
from .dispersion_integral import DispersionIntegralParticle
from .flatte import ParticleFlatte
from .Kmatrix import KmatrixSingleChannelParticle
from .kmatrix_simple import KmatrixSimple
Expand Down
10 changes: 7 additions & 3 deletions tf_pwa/amp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,11 +890,15 @@ def _get_cg_matrix(
if out_sym:
from sympy.physics.quantum.cg import CG

sint = lambda x: sym.simplify(_spin_int(x * 2)) / 2
sint = (
lambda x: sym.simplify(sym.sign(x) * _spin_int(abs(x) * 2)) / 2
)
sqrt = lambda x: sym.sqrt(sint(x))

def my_cg_coef(a, b, c, d, e, f):
return CG(*list(map(sint, [a, c, b, d, e, f]))).doit()
def my_cg_coef(j1, j2, m1, m2, j3, m3):
ret = CG(*list(map(sint, [j1, m1, j2, m2, j3, m3]))).doit()
print(j1, j2, m1, m2, j3, m3, ret)
return ret

ret = ret.tolist()
for i, ls_i in enumerate(ls):
Expand Down
Loading

0 comments on commit c12c1a3

Please sign in to comment.