Skip to content

Commit

Permalink
split tutorials folder into two
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhroom committed Jan 29, 2025
1 parent 033d090 commit a350862
Show file tree
Hide file tree
Showing 49 changed files with 5,150 additions and 159 deletions.
8 changes: 4 additions & 4 deletions setup_tutorials.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

git clone --depth 1 --branch 0.0.0.dev4 https://github.com/RascalSoftware/python-RAT
cp -r python-RAT/RATapi/examples/normal_reflectivity/* source/examples/python/
cp -r python-RAT/RATapi/examples/domains/* source/examples/python/
cp -r python-RAT/RATapi/examples/absorption/* source/examples/python/
cp -r python-RAT/RATapi/examples/data source/examples/
cp -r python-RAT/RATapi/examples/normal_reflectivity/* source/python_examples/notebooks/
cp -r python-RAT/RATapi/examples/domains/* source/python_examples/notebooks/
cp -r python-RAT/RATapi/examples/absorption/* source/python_examples/notebooks/
cp -r python-RAT/RATapi/examples/data source/python_examples/

rm -rf python-RAT
72 changes: 0 additions & 72 deletions source/examples/index.rst

This file was deleted.

79 changes: 0 additions & 79 deletions source/examples/matlab/DSPC_custom_XY.rst

This file was deleted.

3 changes: 2 additions & 1 deletion source/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ User Guide
:maxdepth: 2

tutorial/index
examples/index
matlab_examples/index
python_examples/index
algorithms/index
advanced/index
calcTypes/index
Expand Down
4 changes: 3 additions & 1 deletion source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ RAT contains a number of improvements over legacy RasCAL, including:

* :ref:`guide`: Learn the core principles of RAT with code snippets.

* :ref:`examples`: Jump into some practical examples.
* :ref:`matlabExamples`: Jump into some practical examples for the MATLAB interface.

* :ref:`pythonExamples`: Explore some practical examples for the Python interface.


.. grid-item-card::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A normal standard layers model defines parameters, which are grouped into layers
layers are first grouped into domain 'contrasts', which are just groupings of layers with none of the additional parameters of a contrast (such as resolutions
etc). Then, the actual experimental contrasts are built in the usual way, but with the model set as any two of the domains.

.. image:: ../../images/domainsGraph.png
.. image:: ../images/domainsGraph.png
:align: center
:alt: Domains graph

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For all calculation types, to activate this functionality it is necessary to set
This example analyses a bilayer sample on a permalloy/gold substrate, measured using polarised neutrons, against D2O and H2O, leading to
4 contrasts in total. Absorption (i.e. imaginary SLD) is defined for gold and the permalloy, to account for non-flat data below the critical edge.

.. image:: ../../images/examples/critEdge.png
.. image:: ../images/examples/critEdge.png
:align: center
:alt: Critical Edge

Expand Down
39 changes: 39 additions & 0 deletions source/matlab_examples/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _matlabExamples:

===============
MATLAB Examples
===============
A number of examples are provided to demonstrate the functionality available in the MATLAB interface of RAT.

******************
Normal Calculation
******************

.. toctree::
:maxdepth: 1

DSPC_standard_layers
DSPC_custom_layers
DSPC_custom_XY

******************
Domain Calculation
******************

.. toctree::
:maxdepth: 1

domains_standard_layers
domains_custom_layers
domains_custom_XY

*************
Miscellaneous
*************

.. toctree::
:maxdepth: 1

imaginary
convert_r1_project
custom_model_languages
100 changes: 100 additions & 0 deletions source/python_examples/data/D2O_spin_down.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
0.01218 1.015359223955 0.0231718818417596
0.012545 0.919431439253596 0.0193509380578665
0.012922 0.924921688167335 0.0183337262959345
0.013309 0.892889622419078 0.01658695139614
0.013709 0.88564788305433 0.0151834012597258
0.01412 0.954057058169692 0.0152655865808885
0.014544 0.801205833810502 0.0128764862406952
0.01498 0.57206372730641 0.00977028529084846
0.015429 0.507292263127758 0.00840850146518913
0.015892 0.441240863619522 0.0072616120448651
0.016369 0.411263430900333 0.00703930748762168
0.01686 0.398699855165213 0.00667722051938428
0.017366 0.369396072619489 0.00590757519620061
0.017887 0.333584829398094 0.00529590083869447
0.018423 0.300131361783826 0.00480817811310586
0.018976 0.254862070126983 0.00436222169827209
0.019545 0.218629795547172 0.0038320590117552
0.020132 0.183303580450672 0.00337229276836539
0.020736 0.158391997035939 0.00306386203644447
0.021358 0.128249520024251 0.00266512849877059
0.021998 0.0956717976354879 0.0021819192293442
0.022658 0.0688201017211762 0.00176311091650106
0.023338 0.0481760921553437 0.00145639799252248
0.024038 0.0328252888275119 0.00118309811714777
0.024759 0.0183323789955876 0.000868570851156994
0.025502 0.0106467041665263 0.000644514803462562
0.026267 0.00788878035636094 0.000551382666981037
0.027055 0.0069025565024083 0.0005165549530129
0.027867 0.00807841288019132 0.000666341069082825
0.028703 0.0104166526322881 0.000419481963016605
0.029564 0.0134376368351915 0.000465997507494358
0.030451 0.0158250530499512 0.000492135134224797
0.031365 0.018520664219071 0.000528646973626596
0.032305 0.0188403112263801 0.000530903701707703
0.033275 0.0189720098352925 0.000529859543938832
0.034273 0.0167957829499141 0.000677826804540402
0.035301 0.0143561588467109 0.000448314190440904
0.03636 0.0120825895112668 0.000385361581730607
0.037451 0.00911010812085284 0.000338273434605409
0.038574 0.0064407693084981 0.000272228771598909
0.039732 0.00380747078042373 0.000191909461416686
0.040924 0.00219977095894102 0.000139024554548823
0.042151 0.00106749974738118 9.30715079659133e-05
0.043416 0.000526289198019469 6.53777493347705e-05
0.044718 0.000538684361211223 6.36026811276904e-05
0.04606 0.000666071609013439 6.89514635050019e-05
0.047442 0.00096513860352319 8.1892283337263e-05
0.048865 0.00123628279834282 9.06632085957762e-05
0.050331 0.000932500252618815 7.56441779783758e-05
0.051841 0.000704570716426959 6.33837448213143e-05
0.053396 0.000422547071305871 4.87823773114622e-05
0.054998 0.000225234935497996 3.52790595843578e-05
0.056648 0.000224295193506012 3.47502441981879e-05
0.058347 0.000348546599750749 4.2399541917882e-05
0.060098 0.000753444036511839 6.21105459934656e-05
0.061901 0.00108427363670046 0.000132874128465088
0.063758 0.00147590016504429 6.80656135268955e-05
0.06567 0.00157522988312169 6.65397958839974e-05
0.06764 0.00123685540099027 5.63878877698811e-05
0.06967 0.000809188588366061 4.4090403853279e-05
0.07176 0.000394860049176463 3.01087945030146e-05
0.073913 0.000158546936575836 1.87827141365489e-05
0.07613 0.000205156792077874 2.11738354272626e-05
0.078414 0.000432213951295092 3.08747347502442e-05
0.080766 0.000654956381151268 3.77210414631682e-05
0.083189 0.000798309138064603 4.33157061537943e-05
0.085685 0.000842635319478595 5.73848900266092e-05
0.088255 0.000695947994206608 4.00080838020816e-05
0.090903 0.000486577520293712 3.1324396241032e-05
0.09363 0.000518575903533295 3.11105123109569e-05
0.096439 0.000572434234901815 3.26076998214827e-05
0.099332 0.000634309003334568 3.34605409410893e-05
0.10231 0.000482232476674863 2.81521775741857e-05
0.10538 0.000365623631648085 2.39677995217084e-05
0.10854 0.000216433695981677 1.81376940954562e-05
0.1118 0.00016573141567584 1.53181312944188e-05
0.11515 0.000215844252079895 1.6793425174307e-05
0.11861 0.000301364141601267 1.9534170905049e-05
0.12217 0.000246353868436121 1.75755330256998e-05
0.12583 0.000162551786857085 1.40661524470343e-05
0.12961 7.50985213378692e-05 9.36878978746337e-06
0.13349 6.5539425376402e-05 8.69884468995251e-06
0.1375 4.34100171780794e-05 7.01707703189734e-06
0.14162 4.008555357203e-05 6.73885951025632e-06
0.14587 3.09498467445855e-05 5.80450671966048e-06
0.15025 9.04307992859308e-06 3.1003401933376e-06
0.15476 1.20906733133484e-05 3.56933544410388e-06
0.1594 1.50092626898851e-05 4.01428138367746e-06
0.16418 2.38057866549901e-05 5.21304186735828e-06
0.16911 2.45653272255718e-05 5.35080332783186e-06
0.17418 1.01465189127286e-05 3.58853447404763e-06
0.17941 9.15355855704133e-06 3.55249418976725e-06
0.18479 4.82434571726902e-06 2.64124760012126e-06
0.19033 1.52628919801947e-06 1.52659234059753e-06
0.19604 3.69800262723568e-06 2.61612044865102e-06
0.20192 1.54286099228671e-06 1.90198389976085e-06
0.20798 1.2093704739129e-05 5.23729327360302e-06
0.21422 2.37360638620364e-06 2.37431371888578e-06
0.22065 5.71086934554886e-06 4.04257469096298e-06
0.22727 3.01060999023207e-06 3.01168783050962e-06
Loading

0 comments on commit a350862

Please sign in to comment.