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
Corrected cylinder docs #539
Corrected cylinder docs #539
Conversation
Corrected equation one by removing the incorrect $\sin\alpha$ term in equation one. Also replaced P(q) with I(q) which is more correct in this case and eventually should be normalized across all models. Also updated the "last modified by" tag
@@ -45,7 +45,7 @@ | |||
|
|||
.. math:: | |||
|
|||
P(q) = \frac{\text{scale}}{V} | |||
I(q) = \frac{\text{scale}}{V} | |||
\int_0^{\pi/2} F^2(q,\alpha) \sin \alpha\ d\alpha + \text{background} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to move the u-substitution comment down. That is,
P(q) = F²(q) =∫₀^π/2 F²(q, α) sin α dα
and so
I(q) = scale/V ∫₀^π/2 F²(q, α) sin α dα + background
After substitution with u = cos α, du = sin α dα,
P(q) = ∫₀¹ F²(q, u) du
I(q) = scale/V ∫₀¹ F²(q, u) du + background
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed changes are reasonable to me.
However, I feel that it may be useful to make some additional changes to the following line:
P(q)=F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha}=\int_{0}^{1}{F^2(q,u)du}
It may be better to change it to
P(q)=F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha}
The concern is that F^2(q, u) may confuse people.
We already used F^2(q,\alpha) as the form factor.
When using F^2(q, u), we implied that u = \alpha. However, in fact, u = cos(\alpha).
…tation-is-incorrect
Looking at the code, the cylinder model does not use a u-substitution for the integral. It could, and similar functions do, but it does not. |
Actually, there is no need in this documentation really to go into the numerical integration detail even it if were used. But since it is not I just removed the offending line.
Corrected equation one by removing the incorrect$\sin\alpha$ term in equation one. Also replaced P(q) with I(q) which is more correct in this case and eventually should be normalized across all models. Also updated the "last modified by" tag