diff --git a/hugo/content/ref/sample/particle/ff/ripples/_index.md b/hugo/content/ref/sample/particle/ff/ripples/_index.md new file mode 100644 index 0000000000000000000000000000000000000000..f69f48601f1f6ed26889ea62be904ae602285180 --- /dev/null +++ b/hugo/content/ref/sample/particle/ff/ripples/_index.md @@ -0,0 +1,45 @@ ++++ +title = "Ripples" +weight = 20 ++++ + +## Ripples + +Elongated particles, or ripples, are typically used to model lamellar cuts or gratings. + +As everywhere else in BornAgain +only single scattering in the DWBA is simulated. +This can be insufficient for periodic gratings +that cause noticeable higher-order diffraction. +But for the foreseeable future, multiple-scattering effects are not in the scope of BornAgain. + +We choose ripples to be elongated in $x$ direction. +Different profiles in the $YZ$ plane can be set, for example, bar, cosine, sawtooth. +For each of them, different profiles can also be chosen in the $XZ$ plane. + +[The approach to setting the ripple profiles will be changed soon]({{% url-issues %}}/60) + +#### Implementation + +Form factor is computed as + +$$ F(\mathbf{q}) = f_\parallel(q_x) f_\bot(q_y,q_z) $$ + +The longitudinal factor $ f_\parallel $ is defined in $XZ$ plane for the following shapes: + +##### Box + +$$ f_\parallel(q_x)=L \space \text{sinc}(q_xL/2) $$ + +##### Gauss + +$$ f_\parallel(q_x)= \space \frac{L}{\sqrt{2 \pi}} \text{e}^{- \frac{{(q_x l)}^{2}}{2}} $$ + +##### Lorentz + +$$ f_\parallel(q_x)= \space \frac{L}{1+{(q_x l)}^{2}} $$ + +The transversal factor $ f_\bot(q_y,q_z) $ is defined by the ripple type + +{{% children %}} + diff --git a/hugo/content/ref/sample/particle/ff/ripples/bar.md b/hugo/content/ref/sample/particle/ff/ripples/bar.md new file mode 100644 index 0000000000000000000000000000000000000000..1442733be1d68922d05543d53764ade4e8488da2 --- /dev/null +++ b/hugo/content/ref/sample/particle/ff/ripples/bar.md @@ -0,0 +1,103 @@ ++++ +title = "Bar ripple" +weight = 20 ++++ + +## Bar ripple + +A ripple with an asymmetric saw-tooth profile that is uniform in $x$-direction. + +<img src="/img/draw/ff/3d/Box.png" width="30%" > +<img src="/img/draw/ff/2d/Box_xy.svg" width="30%"> +<img src="/img/draw/ff/2d/Box_xz.svg" width="30%"> + +#### Constructors + +```python +Box(L, W, H) +BarGauss(L, W, H) +BarLorentz(L, W, H) +``` + +Parameters: +- L, length +- W, width +- H, height + +#### Usage + +As for any other [Form factor](/ref/sample/particle/ff). + +#### Implementation + +Class {{% ref-class "Sample/HardParticle" "SawtoothRipple" %}} 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). $$ + + +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: + +<img src="/img/auto/ff/SawtoothRippleBox.png"> + +Generated by {{% ref-ex "ff/SawtoothRippleBox.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. diff --git a/hugo/content/ref/sample/particle/ff/ripples/cosine.md b/hugo/content/ref/sample/particle/ff/ripples/cosine.md new file mode 100644 index 0000000000000000000000000000000000000000..fc4f913381b3faf31794aeefe99c57361f123dc9 --- /dev/null +++ b/hugo/content/ref/sample/particle/ff/ripples/cosine.md @@ -0,0 +1,106 @@ ++++ +title = "Cosine ripple" +weight = 20 ++++ + +## Cosine ripple + +A ripple with an asymmetric saw-tooth 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%"> +<img src="/img/draw/ff/2d/CosineRipple_yz.svg" width="30%"> + +#### Constructor + +```python +SawtoothRippleBox(L, W, H, d) +``` + +Parameters: +- L, length +- W, width +- H, height +- d, asymmetry + +Constraint: + +$ |d| \le W/2 $ + +#### Usage + +As for any other [Form factor](/ref/sample/particle/ff). + +#### Implementation + +Class {{% ref-class "Sample/HardParticle" "SawtoothRipple" %}} 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). $$ + + +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: + +<img src="/img/auto/ff/SawtoothRippleBox.png"> + +Generated by {{% ref-ex "ff/SawtoothRippleBox.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. diff --git a/hugo/content/ref/sample/particle/ff/ripples/index.md b/hugo/content/ref/sample/particle/ff/ripples/sawtooth.md similarity index 77% rename from hugo/content/ref/sample/particle/ff/ripples/index.md rename to hugo/content/ref/sample/particle/ff/ripples/sawtooth.md index 21ca64218f3bd6741bc15ee3adf6dcec745ea6bf..9bbc4a80bd7c58a375899f316a1a9633287db5f7 100644 --- a/hugo/content/ref/sample/particle/ff/ripples/index.md +++ b/hugo/content/ref/sample/particle/ff/ripples/sawtooth.md @@ -1,25 +1,9 @@ +++ -title = "Ripples" +title = "Sawtooth ripple" weight = 20 +++ -## Ripples - -Elongated particles, or ripples, are typically used to model lamellar cuts or gratings. - -As everywhere else in BornAgain -only single scattering in the DWBA is simulated. -This can be insufficient for periodic gratings -that cause noticeable higher-order diffraction. -But for the foreseeable future, multiple-scattering effects are not in the scope of BornAgain. - -We choose ripples to be elongated in $x$ direction. -Different profiles in the $YZ$ plane can be set, for example, bar, cosine, sawtooth. -For each of them, different profiles can also be chosen in the $XZ$ plane. - -[The approach to setting the ripple profiles will be changed soon]({{% url-issues %}}/60) - -### Example +## Sawtooth ripple A ripple with an asymmetric saw-tooth profile that is uniform in $x$-direction. @@ -119,4 +103,4 @@ Generated by {{% ref-ex "ff/SawtoothRippleBox.py" %}}. 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. \ No newline at end of file +The Gauss factor $ f_\parallel $ was completely wrong up through BornAgain 20.