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

fix normalization for angular dispersion (Trac #332) #467

Closed
pkienzle opened this issue Mar 30, 2019 · 8 comments
Closed

fix normalization for angular dispersion (Trac #332) #467

pkienzle opened this issue Mar 30, 2019 · 8 comments
Assignees
Labels
Blocker Prevents a different issue from being resolved Defect Bug or undesirable behaviour
Milestone

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

sasview 2D models have an issue with the theta parameter. If there is angular dispersion on theta, then the calculated pattern is weighted by cos(theta). This means that as the 2D pattern is rotated through 90 degrees, the overall scattering intensity decreases and increases again. Furthermore, if there is no angular dispersion, the "correction" is not applied.

It is perhaps the case that the definition of theta and phi in the models does not match theta and phi in the documentation, and that the correction should be applied on the basis of phi, or alternatively, phi and theta should be swapped and the correction continue to apply to theta.

Migrated from http://trac.sasview.org/ticket/332

{
    "status": "closed",
    "changetime": "2016-06-20T15:50:42",
    "_ts": "2016-06-20 15:50:42.651202+00:00",
    "description": "sasview 2D models have an issue with the theta parameter.  If there is angular dispersion on theta, then the calculated pattern is weighted by cos(theta).  This means that as the 2D pattern is rotated through 90 degrees, the overall scattering intensity decreases and increases again.  Furthermore, if there is no angular dispersion, the \"correction\" is not applied.\n\nIt is perhaps the case that the definition of theta and phi in the models does not match theta and phi in the documentation, and that the correction should be applied on the basis of phi, or alternatively, phi and theta should be swapped and the correction continue to apply to theta.\n",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Bug Fixing",
    "time": "2015-02-16T16:12:15",
    "component": "SasView",
    "summary": "fix normalization for angular dispersion",
    "priority": "blocker",
    "keywords": "",
    "milestone": "SasView 4.0.0",
    "owner": "pkienzle",
    "type": "defect"
}
@pkienzle pkienzle added this to the SasView 4.0.0 milestone Mar 30, 2019
@pkienzle pkienzle self-assigned this Mar 30, 2019
@pkienzle pkienzle added Blocker Prevents a different issue from being resolved Defect Bug or undesirable behaviour Incomplete Migration and removed Incomplete Migration labels Mar 30, 2019
@butlerpd
Copy link
Member

Trac update at 2015/08/14 19:52:33: butler changed milestone from "SasView Next Release +1" to "SasView 4.0.0"

@pkienzle
Copy link
Contributor Author

Trac update at 2016/01/07 01:50:09:

  • pkienzle changed _comment0 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(H,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I^2^(q)> = ∫ ∫ I^2^(q,θ,ϕ)P,,1,,(q,θ)P,,2,,(q,ϕ)|cos(θ)| dθ dϕ

I can't find a reference that includes the cosine term.

Perhaps the confusion arose from the different forms of the ellipsoid of revolution. Eq 2.32 gives the ellipsoid of revolution as:

i(h) = ∫,,0,,^pi/2^ Phi^2^(h a √(cos^2^ θ + v^2^ sin^2^ θ) cos θ dθ

but the 1-D ellipsoid kernel employs the substitution u = sin theta so it is evaluated as

i(h) = ∫,,0,,^1^ Phi^2^(h a √(1 + u^2^(v^2^ - 1)) du

[Note: the u variable above is incorrectly named as cos_alpha in the code.]

to:

1452133334109394

  • pkienzle changed _comment1 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(H,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I^2^(q)> = 

to:

1452133514879712

  • pkienzle changed _comment2 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(H,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I^2^(q)> = 

to:

1452133917506614

  • pkienzle changed _comment3 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(H,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I^2^(q)> = pi/2 ∫ ∫ I2(q,θ,ϕ)P1(q,θ)P2(q,ϕ)|cos(θ)| dθ dϕ

I can't find a reference that includes the cosine term, or the pi/2

Perhaps the confusion arose from the different forms of the ellipsoid of revolution. Eq 2.32 gives the ellipsoid of revolution as:

i(h) = ∫,,0,,^pi/2^ Phi2(h a √(cos2 θ + v2 sin2 θ) cos θ dθ

but the 1-D ellipsoid kernel employs the substitution u = sin theta so it is evaluated as

i(h) = ∫,,0,,^1^ Phi2(h a √(1 + u2(v2 - 1)) du

[Note: the u variable above is incorrectly named as cos_alpha in the code.]

to:

1452179591062413

  • pkienzle changed _comment4 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(H,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I(q)> = pi/2 ∫ ∫ I(q,θ,ϕ)P,,1,,(q,θ)P,,2,,(q,ϕ)|cos(θ)| dθ dϕ

I can't find a reference that includes the cosine term, or the pi/2

Perhaps the confusion arose from the different forms of the ellipsoid of revolution. Eq 2.32 gives the ellipsoid of revolution as:

i(h) = ∫,,0,,^pi/2^ Phi^2^(h a √(cos2 θ + v2 sin2 θ) cos θ dθ

but the 1-D ellipsoid kernel employs the substitution u = sin theta so it is evaluated as

i(h) = ∫,,0,,^1^ Phi^2^(h a √(1 + u2(v2 - 1)) du

[Note: the u variable above is incorrectly named as cos_alpha in the code.]

to:

1452179979477083

  • pkienzle changed _comment5 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(h,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I(q)> = pi/2 ∫ ∫ I(q,θ,ϕ)P,,1,,(q,θ)P,,2,,(q,ϕ)|cos(θ)| dθ dϕ

I can't find a reference that includes the cosine term, or the pi/2

Perhaps the confusion arose from the different forms of the ellipsoid of revolution. Eq 2.32 gives the ellipsoid of revolution as:

i(h) = ∫,,0,,^pi/2^ Phi^2^(h a √(cos2 θ + v2 sin2 θ) cos θ dθ

but the 1-D ellipsoid kernel employs the substitution u = sin theta so it is evaluated as

i(h) = ∫,,0,,^1^ Phi^2^(h a √(1 + u2(v2 - 1)) du

[Note: the u variable above is incorrectly named as cos_alpha in the code.]

to:

1452181468362275

  • pkienzle commented:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F^2^(h)> = ∫ ∫ F^2^(h,θ,ϕ)P,,1,,(h,θ)P,,2,,(h,phi) dθ dϕ

!SasView is using:

<I(q)> = pi/2 ∫ ∫ I(q,θ,ϕ)P,,1,,(q,θ)P,,2,,(q,ϕ)|cos(θ)| dθ dϕ

I can't find a reference that includes the cosine term, or the pi/2

Perhaps the confusion arose from the different forms of the ellipsoid of revolution. Eq 2.32 gives the ellipsoid of revolution as:

i(h) = ∫,,0,,^pi/2^ Phi^2^(h a √(cos^2^ θ + v^2^ sin^2^ θ) cos θ dθ

but the 1-D ellipsoid kernel employs the substitution u = sin theta so it is evaluated as

i(h) = ∫,,0,,^1^ Phi^2^(h a √(1 + u^2^(v^2^ - 1)) du

[Note: the u variable above is incorrectly named as cos_alpha in the code.]

@pkienzle
Copy link
Contributor Author

Trac update at 2016/01/07 02:29:18:

  • pkienzle changed _comment0 from:

Guinier and Fournet (1955) give the following equation 2.36 (pg 24):

<F2(h)> = ∫ ∫ F2(H,θ,ϕ)P1(h,θ)P2(h,phi) dθ dϕ

!SasView is using:

<I2(q)> = 

to:

1452133944067636

  • pkienzle commented:

... comment removed ...

@butlerpd
Copy link
Member

Trac update at 2016/03/06 18:00:00:

  • butler changed _comment0 from:

This should be part of sasmodels project and therefore core of 4.0

NOTE: this may be a duplicate of #492 -- needs checking

Meanwhile will make this blocker

to:

1457407553910011

  • butler commented:

This should be part of sasmodels project and therefore core of 4.0 Thus making this blocker

  • butler changed priority from "major" to "blocker"

@butlerpd
Copy link
Member

Trac update at 2016/03/06 23:13:19:

  • butler changed owner from "" to "pkienzle"
  • butler changed status from "new" to "assigned"

@butlerpd
Copy link
Member

Trac update at 2016/03/08 03:26:13: butler changed owner from "pkienzle" to "richardh"

@RichardHeenan
Copy link
Contributor

Trac update at 2016/03/16 17:51:29:

  • richardh commented:

This possibly resolved, PAK need to test code. cos(theta) in sasview likely the same as sin(theta) in Hayter & Penfold etc. We might still consider changing all the axes?

  • richardh changed owner from "richardh" to "pkienzle"

@pkienzle
Copy link
Contributor Author

Trac update at 2016/06/20 15:50:42:

  • pkienzle changed resolution from "" to "fixed"
  • pkienzle changed status from "assigned" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Prevents a different issue from being resolved Defect Bug or undesirable behaviour
Projects
None yet
Development

No branches or pull requests

3 participants