diff --git a/hugo/content/installation/building/unix/third-party.md b/hugo/content/installation/building/unix/third-party.md index 7731c406da00806e41546052e04f89b44547ec78..1212b0707fac3d89f6d82a0f49ced10727fcdeee 100644 --- a/hugo/content/installation/building/unix/third-party.md +++ b/hugo/content/installation/building/unix/third-party.md @@ -30,7 +30,7 @@ Recommended software: * For generating a man page: * `perl` -* For [Matplotlib usetex mode]({{% ref-py "result/matplotlib.md" %}}): +* For [Matplotlib usetex mode](py/result/matplotlib.md): * `texlive-latex-extra` (and dependencies) * `dvipng` * `cm-super-minimal` diff --git a/hugo/content/py/ex/gisas-no-dwba-terms/index.md b/hugo/content/py/ex/gisas-no-dwba-terms/index.md index b7390573b0a14f17786220471c06d690376422f0..ea2836a05d09d983c5d029c0eebf6e195542c2fb 100644 --- a/hugo/content/py/ex/gisas-no-dwba-terms/index.md +++ b/hugo/content/py/ex/gisas-no-dwba-terms/index.md @@ -9,7 +9,7 @@ This example shows scattering from a monolayer that contains a dilute random assembly of monodisperse cylindrical disks. -This is the same system as in our [basic GISAS example]({{% ref-py "ex/gisas" %}}) +This is the same system as in our [basic GISAS example](py/ex/gisas) except that there is no substrate. In consequence, there are no reflections, and therefore the DWBA boils down to the ordinary Born approximation. diff --git a/hugo/content/py/ex/gisas/_index.md b/hugo/content/py/ex/gisas/_index.md index cb9ca6ad51b6ab6bdbf611d808e3e7a4fac24539..1f65cdd4128ad285f6a834027cb059e59b3f2c9d 100644 --- a/hugo/content/py/ex/gisas/_index.md +++ b/hugo/content/py/ex/gisas/_index.md @@ -52,6 +52,6 @@ a [SimulationResult](/py/result/simulation-result) object. ### Further reading -* [GISAS with specular reflection]({{% ref-py "sim/setup/options/specular" %}}) +* [GISAS with specular reflection](py/sim/setup/options/specular) * [GISAS without DWBA terms](no-dwba-terms), with a single sample layer so that the DWBA boils down to the ordinary Born approximation. diff --git a/hugo/content/py/fitting/basic/minimizer-settings/index.md b/hugo/content/py/fitting/basic/minimizer-settings/index.md index 1cc6c335ac3424611b4ae7d9264773c041f9ed73..2ca36be1c6ac8c4618f6756a7e5dbad26428089c 100644 --- a/hugo/content/py/fitting/basic/minimizer-settings/index.md +++ b/hugo/content/py/fitting/basic/minimizer-settings/index.md @@ -22,6 +22,6 @@ print(ba.MinimizerFactory().catalogueDetailsToString()) For more information, see the -[minimizer settings tutorial]({{% ref-py "fitting/minimizers/index.md" %}}). +[minimizer settings tutorial](py/fitting/minimizers/index.md). {{< highlightfile file="Examples/fit/scatter2d/minimizer_settings.py" >}} diff --git a/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md b/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md index bebde26aa2aab1ecf24546f39364c31224c41429..54b9fba8ebbe79a9cc89b4a9dbbcc2eb1d2638a5 100644 --- a/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md +++ b/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md @@ -5,7 +5,7 @@ weight = 40 ### Fitting the spin-asymmetry example from NIST -This example shows how to fit the parameters in the [spin-asymmetry example]({{% ref-py "instr/polarized/polarized-spinasymmetry" %}}). +This example shows how to fit the parameters in the [spin-asymmetry example](py/instr/polarized/polarized-spinasymmetry). For this demonstration, we choose initial parameters that are not too far from the fitting results. In particular, the magnetization is initially set to zero, such that the spin asymmetry identically vanishes. @@ -41,7 +41,7 @@ If no uncertainties are available, using the relative difference `fit_objective. If the relative difference is selected and uncertainties are provided, BornAgain automatically falls back to the above $\chi^2$ metric. The fitting of polarized reflectometry data proceeds similar to the lines presented in -[the tutorial on multiple datasets]({{% ref-py "fitting/advanced/multiple-datasets" %}}). +[the tutorial on multiple datasets](py/fitting/advanced/multiple-datasets). We need to add the reflectivity curves for the up-up and down-down channel to the fit objective: @@ -87,7 +87,7 @@ we get the result {{< /galleryscg >}} -This result was already presented in the [spin-asymmetry]({{% ref-py "instr/polarized/polarized-spinasymmetry" %}}) tutorial and +This result was already presented in the [spin-asymmetry](py/instr/polarized/polarized-spinasymmetry) tutorial and can also be obtained by runnning the example without the fit option: {{< highlight python>}} diff --git a/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md b/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md index ab0c7deb70c089b3e57e6999f633f3212b94c635..6022a79b890ddae3b0e5826caf789203ede1076c 100644 --- a/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md +++ b/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md @@ -33,7 +33,7 @@ magnetizations at 150K and 300K: $M_{s150} = M_{150K} / M_{300K}$. #### Magnetization model To model a magnetic material, one can assign a magnetization vector to any material, as is demonstrated -in the [basic polarized reflectometry tutorial]({{% ref-py "instr/polarized/basic-polarized-reflectometry" %}}). +in the [basic polarized reflectometry tutorial](py/instr/polarized/basic-polarized-reflectometry). When a non-vanishing magnetization vector is specified for at least one layer in a sample, BornAgain will automatically utilize the polarized computational engine. This leads to lower performance as the computations are more invovled. @@ -62,7 +62,7 @@ the $M_{s150}$ parameter is fitted. All layers are modeled without absorption, i.e. no imaginary part of the SLD. -Ferthermore, we apply a resolution correction as described in [this tutorial]({{% ref-py "instr/scan/tof-resolution" %}}) +Ferthermore, we apply a resolution correction as described in [this tutorial](py/instr/scan/tof-resolution) with a fixed value for $\Delta Q / Q = 0.018$. The experimental data is normalized to unity, but we still fit the intensity, as is necessary due to the resolution correction. diff --git a/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md b/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md index 0df7eac6a6fcbe4cdcf5678692637d4238886cdc..f1ac50c4bc3408ed3b1b582633bef881077695b5 100644 --- a/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md +++ b/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md @@ -35,7 +35,7 @@ and the following six parameters are utilized: * Thickness of the Pt layer: `t_pt/nm` -* The relative $Q$-resolution: `q_res/q` ([c.f.]({{% ref-py "instr/scan/tof-resolution" %}})) +* The relative $Q$-resolution: `q_res/q` ([c.f.](py/instr/scan/tof-resolution)) * A $Q$-offset: `q_offset` diff --git a/hugo/content/py/fitting/gisas-fit2d/index.md b/hugo/content/py/fitting/gisas-fit2d/index.md index fdfffc1568681ed67c68c881a3a296911d4be383..eccf42c9f66f65723b72569924763248fa844e4f 100644 --- a/hugo/content/py/fitting/gisas-fit2d/index.md +++ b/hugo/content/py/fitting/gisas-fit2d/index.md @@ -10,7 +10,7 @@ This example demonstrates fitting of 2D GISAS data. ## Faked experimental data The sample and instrument model is basically the same as -in our [basic GISAS simulation example]({{% ref-py "ex/gisas" %}}), +in our [basic GISAS simulation example](py/ex/gisas), except that it depends on four external parameters: beam intensity, detector background, radius and height of the cylindrical nanoparticles. @@ -44,7 +44,7 @@ and terminates with the following result: ### Explanation The function `get_sample` is basically the same as -in our [basic GISAS simulation example]({{% ref-py "ex/gisas" %}}), +in our [basic GISAS simulation example](py/ex/gisas), except that radius and height of the cylindrical disks are now supplied as external parameters. These parameters are passed through the function argument `params` diff --git a/hugo/content/py/fitting/instrument-description/index.md b/hugo/content/py/fitting/instrument-description/index.md index 7d08622994631da1856be4cbb3eca0a81900ee40..1aa3effc778956adc272f109c155cefb73b0b91b 100644 --- a/hugo/content/py/fitting/instrument-description/index.md +++ b/hugo/content/py/fitting/instrument-description/index.md @@ -16,7 +16,7 @@ To successfully simulate and fit results of some real experiment it is important As an example we will use our own measurements performed at the laboratory diffractometer [GALAXI](http://www.fz-juelich.de/jcns/jcns-2//DE/Leistungen/GALAXI/_node.html) in Forschungszentrum Jülich. A complete example, containing less explanations but more code, can be found in -[Real life fit example: experiment at GALAXI]({{% ref-py "fitting/extended/experiment-at-galaxi" %}}). +[Real life fit example: experiment at GALAXI](py/fitting/extended/experiment-at-galaxi). Our sample represents a 3-layer system (substrate, teflon and air) with Ag nanoparticles sitting on top of the teflon layer. @@ -69,7 +69,7 @@ detector.setPerpendicularToDirectBeam(detector_distance, u0, v0) {{< /highlight >}} -See also the [Rectangular detector tutorial]({{% ref-py "instr/det/rectangular-detector/index.md" %}}). +See also the [Rectangular detector tutorial](py/instr/det/rectangular-detector/index.md). ### Setting the region of interest @@ -116,4 +116,4 @@ The main requirement is that the shape of the numpy array coincides with the num ### Running the fit To run the fit, the user assembles all components - simulation description and experimental data file - using `FitObjective.addSimulationAndData`. -The complete example can be found in [Real life fit example: experiment at GALAXI]({{% ref-py "fitting/extended/experiment-at-galaxi" %}}). +The complete example can be found in [Real life fit example: experiment at GALAXI](py/fitting/extended/experiment-at-galaxi). diff --git a/hugo/content/py/fitting/minimizers/index.md b/hugo/content/py/fitting/minimizers/index.md index 5a915bc75133e3e5c788c05d05146bd48206286e..a2178ff9c3a3358d4946f25143afd201902dbd18 100644 --- a/hugo/content/py/fitting/minimizers/index.md +++ b/hugo/content/py/fitting/minimizers/index.md @@ -190,4 +190,4 @@ BornAgain fitting can also be done using other minimization packages. A short li + [lmfit](https://lmfit.github.io/lmfit-py/) + [bumps](https://bumps.readthedocs.io/en/latest/) -In [this example]({{% ref-py "fitting/extended/external-minimizer" %}}) we demonstrate how to use the `lmfit` minimizer for a typical fit of GISAS data. +In [this example](py/fitting/extended/external-minimizer) we demonstrate how to use the `lmfit` minimizer for a typical fit of GISAS data. diff --git a/hugo/content/py/instr/beam/angular-divergence/index.md b/hugo/content/py/instr/beam/angular-divergence/index.md index bd2c0cbad9d0d3d0fd524b3b04c68af55fdc5d87..86b39f54bd46b7e170bded8a6b3a7f1484661373 100644 --- a/hugo/content/py/instr/beam/angular-divergence/index.md +++ b/hugo/content/py/instr/beam/angular-divergence/index.md @@ -8,7 +8,7 @@ weight = 60 This example demonstrates beam angular spread effects in reflectivity computations. It also offers a comparison with data generated using another well known code: GenX. Further information about reflectometry simulations can be found in the -[Reflectometry Simulation Tutorial]({{% ref-py "sim/class/specular/_index.md" %}}). +[Reflectometry Simulation Tutorial](py/sim/class/specular/_index.md). The observed reflectometry signal can be affected either by a spread in the beam wavelength or in the incident angle. diff --git a/hugo/content/py/instr/beam/footprint/index.md b/hugo/content/py/instr/beam/footprint/index.md index c0b54c4340662dcb879313c28d1a7f0c3c3ce0f3..a7b997c071150e20737fcf3f3c64d57e32aae46a 100644 --- a/hugo/content/py/instr/beam/footprint/index.md +++ b/hugo/content/py/instr/beam/footprint/index.md @@ -47,7 +47,7 @@ The incident angle range was made rather small in this example (from $0.0$ to $0.6$ degrees) in order to emphasize the footprint impact at small incident angles. In other respects this example exactly matches the -[reflectometry simulation tutorial]({{% ref-py "sim/class/specular/_index.md" %}}). +[reflectometry simulation tutorial](py/sim/class/specular/_index.md). {{< galleryscg >}} {{< figscg src="/img/auto/specular/FootprintCorrection.png" width="450px">}} diff --git a/hugo/content/py/instr/beam/full-divergence/index.md b/hugo/content/py/instr/beam/full-divergence/index.md index b870b6407ef407092d0dc8f7895fa8de6dd6a685..88bc96cec91827210937bdd4761715ae453eee21 100644 --- a/hugo/content/py/instr/beam/full-divergence/index.md +++ b/hugo/content/py/instr/beam/full-divergence/index.md @@ -8,7 +8,7 @@ weight = 65 This example demonstrates beam wavelength spread effects in reflectivity computations. All simulation parameters (except for those related to beam spread itself) coincide with those defined in -[reflectometry simulation tutorial]({{% ref-py "sim/class/specular/_index.md" %}}). +[reflectometry simulation tutorial](py/sim/class/specular/_index.md). In real specular experiments the observed reflectivity is always affected by the beam spread in both wavelength and incident angle. @@ -25,7 +25,7 @@ In this example the following parameters related to the spread of the beam were * Standard deviation in the incident angle $\sigma_{\alpha} = 0.01^{\circ}$ As one can see from the Python script, the definitions of beam parameter distributions -match ones described in [similar example for GISAS simulations]({{% ref-py "instr/beam/divergence" %}}). +match ones described in [similar example for GISAS simulations](py/instr/beam/divergence). However, in the case of the incident angle one should always use a distribution with zero mean, since the actual mean value is substituted by `SpecularSimulation` in dependence on the defined inclination angle range. diff --git a/hugo/content/py/instr/det/_index.md b/hugo/content/py/instr/det/_index.md index e9571840d918ec80548f842593294640300f8c0e..4f756806c494f7117b6ca953849e2d39bded4636 100644 --- a/hugo/content/py/instr/det/_index.md +++ b/hugo/content/py/instr/det/_index.md @@ -17,8 +17,8 @@ The `RectangularDetector` object represents a more realistic, rectangular 2D det Both detector types are explained in detail in the following sections of the tutorial. -* [Spherical detector]({{% ref-py "instr/det/spherical-detector/index.md" %}}) -* [Rectangular detector]({{% ref-py "instr/det/rectangular-detector/index.md" %}}) +* [Spherical detector](py/instr/det/spherical-detector/index.md) +* [Rectangular detector](py/instr/det/rectangular-detector/index.md) ### Masks @@ -26,10 +26,10 @@ When fitting theoretical models to measured diffraction images, it can be helpful to mask part of the detector area. See -* [Fit with masks]({{% ref-py "fitting/advanced/fit-with-masks" %}}) +* [Fit with masks](py/fitting/advanced/fit-with-masks) ### Resolution For modeling the detector resolution, see -* [Detector resolution example]({{% ref-py "instr/det/resolution" %}}) +* [Detector resolution example](py/instr/det/resolution) diff --git a/hugo/content/py/instr/det/resolution/index.md b/hugo/content/py/instr/det/resolution/index.md index 3ef13f4c598bfcb52a67fdfb94d0d18196e18208..7c66b3794345bb7821d9e201eac28ce2d8d8181f 100644 --- a/hugo/content/py/instr/det/resolution/index.md +++ b/hugo/content/py/instr/det/resolution/index.md @@ -13,7 +13,7 @@ Here we show how to set a finite blur. * The incident angles are $\sigma_{\alpha\_i} = \sigma\_{\varphi\_i} = 0.1^{\circ}$. Besides this, the example is a DWBA simulation for our standard sample model, - [Cylinders in DWBA]({{% ref-py "ex/gisas" %}}) + [Cylinders in DWBA](py/ex/gisas) * The sample is composed of monodisperse cylinders deposited on a substrate. * The cylinders are dilute, and positioned at random, diff --git a/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md b/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md index a1fbf4956698c8d24b504a7a8b9ae01038af059c..223a1121eaa7691c9810f3e161ec04895e385230 100644 --- a/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md +++ b/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md @@ -10,7 +10,7 @@ We show this for a sample that contains only a single magnetic layer on top of a The magnetization and polarization are chosen to be (anti-)parallel, and hence, no spin-flip is observed. By rotation of either the magnetization or the polarization vector, one can generalize this example -to observe also the [spin-flip channels]({{% ref-py "instr/polarized/polarized-spin-flip" %}}). +to observe also the [spin-flip channels](py/instr/polarized/polarized-spin-flip). The construction of the sample is almost identical to the unpolarized cases, where the only difference is that the magnetization of a material can be specified: {{< highlight python>}} diff --git a/hugo/content/py/instr/polarized/no-analyzer/index.md b/hugo/content/py/instr/polarized/no-analyzer/index.md index cbcead12406c9972fa502a4b7959181f0dc56a64..7a9b384671d12ba16c7c2241d87ae70279a9d04e 100644 --- a/hugo/content/py/instr/polarized/no-analyzer/index.md +++ b/hugo/content/py/instr/polarized/no-analyzer/index.md @@ -5,7 +5,7 @@ weight = 30 ### Polarized reflectometry without analyzer -Starting from the [spin-flip tutorial]({{% ref-py "instr/polarized/polarized-spin-flip" %}}), we +Starting from the [spin-flip tutorial](py/instr/polarized/polarized-spin-flip), we want to remove the analyzer and perform a reflectivity simulation with incident polarized neutrons and no polarization analysis of the reflected beam. All other parameters of the simulation remain unchanged. diff --git a/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md b/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md index 1f4bef265db4d595ea700dff3af819f95c58ca49..63362dd36758e75c9671a4fc4123e7589ba01c1f 100644 --- a/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md +++ b/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md @@ -15,7 +15,7 @@ On top of the iron layer is a thin Pd cap layer. We don't explain the whole script in detail here, it combines all concepts that were introduced before in the polarized reflectometry section. Instrument resolution is simulated as explained in the -[ToF - Resolution effects example]({{% ref-py "instr/scan/tof-resolution" %}}). +[ToF - Resolution effects example](py/instr/scan/tof-resolution). Furthermore, a constant background is added: {{< highlight python>}} @@ -23,7 +23,7 @@ simulation.setBackground( ba.ConstantBackground( 1e-7 ) ) {{< /highlight >}} For a more detailed explanation we refer to the example on -[adding a constant background]({{% ref-py "sim/setup/bg" %}}). +[adding a constant background](py/sim/setup/bg). The values for the efficiency of the polarizer and analyzer are taken from the above mentioned paper by [Devishvili et al.](https://doi.org/10.1063/1.4790717): diff --git a/hugo/content/py/instr/polarized/polarized-spin-flip/index.md b/hugo/content/py/instr/polarized/polarized-spin-flip/index.md index e3136d56cef359d2f33f66a5540e3765644a7d75..ff9c40b17d8252f6843476fbd766283ca2eaac2f 100644 --- a/hugo/content/py/instr/polarized/polarized-spin-flip/index.md +++ b/hugo/content/py/instr/polarized/polarized-spin-flip/index.md @@ -5,7 +5,7 @@ weight = 20 ### Spin-flip reflectivity -In this section, we want to extend the [basic polarized reflectometry tutorial]({{% ref-py "instr/polarized/basic-polarized-reflectometry" %}}) to simulate spin-flip reflectivity. +In this section, we want to extend the [basic polarized reflectometry tutorial](py/instr/polarized/basic-polarized-reflectometry) to simulate spin-flip reflectivity. For this purpose, we want to parametrize the magnetization by the angle $\alpha$ between the magnetization and the spin of the incoming neutrons and its magnitude $\left| \mathbf{M} \right|$: $$\mathbf M = \left| \mathbf{M} \right| \left( \sin \alpha, \cos \alpha, 0\right)^\mathrm{T}$$ In practice, the construction of the magnetization vector in Python then proceeds as follows: @@ -35,7 +35,7 @@ Running the full script, that is given below, we obtain the following simulation {{< /galleryscg >}} This plot shows the resulting reflectivity in all four channels. -The non-spin-flip channels (up-up and down-down) are similar to the result [without spin flip]({{% ref-py "instr/polarized/basic-polarized-reflectometry" %}}). +The non-spin-flip channels (up-up and down-down) are similar to the result [without spin flip](py/instr/polarized/basic-polarized-reflectometry). As expected, both spin-flip channels are identical. Here is the complete example: diff --git a/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md b/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md index 3c96bda088bedd1bc00ff8d337319c54cb2bd368..541d16eb89337de2d1cfaf6919fc872833bed0a3 100644 --- a/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md +++ b/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md @@ -15,7 +15,7 @@ During these tutorials, we neglect the magnetically dead layer that forms below In this first example, we utilize parameters that are deduced from a fit to the data provided on the NIST homepage. How to perform the fit is described in the -[extended example]({{% ref-py "fitting/extended/polarized-spinasymmetry-fit" %}}). +[extended example](py/fitting/extended/polarized-spinasymmetry-fit). @@ -41,7 +41,7 @@ This is performed in the function `plotSpinAsymmetry`. #### Further corrections We also apply a resolution correction, as described in the - [ToF - Resolution effects]({{% ref-py "instr/scan/tof-resolution" %}}) example. + [ToF - Resolution effects](py/instr/scan/tof-resolution) example. Furthermore, we introduce an offest in the $Q$-axis, in order to accomodate for experimental uncertainties in the measurement of $\theta$. diff --git a/hugo/content/py/instr/scan/_index.md b/hugo/content/py/instr/scan/_index.md index b12370b4413042d1b013f5c94b37ccb47ad73188..f2b8a7e2843a219537526eb582d532e8933cf639 100644 --- a/hugo/content/py/instr/scan/_index.md +++ b/hugo/content/py/instr/scan/_index.md @@ -6,9 +6,9 @@ weight = 20 ## Scan models Scans are needed to construct simulations of types -[reflectometry]({{% ref-py "sim/class/specular" %}}), -[off-specular scattering]({{% ref-py "sim/class/offspec" %}}), -[depth probe]({{% ref-py "sim/class/depthprobe" %}}). +[reflectometry](py/sim/class/specular), +[off-specular scattering](py/sim/class/offspec), +[depth probe](py/sim/class/depthprobe). There are two types of scan: - Alpha scans, for instruments that are mechanically scanning diff --git a/hugo/content/py/instr/scan/tof-resolution.md b/hugo/content/py/instr/scan/tof-resolution.md index 803876de0e6d4a7cc6eec10fca0456ce17ed7cb2..1ce1e6c40d84c4ef4f8f55c737e43562047234e3 100644 --- a/hugo/content/py/instr/scan/tof-resolution.md +++ b/hugo/content/py/instr/scan/tof-resolution.md @@ -13,7 +13,7 @@ ba.DistributionGaussian(0., 1., 25, 2.) ``` specifies a Gaussian distribution with mean 0, standard deviation 1, 25 sampling points, and a cut-off at 2 sigma. For other distributions (besides Gaussian), -see [distributions]({{% ref-py "other/distributions" %}}). +see [distributions](py/other/distributions). The statements ```python diff --git a/hugo/content/py/result/export/_index.md b/hugo/content/py/result/export/_index.md index 1f83f5eb3570314dcf598baeec5af042778989d7..0fc24998dcc9b7ae633669f77a12722b4c017c01 100644 --- a/hugo/content/py/result/export/_index.md +++ b/hugo/content/py/result/export/_index.md @@ -81,8 +81,8 @@ hist.save("result.int.gz") Additional information can be found in the following pages: -* [Accessing simulation results example]({{% ref-py "result/export/more.md" %}}) -* [Plotting with axes in different units]({{% ref-py "result/export/axes-in-different-units" %}}) +* [Accessing simulation results example](py/result/export/more.md) +* [Plotting with axes in different units](py/result/export/axes-in-different-units) * [SimulationResult C++ class reference](http://apps.jcns.fz-juelich.de/doxy/BornAgain/classSimulationResult.html) * [Histogram1D C++ class reference](http://apps.jcns.fz-juelich.de/doxy/BornAgain/classHistogram1D.html) * [Histogram2D C++ class reference](http://apps.jcns.fz-juelich.de/doxy/BornAgain/classHistogram2D.html) diff --git a/hugo/content/py/result/export/axes-in-different-units/index.md b/hugo/content/py/result/export/axes-in-different-units/index.md index 42eb72388c03eea0a14a8605bea7e32f773c9e27..38a37e1c117927508b5f540a8dc18482c629e19d 100644 --- a/hugo/content/py/result/export/axes-in-different-units/index.md +++ b/hugo/content/py/result/export/axes-in-different-units/index.md @@ -6,9 +6,9 @@ weight = 20 ### Plotting with axes in different units In this example we demonstrate how to plot intensity data with detector axes expressed in different units. It serves as a supporting example to the -[Accessing simulation results]({{% ref-py "export/_index.md" %}}) tutorial. +[Accessing simulation results](py/export/_index.md) tutorial. -* The standard [Cylinders in DWBA]({{%ref-py "ex/gisas" %}})) +* The standard [Cylinders in DWBA](ex/gisas) sample is used to setup the simulation. * When the simulation is completed, the `Simulation::result()` method is used to get a `SimulationResult` object. * Depending on an additional parameter `IDetector2D.NBINS`, `IDetector2D.DEGREES`, `IDetector2D.QYQZ`, it will be plotted with axes defined either in millimeters (default units of `RectangularDetector`), detector bins, degrees or in $Q$-space. diff --git a/hugo/content/py/result/export/more.md b/hugo/content/py/result/export/more.md index 5d6d379a873c598c47898b8d1895dddd0b413102..46f26c430d946edb78be3b8b7bccdd2e49fa2bf9 100644 --- a/hugo/content/py/result/export/more.md +++ b/hugo/content/py/result/export/more.md @@ -6,9 +6,9 @@ weight = 10 ### Accessing simulation results This is an extended example for the further treatment of simulation results: accessing the results, plotting, cropping, slicing and exporting. This serves as a supporting example to the [Accessing simulation results -]({{% ref-py "export/_index.md" %}}) tutorial. +](py/export/_index.md) tutorial. -* The standard [Cylinders in DWBA]({{%ref-py "ex/gisas" %}}) sample +* The standard [Cylinders in DWBA](ex/gisas) sample is used for running the simulation. * The simulation results are retrieved as a `Histogram2D` object and then processed in various functions to achieve a resulting image. diff --git a/hugo/content/py/sample/interference/grating/lattice1d/index.md b/hugo/content/py/sample/interference/grating/lattice1d/index.md index 71f2b1f960198c42f6e516fd57d79216421a0944..2be50342664bdda031055148a0bf870e2266fec9 100644 --- a/hugo/content/py/sample/interference/grating/lattice1d/index.md +++ b/hugo/content/py/sample/interference/grating/lattice1d/index.md @@ -12,7 +12,7 @@ In this example we simulate the scattering from infinite 1D repetition of rectan * The size of boxes is initially chosen to form a grating which is perpendicular to the beam (long side of the box is along $y$-axis). * Please keep in mind, that `length`, `width`, `height` in the `Box(length, width, height)` constructor correspond to the directions in the $x,y,z$ axes, in that order, so to achieve the desired setup we use the values: `length`= $10$ nm, `width`= $10000$ nm, `height`= $10$ nm. * The whole grating is rotated at the end by an angle of $45^{\circ}$ with respect to the beam axis. This is achieved by rotating _both_ the 1D lattice and the long boxes (see lines 25 and 34). -* To avoid the problem of rapidly oscillating form factors of long boxes (see [this example]({{% ref-py "sim/setup/options/mc" %}}) for more details), the simulation is performed in monte carlo integration mode. +* To avoid the problem of rapidly oscillating form factors of long boxes (see [this example](py/sim/setup/options/mc) for more details), the simulation is performed in monte carlo integration mode. {{< galleryscg >}} {{< figscg src="Interference1DLattice_setup.jpg" width="200px" caption="Real-space model">}} diff --git a/hugo/content/py/sample/interference/grating/rectangular-grating/index.md b/hugo/content/py/sample/interference/grating/rectangular-grating/index.md index b5d21fe5a2e1d8e9eed61dce10b5ec2847057055..83e9d91297f9061c2c49d2f387651197a9f1b83e 100644 --- a/hugo/content/py/sample/interference/grating/rectangular-grating/index.md +++ b/hugo/content/py/sample/interference/grating/rectangular-grating/index.md @@ -5,7 +5,7 @@ weight = 85 ### Interference - Rectangular Grating -This example demonstrates how to perform a simulation of a grating using very long boxes and a 1D lattice. [Interference of a 1D lattice]({{% ref-py "sample/interference/grating/lattice1d" %}}) may provide useful background information. +This example demonstrates how to perform a simulation of a grating using very long boxes and a 1D lattice. [Interference of a 1D lattice](py/sample/interference/grating/lattice1d) may provide useful background information. {{< galleryscg >}} {{< figscg src="/img/auto/scatter2d/RectangularGrating.png" width="4500px" caption="Intensity image">}} diff --git a/hugo/content/py/sample/interference/grating/triangular-ripples/index.md b/hugo/content/py/sample/interference/grating/triangular-ripples/index.md index 3dfc7f39b32c4cd1f5560f8ea6e5429c6e075379..e016c06fe6384abf56312a6c86ce507bfcc8eacf 100644 --- a/hugo/content/py/sample/interference/grating/triangular-ripples/index.md +++ b/hugo/content/py/sample/interference/grating/triangular-ripples/index.md @@ -14,7 +14,7 @@ Scattering from elongated particles positioned in a two-dimensional rectangular * The wavelength is equal to 0.16 nm. * The incident angles are $\alpha\_i = 0.3 ^{\circ}$ and $\varphi\_i = 0^{\circ}$. -View the example on [Cosine Ripples on a Rectangular Lattice]({{% ref-py "sample/interference/grating/cosine-ripples-at-rect-lattice" %}}) for comparison. +View the example on [Cosine Ripples on a Rectangular Lattice](py/sample/interference/grating/cosine-ripples-at-rect-lattice) for comparison. {{< galleryscg >}} {{< figscg src="/img/auto/scatter2d/TriangularRipple.png" width="4500px" caption="Intensity image">}} diff --git a/hugo/content/py/sample/interference/lattice2d/_index.md b/hugo/content/py/sample/interference/lattice2d/_index.md index ec90a41c4d6b7a7addfce9f9a14bf04bf5605ed6..cb356707e32ebf78fcc83d90dbc6887fb99a4df6 100644 --- a/hugo/content/py/sample/interference/lattice2d/_index.md +++ b/hugo/content/py/sample/interference/lattice2d/_index.md @@ -55,7 +55,7 @@ Here two lattices are created, one square and one hexagonal, rotated with respec To account for finite size effects of the lattice, a decay function should be assigned to the interference function. This function encodes the loss of coherent scattering from lattice points with increasing distance between them. The origin of this loss of coherence could be attributed to the coherence lengths of the beam or to the domain structure of the lattice. The two-dimensional decay function allows for an anisotropy of this effect. Decay functions for the one-dimensional case are explained -in the [grating]({{% ref-py "sample/interference/grating" %}}) section. +in the [grating](py/sample/interference/grating) section. Decay functions for two-dimensional lattices work similarly, but require two `decay_length` parameters and an orientation to be defined. @@ -125,12 +125,12 @@ particle_layout.setInterference(interference) {{< /highlight >}} -The complete example can be found [here]({{% ref-py "sample/interference/lattice2d/interference-2d-rotated-square-lattice" %}}). +The complete example can be found [here](py/sample/interference/lattice2d/interference-2d-rotated-square-lattice). ### Model extensions -* [Position variance]({{% ref-py "sample/interference/lattice2d/position-variance" %}}): +* [Position variance](py/sample/interference/lattice2d/position-variance): fluctuations of particle position of around lattice points, resulting in a prefactor of Debye-Waller type. -* [Unit cell with basis]({{% ref-py "sample/interference/lattice2d/with-basis" %}}), +* [Unit cell with basis](py/sample/interference/lattice2d/with-basis), if there is more than one particle in the conventional unit cell. diff --git a/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md b/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md index 861fd92525b987676ba81bd5439ee1a2e23ca8af..3eb12f6a2dff7b3a299d8d55671f6041c16fcc32 100644 --- a/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md +++ b/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md @@ -8,7 +8,7 @@ weight = 30 This example demonstrates how to perform a simulation of scattering from cylinders positioned in one out of a distribution of rotated square lattices. -This example is similar to [Interference of a rotated square lattice]({{% ref-py "sample/interference/lattice2d/interference-2d-rotated-square-lattice" %}}). +This example is similar to [Interference of a rotated square lattice](py/sample/interference/lattice2d/interference-2d-rotated-square-lattice). TEMPORARILY DISABLED after BornAgain 1.19.0 for ongoing refactoring of parameter distributions. diff --git a/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md b/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md index 13d50e8610e9c7a5e3729700f0a773b49b68a6b0..732694708ebb14795e34430784b30d13f9da6ca6 100644 --- a/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md +++ b/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md @@ -8,7 +8,7 @@ weight = 30 This example demonstrates how to perform a simulation of scattering from cylinders positioned in a finite square lattice (as opposed to the standard infinite lattice model). -This example is similar to [Interference of a rotated square lattice]({{% ref-py "sample/interference/lattice2d/interference-2d-rotated-square-lattice" %}}). +This example is similar to [Interference of a rotated square lattice](py/sample/interference/lattice2d/interference-2d-rotated-square-lattice). {{< galleryscg >}} {{< figscg src="/img/auto/scatter2d/Interference2DSquareFiniteLattice.png" width="4500px" caption="Intensity image">}} diff --git a/hugo/content/py/sample/interference/other/approximation-ssca/index.md b/hugo/content/py/sample/interference/other/approximation-ssca/index.md index 62c4d2a57e87614f5e981af54b4f7219c98e6c05..8cb8e2227992f07d998f5d2f20b1481e5e2d25f1 100644 --- a/hugo/content/py/sample/interference/other/approximation-ssca/index.md +++ b/hugo/content/py/sample/interference/other/approximation-ssca/index.md @@ -14,7 +14,7 @@ Scattering from cylinders of two different sizes using the Size-Spacing Coupling * The interference function is Radial Paracrystal with a peak distance of $18$ nm and a damping length of $1$ $\mu$m. * The wavelength is equal to 0.1 nm. * The incident angles are $\alpha\_i = 0.2 ^{\circ}$ and $\varphi\_i = 0^{\circ}$. -* The Size-Spacing Coupling Approximation is implemented using the function setApproximation. By default the Decoupling Approximation is used (see [Size-distribution model: Decoupling Approximation]({{% ref-py "sample/interference/other/approximation-da" %}})). +* The Size-Spacing Coupling Approximation is implemented using the function setApproximation. By default the Decoupling Approximation is used (see [Size-distribution model: Decoupling Approximation](py/sample/interference/other/approximation-da)). * For this size-distribution model, an additional dimensionless parameter, the coupling parameter `Kappa`, has to be specified (see line 33). It defines how the distance between particles is linked with their sizes. {{< galleryscg >}} diff --git a/hugo/content/py/sample/particle/_index.md b/hugo/content/py/sample/particle/_index.md index 37bd509859996b236dc0dc4d1d78d34ac80c855c..f3ff419dabff03083a9245d729282e03dc15694f 100644 --- a/hugo/content/py/sample/particle/_index.md +++ b/hugo/content/py/sample/particle/_index.md @@ -10,4 +10,4 @@ The following pages describe how to specify embedded particles: {{% children %}} For structures formed by particle assemblies, -see the section on [interference functions]({{% ref-py "sample/interference" %}}). +see the section on [interference functions](py/sample/interference). diff --git a/hugo/content/py/sample/particle/positioning/interface-crossing/index.md b/hugo/content/py/sample/particle/positioning/interface-crossing/index.md index a4a60ec7eed7faa2a6625e48f83823f28c737ae0..23ee480aa89934d31b2592f5d816aaf390746f26 100644 --- a/hugo/content/py/sample/particle/positioning/interface-crossing/index.md +++ b/hugo/content/py/sample/particle/positioning/interface-crossing/index.md @@ -5,7 +5,7 @@ weight = 10 ### Particles crossing an interface -In this example, very similar to the one on [Cylinders and Prisms]({{% ref-py "sample/interference/incoherent-ex" %}}), it is shown how to position particles in order to cross multilayer interfaces: the $z$ position of particles originally located within the air layer must be adjusted slightly downwards in order to cross the air-substrate interface. +In this example, very similar to the one on [Cylinders and Prisms](py/sample/interference/incoherent-ex), it is shown how to position particles in order to cross multilayer interfaces: the $z$ position of particles originally located within the air layer must be adjusted slightly downwards in order to cross the air-substrate interface. The simulation kernel automatically detects particles crossing interfaces and adjusts the calculations accordingly, causing a drop on speed to complete each simulation. diff --git a/hugo/content/py/sample/roughness/profiles/index.md b/hugo/content/py/sample/roughness/profiles/index.md index bffa605328e5d47f83eeb18a287f18aa71e0ceb5..a7bd6d1022256558d74a5d440b1a157b2c32812d 100644 --- a/hugo/content/py/sample/roughness/profiles/index.md +++ b/hugo/content/py/sample/roughness/profiles/index.md @@ -8,8 +8,8 @@ weight = 15 This example demonstrates how to apply different roughness models in a specular reflectivity calculation. The considered sample is exactly the same as the one described in the -[reflectometry tutorial]({{% ref-py "sim/class/specular/_index.md" %}}), -and the [basic roughness tutorial]({{% ref-py "sample/roughness/specular" %}}). +[reflectometry tutorial](py/sim/class/specular/_index.md), +and the [basic roughness tutorial](py/sample/roughness/specular). Hewever, now the computation is performed twice with the standard $tanh$ interface profile and the Névot-Croce roughness model that arises from a Gaussian distribution of the deviation from the mean-surface position. diff --git a/hugo/content/py/sample/roughness/specular/index.md b/hugo/content/py/sample/roughness/specular/index.md index 89b2690926b4211464f75d4ad253730a2485cd6c..3637d09a122498ec0e6d0982c9bf131d60adbd4f 100644 --- a/hugo/content/py/sample/roughness/specular/index.md +++ b/hugo/content/py/sample/roughness/specular/index.md @@ -8,7 +8,7 @@ weight = 10 This example demonstrates how to compute reflected signal from a multilayered sample with surface roughness. All the experiment layout is exactly the same as the one described in -[reflectometry tutorial]({{% ref-py "sim/class/specular/_index.md" %}}), +[reflectometry tutorial](py/sim/class/specular/_index.md), but now all the layers (except the ambient media) have roughness on the top surface. The roughness is characterized by root-mean-square deviation from the mean surface position $\sigma = 1$ nm. @@ -19,13 +19,13 @@ $\sigma = 1$ nm. {{< /galleryscg >}} When comparing the result of the simulation to the result obtained in the -[reflectometry tutorial]({{% ref-py "sim/class/specular/_index.md" %}}), +[reflectometry tutorial](py/sim/class/specular/_index.md), one can notice up to two orders of magnitude attenuation of the reflected signal due to the roughness of the sample. {{< notice note >}} Please note that other roughness characteristics (like Hurst parameter or lateral and cross correlation lengths) -previously described in [example on correlated roughness]({{% ref-py "sample/roughness" %}}) +previously described in [example on correlated roughness](py/sample/roughness) do not affect the result of the simulation. The computation model takes into account only the rms-deviation from the mean surface position. {{< /notice >}} diff --git a/hugo/content/py/sim/_index.md b/hugo/content/py/sim/_index.md index 7a7fca36d8876af45e7a810836aedf3f4e1e5a55..1fbcc7e8900784a80a2c359228166785b726f79d 100644 --- a/hugo/content/py/sim/_index.md +++ b/hugo/content/py/sim/_index.md @@ -30,4 +30,4 @@ Setters: Getter: * [simulate](simulate) - runs simulation and returns - [SimulationResult]({{% ref-py "result/simulation-result" %}}) + [SimulationResult](py/result/simulation-result) diff --git a/hugo/content/py/sim/class/depthprobe/index.md b/hugo/content/py/sim/class/depthprobe/index.md index 98e34f67d665d15d02bd98fd340e576069450566..5d9516e8f93aa2da87212d7abf09176fcbe0b3d6 100644 --- a/hugo/content/py/sim/class/depthprobe/index.md +++ b/hugo/content/py/sim/class/depthprobe/index.md @@ -20,13 +20,13 @@ simulation = ba.DepthprobeSimulation(scan, sample, z_axis) result = simulation.simulate() ``` -For the constructor arguments, see sections [scan]({{% ref-py "instr/scan" %}}), -[sample]({{% ref-py "sample" %}}). +For the constructor arguments, see sections [scan](py/instr/scan), +[sample](py/sample). -For optional settings, see [simulation options]({{% ref-py "sim/setup/options" %}}). +For optional settings, see [simulation options](py/sim/setup/options). For the return type of function `simulate()`, -see [SimulationResult]({{% ref-py "result/simulation-result" %}}). +see [SimulationResult](py/result/simulation-result). ### Example diff --git a/hugo/content/py/sim/class/offspec/index.md b/hugo/content/py/sim/class/offspec/index.md index c202410bdd19818f7b47bcd596a102308f8aff83..44b0089d7e6a647f725cf784e6f00486244fca04 100644 --- a/hugo/content/py/sim/class/offspec/index.md +++ b/hugo/content/py/sim/class/offspec/index.md @@ -16,13 +16,13 @@ simulation = ba.OffspecSimulation(scan, sample, detector) result = simulation.simulate() ``` -For the constructor arguments, see sections [scan]({{% ref-py "instr/scan" %}}), -[sample]({{% ref-py "sample" %}}), and [OffspecDetector]({{% ref-py "instr/det/offspec" %}}). +For the constructor arguments, see sections [scan](py/instr/scan), +[sample](py/sample), and [OffspecDetector](py/instr/det/offspec). -For optional settings, see [simulation options]({{% ref-py "sim/setup/options" %}}). +For optional settings, see [simulation options](py/sim/setup/options). For the return type of function `simulate()`, -see [SimulationResult]({{% ref-py "result/simulation-result" %}}). +see [SimulationResult](py/result/simulation-result). #### Example diff --git a/hugo/content/py/sim/class/scattering/index.md b/hugo/content/py/sim/class/scattering/index.md index dcb92cd71683b4ff35139588f16875d71f57f602..d0646491065b6a6b781e55d46f94c99c1fb9c5fa 100644 --- a/hugo/content/py/sim/class/scattering/index.md +++ b/hugo/content/py/sim/class/scattering/index.md @@ -16,13 +16,13 @@ simulation = ba.ScatteringSimulation(beam, sample, detector) result = simulation.simulate() ``` -For the constructor arguments, see sections [beam]({{% ref-py "instr/beam" %}}) -[sample]({{% ref-py "sample" %}}), and [detector](/py/instr/det). +For the constructor arguments, see sections [beam](py/instr/beam) +[sample](py/sample), and [detector](/py/instr/det). -For optional settings, see [simulation options]({{% ref-py "sim/setup/options" %}}). +For optional settings, see [simulation options](py/sim/setup/options). For the return type of function `simulate()`, -see [SimulationResult]({{% ref-py "result/simulation-result" %}}). +see [SimulationResult](py/result/simulation-result). ### SAS vs GISAS diff --git a/hugo/content/py/sim/class/specular/index.md b/hugo/content/py/sim/class/specular/index.md index 5d9b305aeaade25c9abed0ba37de78b84f25514a..18015eac55e77b804d78944bf3cb6235341829d7 100644 --- a/hugo/content/py/sim/class/specular/index.md +++ b/hugo/content/py/sim/class/specular/index.md @@ -15,13 +15,13 @@ simulation = ba.SpecularSimulation(scan, sample) result = simulation.simulate() ``` -For the constructor arguments, see sections [scan]({{% ref-py "instr/scan" %}}) -and [sample]({{% ref-py "sample" %}}). +For the constructor arguments, see sections [scan](py/instr/scan) +and [sample](py/sample). -For optional settings, see [simulation options]({{% ref-py "sim/setup/options" %}}). +For optional settings, see [simulation options](py/sim/setup/options). For the return type of function `simulate()`, -see [SimulationResult]({{% ref-py "result/simulation-result" %}}). +see [SimulationResult](py/result/simulation-result). ### Example @@ -30,8 +30,8 @@ As introductory example, we simulate specular reflectometry by a sample that consists of 10 Ti/Ni double layers on a Si substrate. The same script has been used in preceding pages -to explain [usage]({{% ref-py "start/run.md" %}}) -and [syntax]({{% ref-py "start/syntax.md" %}}) +to explain [usage](py/start/run.md) +and [syntax](py/start/syntax.md) of BornAgain Python code. {{< figscg src="/img/auto/specular/AlternatingLayers1.png" width="500" class="center">}} @@ -49,7 +49,7 @@ so that the above script can be shortened as ### Further reading -* [specular signal from a rough sample]({{% ref-py "sample/roughness/specular/index.md" %}}) -* [beam footprint correction]({{% ref-py "instr/beam/footprint/index.md" %}}) -* [beam divergence in specular simulations]({{% ref-py "instr/beam/full-divergence/index.md" %}}) -* [fitting reflectometry data]({{% ref-py "fitting/extended/fit-specular-data/index.md" %}}) +* [specular signal from a rough sample](py/sample/roughness/specular/index.md) +* [beam footprint correction](py/instr/beam/footprint/index.md) +* [beam divergence in specular simulations](py/instr/beam/full-divergence/index.md) +* [fitting reflectometry data](py/fitting/extended/fit-specular-data/index.md) diff --git a/hugo/content/py/start/_index.md b/hugo/content/py/start/_index.md index 67068ebb3870d6204e9c702e0568c0a4d90f5271..d84586530eeef8360bf1874c696f6460232968f9 100644 --- a/hugo/content/py/start/_index.md +++ b/hugo/content/py/start/_index.md @@ -8,10 +8,10 @@ weight = 1 We assume that BornAgain and Python are installed as explained in the [installation instructions]({{% relref "installation" %}}). -Verify that the Python interpreter can [find BornAgain]({{% ref-py "start/find.md" %}}). +Verify that the Python interpreter can [find BornAgain](py/start/find.md). The next step is to -[run a first example script]({{% ref-py "start/run.md" %}}). +[run a first example script](py/start/run.md). Then [read on]({{% relref "py" %}}) to understand some example scripts line by line, diff --git a/hugo/content/py/start/find.md b/hugo/content/py/start/find.md index b49245f384e6ec65f560342543950f9513defa0c..9d04d9e4e0f530a74d8929dfb5be3ec48ec35bc8 100644 --- a/hugo/content/py/start/find.md +++ b/hugo/content/py/start/find.md @@ -48,5 +48,5 @@ of BornAgain. ### Proceed -From here, proceed to [running]({{% ref-py "start/run" %}}) +From here, proceed to [running](py/start/run) an example script. diff --git a/hugo/content/py/start/run.md b/hugo/content/py/start/run.md index 0ac5104871ac73f0f839ceb6f23305b6a001c5c6..2256851fdb87b09f83ceb50e94c9efda4956eb21 100644 --- a/hugo/content/py/start/run.md +++ b/hugo/content/py/start/run.md @@ -10,7 +10,7 @@ To get started with BornAgain scripting, run a first example. We assume that BornAgain and Python are [installed]({{% relref "installation" %}}) and that you verified that the Python interpreter can -[find]({{% ref-py "start/find.md" %}}) the module `bornagain`. +[find](py/start/find.md) the module `bornagain`. We shall now run a first example script. This and all other example scripts can also be found in the BornAgain distribution, @@ -25,7 +25,7 @@ Save the script under the name `AlternatingLayers1.py`. <p> For a discussion of the content of this script, -see [simulation/reflectometry]({{% ref-py "sim/class/specular/_index.md" %}}). +see [simulation/reflectometry](py/sim/class/specular/_index.md). ### From the command line diff --git a/hugo/content/py/start/syntax.md b/hugo/content/py/start/syntax.md index 97c55e01aba04bb81c24591e3db5ddd17e030cb2..494af73c99ac9272cf776639e31d56e8be57ba27 100644 --- a/hugo/content/py/start/syntax.md +++ b/hugo/content/py/start/syntax.md @@ -6,7 +6,7 @@ weight = 30 ## Python syntax used in BornAgain scripts We shall employ the same reflectometry script -as on the [preceding page]({{% ref-py "start/run.md" %}}) +as on the [preceding page](py/start/run.md) to explain some Python syntax used in BornAgain scripts. For easy reference, here again the full script: @@ -21,7 +21,7 @@ The [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line #!/usr/bin/env python3 {{< /highlight >}} makes the script executable under Unix-like operating systems, -see the chapter on [how to run]({{% ref-py "start/run.md" %}}) scripts +see the chapter on [how to run](py/start/run.md) scripts from the command line. Lines between triple quotes @@ -38,7 +38,7 @@ def get_sample(): ... {{< /highlight >}} constructs and returns a sample model. -For more information, see the [sample]({{% ref-py "sample" %}}) section. +For more information, see the [sample](py/sample) section. The function {{< highlight python >}} @@ -46,8 +46,8 @@ def get_simulation(sample, scan_size=500): ... {{< /highlight >}} constructs and returns a simulation model. -For more information, see the [simulation]({{% ref-py "sim" %}}) section, -and specifically the [reflectometry]({{% ref-py "sim/class/specular" %}}) reference. +For more information, see the [simulation](py/sim) section, +and specifically the [reflectometry](py/sim/class/specular) reference. The clause @@ -74,7 +74,7 @@ The lines {{< /highlight >}} construct a sample and instrument model and run a simulation. The function `simulate()` returns a -[SimulationResult]({{% ref-py "result/simulation-result" %}} instance. +[SimulationResult](result/simulation-result) instance. The line {{< highlight python >}} diff --git a/hugo/layouts/shortcodes/ref-py.html b/hugo/layouts/shortcodes/ref-py.html deleted file mode 100644 index 0de4b0f60f5e42e8544d803b64bc5935418ca870..0000000000000000000000000000000000000000 --- a/hugo/layouts/shortcodes/ref-py.html +++ /dev/null @@ -1,19 +0,0 @@ -<!-- -Provide reference link to Python example located in content/py ---> - -{{- $shortref := .Get 0 -}} -{{- $ref := (print "py/" $shortref) -}} - -{{- if in $ref "/_index.md" -}} - {{- $path := (trim $ref "_index.md") -}} - {{- with .Site.GetPage "section" (trim $path "/") -}} - {{- .Permalink -}} - {{- end -}} -{{- else -}} - {{- with .Site.GetPage "section" $ref }} - {{- .Permalink -}} - {{- else -}} - {{- $ref | relref .Page -}} - {{- end -}} -{{- end -}}