Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
1c8f64ef
Commit
1c8f64ef
authored
1 year ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
cosine is done
parent
4a846e00
No related branches found
No related tags found
1 merge request
!1911
Create pages for each ripple ff (#709)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hugo/content/ref/sample/particle/ff/ripples/cosine.md
+12
-61
12 additions, 61 deletions
hugo/content/ref/sample/particle/ff/ripples/cosine.md
with
12 additions
and
61 deletions
hugo/content/ref/sample/particle/ff/ripples/cosine.md
+
12
−
61
View file @
1c8f64ef
...
...
@@ -5,7 +5,7 @@ weight = 20
## Cosine ripple
A ripple with a
n a
symmetric
saw-tooth
profile that is uniform in $x$-direction.
A ripple with a
symmetric
cosine
profile that is uniform in $x$-direction.
<img
src=
"/img/draw/ff/3d/CosineRipple.png"
width=
"30%"
>
<img
src=
"/img/draw/ff/2d/CosineRipple_xy.svg"
width=
"30%"
>
...
...
@@ -14,18 +14,15 @@ A ripple with an asymmetric saw-tooth profile that is uniform in $x$-direction.
#### Constructor
```
python
SawtoothRippleBox
(
L
,
W
,
H
,
d
)
CosineRippleBox
(
L
,
W
,
H
)
CosineRippleGauss
(
L
,
W
,
H
)
CosineRippleLorentz
(
L
,
W
,
H
)
```
Parameters:
-
L, length
-
W, width
-
H, height
-
d, asymmetry
Constraint:
$ |d|
\l
e W/2 $
#### Usage
...
...
@@ -33,74 +30,28 @@ As for any other [Form factor](/ref/sample/particle/ff).
#### Implementation
Class {{% ref-class "Sample/HardParticle" "
Sawtooth
Ripple" %}} inherits from the interface class
Class {{% ref-class "Sample/HardParticle" "
Cosine
Ripple" %}} inherits from the interface class
{{% ref-class "Sample/Particle" "IFormFactor" %}}.
Form factor is computed as
$$ F(
\m
athbf{q}) = f_
\p
arallel(q_x)
i
\t
ext{e}^{-i q_y d}
\l
eft[
\t
ext{e}^{i
\a
lpha_{-}/2}
\t
ext{sinc}
\l
eft(
\f
rac{
\a
lpha_{+}}{2}
\r
ight)
-
\t
ext{e}^{i
\a
lpha_{+}/2}
\t
ext{sinc}
\l
eft(
\f
rac{
\a
lpha_{-}}{2}
\r
ight)
\r
ight], $$
with the notation
$$
\a
lpha_{+} = H q_z +
\f
rac{q_y W}{2} + q_y d,
\q
uad
\a
lpha_{-} = H q_z -
\f
rac{q_y W}{2} + q_y d. $$
The longitudinal factor $ f_
\p
arallel $ is defined according to "box shape" in $XZ$ plane:
$$ f_
\p
arallel(q_x)=L
\s
pace
\t
ext{sinc}(q_xL/2). $$
$$ F(
\m
athbf{q}) = f_
\p
arallel(q_x) f_
\b
ot(q_y,q_z), $$
where $ f_
\b
ot(q_y,q_z) $ is computed numerically
and $ f_
\p
arallel(q_x) $ is chosen according to
[
longitudinal profile
](
/ref/sample/particle/ff/ripples/
)
.
Volume
[
has been validated
](
{{%
url-src %}}/Tests/Unit/Sample/FormFactorBasicTest.cpp)
against
$$ V=
\d
frac{LWH}{2}. $$
#### Other shapes
We have already stated that transversal $YZ$ and longitudinal $XZ$ profiles are set separately.
For other longitudinal shapes use
```
python
SawtoothRippleGauss
(
L
,
W
,
H
,
d
)
SawtoothRippleLorentz
(
L
,
W
,
H
,
d
)
```
with the corresponding factor $ f_
\p
arallel(q_x) $ inside.
Other transversal profiles are also available:
cosine profile
```
python
CosineRippleBox
(
L
,
W
,
H
)
CosineRippleGauss
(
L
,
W
,
H
)
CosineRippleLorentz
(
L
,
W
,
H
)
```
and rectangular profile
```
python
Box
(
L
,
W
,
H
)
BarGauss
(
L
,
W
,
H
)
BarLorentz
(
L
,
W
,
H
)
```
#### Scattering
Scattering by uncorrelated, oriented
sawtooth
ripples for horizontal incidence. Rotation around $z$ axis:
Scattering by uncorrelated, oriented
cosine
ripples for horizontal incidence. Rotation around $z$ axis:
<img
src=
"/img/auto/ff/
Sawtooth
RippleBox.png"
>
<img
src=
"/img/auto/ff/
Cosine
RippleBox.png"
>
Generated by {{% ref-ex "ff/
Sawtooth
RippleBox.py" %}}.
Generated by {{% ref-ex "ff/
Cosine
RippleBox.py" %}}.
#### History
"CosineRippleBox" and "SawtoothRippleBox" replicate "Ripple1" and "Ripple2" from FitGISAXS
[
[Babonneau 2013
](
/lit/babonneau2013
)
].
Full documentation and API support for all ripple form factors appeared in
BornAgain 1.17. Before that release, the Lorentz factor $ f_
\p
arallel $ had an extra factor of 2.5.
The Gauss factor $ f_
\p
arallel $ was completely wrong up through BornAgain 20.
"CosineRippleBox" replicates "Ripple1" from FitGISAXS
[
[Babonneau 2013
](
/lit/babonneau2013
)
].
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment