Skip to content
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

Symbolic expression for BlattWeisskopfSquared for arbitrary L #417

Closed
mmikhasenko opened this issue May 13, 2024 · 4 comments · Fixed by #418
Closed

Symbolic expression for BlattWeisskopfSquared for arbitrary L #417

mmikhasenko opened this issue May 13, 2024 · 4 comments · Fixed by #418
Assignees

Comments

@mmikhasenko
Copy link
Contributor

Problem description

Polynomials in the BlattWeisskopfSquared implementation are complicated.

Proposed solution

They can be replaced by symbolic expressions
image
(the screenshot is from a review)

What should the interface look like?

No response

Additional context

No response

@redeboer
Copy link
Member

Thanks for the reference, that's great! Indeed would be super easy to implement this with SymPy it seems. And will also make the lamdification for parametrized $l$ way nicer than this casewise implementation

@redeboer
Copy link
Member

First some clarity on the notation of

$$F_l^2(z) = \frac{1}{z\left|h^{(1)}_l\left(q/q_R\right)\right|^2}.$$

With the definition $z(s) = \left[q(s)/q_R\right]^2$, does that mean we get

$$F_l^2(z) = \frac{1}{z\left|h^{(1)}_l(z)\right|^2}\,?$$

(If I strictly replace though, it would be something like $q/q_R=\pm\sqrt{z}$.)

If so, does this mean the 'Hankel-normalized' Blatt–Weisskopf factor, like in 10.1002/andp.19955070504, p. 415 (in AmpForm denoted $B^2_l$) becomes

$$B_l^2(z) = \frac{z^l\left|h^{(1)}_l(1)\right|^2}{z\left|h^{(1)}_l(z)\right|^2}\,?$$

It's a bit handwaving here — trying to get the same order of $z$ in the nominator and getting that factor in front from the Hankel function.

@redeboer
Copy link
Member

Unfortunately it seems that SymPy's hankel1 has no algebraic implementation for specific $l$ or $z$ values for $h_l^{(1)}(z)$. (I assume $H$ is just the same as $h$). The expression class lambdifies to scipy.special.hankel1.

image

But if Equation (96) is sufficient, we could implement a specialized Hankel1 expression class that evaluates to that series.

@redeboer
Copy link
Member

if Equation (96) is sufficient, we could implement a specialized Hankel1 expression class that evaluates to that series.
#417 (comment)

With a custom Hankel1 class and some hacking to avoid letting the sympy.Sum evaluate if $l$ is symbolic, I get:

image

If I strictly replace though, it would be something like $q/q_R=\pm\sqrt{z}$.

#417 (comment)

To get the same polynomials as in the current implementation, this indeed required using $h_l^{(1)}\left(\sqrt{z}\right)$.
image

@redeboer redeboer changed the title [FR] Symbolic expression for BlattWeisskopfSquared Symbolic expression for BlattWeisskopfSquared for arbitrary L May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants