Skip to content
Snippets Groups Projects
Commit 1c8f64ef authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

cosine is done

parent 4a846e00
No related branches found
No related tags found
1 merge request!1911Create pages for each ripple ff (#709)
......@@ -5,7 +5,7 @@ weight = 20
## Cosine ripple
A ripple with an asymmetric 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| \le W/2 $
#### Usage
......@@ -33,74 +30,28 @@ As for any other [Form factor](/ref/sample/particle/ff).
#### Implementation
Class {{% ref-class "Sample/HardParticle" "SawtoothRipple" %}} inherits from the interface class
Class {{% ref-class "Sample/HardParticle" "CosineRipple" %}} inherits from the interface class
{{% ref-class "Sample/Particle" "IFormFactor" %}}.
Form factor is computed as
$$ F(\mathbf{q}) = f_\parallel(q_x)
i\text{e}^{-i q_y d}
\left[
\text{e}^{i \alpha_{-}/2} \text{sinc}\left( \frac{\alpha_{+}}{2} \right)
- \text{e}^{i \alpha_{+}/2} \text{sinc}\left( \frac{\alpha_{-}}{2} \right)
\right], $$
with the notation
$$ \alpha_{+} = H q_z + \frac{q_y W}{2} + q_y d, \quad
\alpha_{-} = H q_z - \frac{q_y W}{2} + q_y d. $$
The longitudinal factor $ f_\parallel $ is defined according to "box shape" in $XZ$ plane:
$$ f_\parallel(q_x)=L \space \text{sinc}(q_xL/2). $$
$$ F(\mathbf{q}) = f_\parallel(q_x) f_\bot(q_y,q_z), $$
where $ f_\bot(q_y,q_z) $ is computed numerically
and $ f_\parallel(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=\dfrac{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_\parallel(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/SawtoothRippleBox.png">
<img src="/img/auto/ff/CosineRippleBox.png">
Generated by {{% ref-ex "ff/SawtoothRippleBox.py" %}}.
Generated by {{% ref-ex "ff/CosineRippleBox.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_\parallel $ had an extra factor of 2.5.
The Gauss factor $ f_\parallel $ was completely wrong up through BornAgain 20.
"CosineRippleBox" replicates "Ripple1" from FitGISAXS [[Babonneau 2013](/lit/babonneau2013)].
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment