{"id":32,"date":"2018-01-17T21:45:38","date_gmt":"2018-01-17T21:45:38","guid":{"rendered":"https:\/\/dyna.neel.cnrs.fr\/?page_id=32"},"modified":"2026-08-26T12:20:30","modified_gmt":"2026-08-26T10:20:30","slug":"sit-18","status":"publish","type":"page","link":"https:\/\/dyna.neel.cnrs.fr\/","title":{"rendered":""},"content":{"rendered":"\n<p class=\"has-black-color has-light-gray-background-color has-text-color has-background wp-block-paragraph\"><strong>Dyna is a simulation program for  reflectivity and transmittance of x-rays and optics, aimed at determining structural, magnetic and electronic stackings in ultrathin multilayers.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dyna performs x-ray reflectivity simulation and fits. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It includes anomalous, magnetic and anisotropic components in the index of refraction. Dyna simulates reflectivities either versus angle, or versus x-ray energy, with arbitrary incident and outgoing polarizations; it simulates Kerr and Faraday spectra, and transmittance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Simulations of angular or energy scans can be simultaneously fitted against one model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The program integrates a toolbox to create charge and magnetic scattering factors from the tables bundled with the code. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dyna was also designed for pedagogical aims, making easy to slide parameters for on-the-fly calculations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dyna is an on-going <strong>free<\/strong> and <strong>open-source<\/strong> project, under Python + Qt, or Matlab environments. Dyna can also be freely downloaded, and support is offered to users upon reasonable request. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd2c Dyna at a Glance<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><\/th><th><\/th><\/tr><\/thead><tbody><tr><td><strong>Description<\/strong><\/td><td>Simulation and refinement of X-ray\/optical reflectivity, transmittance, Kerr, and Faraday effects for ultrathin multilayers.<\/td><\/tr><tr><td><strong>Developed by<\/strong><\/td><td>Institut N\u00e9el, CNRS, Grenoble, France<\/td><\/tr><tr><td><strong>License<\/strong><\/td><td>GPL-2.0-or-later (Free &amp; Open Source)<\/td><\/tr><tr><td><strong>Latest Version<\/strong><\/td><td>6.8.3 (August 2026)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2728 Key Features<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Category<\/strong><\/th><th><strong>Capabilities<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Physics<\/strong><\/td><td>Anomalous, magnetic, and anisotropic index of refraction <em>(Spin-orbit coupling in valence states negligible)<\/em><\/td><\/tr><tr><td><strong>Scan Types<\/strong><\/td><td>Angular (\u03b8), Q-space, Energy (E), or fixed Q <em>(Arbitrary incident &amp; outgoing polarizations: \u03c3, \u03c0, circ\u00b1)<\/em><\/td><\/tr><tr><td><strong>Magnetism<\/strong><\/td><td>Magnetic-sensitive susceptibility, arbitrary magnetization direction (Euler angles: \u03c6, \u03b3), Kerr &amp; Faraday rotation\/ellipticity <em>(small-angle approximation)<\/em><\/td><\/tr><tr><td><strong>Anisotropy<\/strong><\/td><td>Uniaxial symmetry along film depth <em>(Oriented molecules, orbitally ordered films)<\/em><\/td><\/tr><tr><td><strong>Fitting<\/strong><\/td><td>Multi-fit: simultaneous refinement against multiple datasets <em>(angle\/energy scans, any polarization, constraints, parameter limits)<\/em><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\uddee Calculation Formalisms<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Type<\/strong><\/th><th><strong>Methods<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Scalar<\/strong><\/td><td>Parratt (fast analytical)<\/td><\/tr><tr><td><strong>Magnetic<\/strong><\/td><td>Magnetic Parratt (transverse), Elzo, Stepanov (fast analytical), Berreman-Elzo, Berreman-Stepanov (exact 4\u00d74 tensor validation)<\/td><\/tr><tr><td><strong>Transmission<\/strong><\/td><td>Structural &amp; magnetic-sensitive transmittance (Parratt, Elzo, Stepanov)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udfaf Typical Use Cases<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Application<\/strong><\/th><th><strong>Details<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Structural<\/strong><\/td><td>Layer thickness, density, roughness in multilayers<\/td><\/tr><tr><td><strong>Magnetic<\/strong><\/td><td>Magnetization profiles, domain structures, magnetic depth profiling<\/td><\/tr><tr><td><strong>Electronic<\/strong><\/td><td>Anomalous dispersion (f&#8217;, f&#8221;) from atomic tables<\/td><\/tr><tr><td><strong>Pedagogy<\/strong><\/td><td>Interactive parameter sliding for on-the-fly effects<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f Technical Details<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Field<\/strong><\/th><th><strong>Details<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Language<\/strong><\/td><td>Python \u2265 3.10 + Qt5 (GUI) or headless API<\/td><\/tr><tr><td><strong>Dependencies<\/strong><\/td><td>NumPy, SciPy, Matplotlib, PyYAML, PyQt5<\/td><\/tr><tr><td><strong>Installation<\/strong><\/td><td><code>pip install DynaRef<\/code> <em>(GUI: <code>dyna<\/code> | Headless: <code>dyna-sim<\/code>)<\/em><\/td><\/tr><tr><td><strong>Platforms<\/strong><\/td><td>Linux, macOS, Windows<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd17 Resources<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Resource<\/strong><\/th><th><strong>Link<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Documentation<\/strong><\/td><td><a href=\"https:\/\/pydyna.readthedocs.io\">pydyna.readthedocs.io<\/a><\/td><\/tr><tr><td><strong>Source Code<\/strong><\/td><td><a href=\"https:\/\/gitlab.com\/dynadevgroup\/Dyna\">gitlab.com\/dynadevgroup\/Dyna<\/a><\/td><\/tr><tr><td><strong>Contact<\/strong><\/td><td>St\u00e9phane Grenier \u2013 <a href=\"mailto:stephane.grenier@neel.cnrs.fr\">stephane.grenier@neel.cnrs.fr<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-white-color has-blue-background-color has-text-color has-background wp-block-paragraph\"><strong>Features<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>magnetic-sensitive susceptibility, arbitrary magnetic moment direction described by Euler angles, with the limitation of neglictible spin-orbit coupling in the valence states<\/li>\n\n\n\n<li>anisotropic susceptibility, in the limitation of an uniaxial symmetry along the depth of the film, for the simulation of oriented molecules or orbitally ordered films (not in python code yet)<\/li>\n\n\n\n<li>structural and magnetic sensitive transmittance.<\/li>\n\n\n\n<li>Angular\/Q scans<\/li>\n\n\n\n<li>Energy spectra at fix angle or fix Q<\/li>\n\n\n\n<li>Polarization Analysis, in and out<\/li>\n\n\n\n<li>Refinement in user-defined interval, with limits on parameters, and constrains between parameters<\/li>\n\n\n\n<li>Multifit&nbsp;: one system is refined by simultaneous simulations of various data (angle and energy scans, of any polarization, energy or angle configurations).<\/li>\n\n\n\n<li>Calculates Scattering Factors from Tables <\/li>\n\n\n\n<li>GUI workflows<\/li>\n\n\n\n<li>Scriptable simulations<\/li>\n\n\n\n<li>Scriptable fitting<\/li>\n\n\n\n<li>JSON\/YAML config files<\/li>\n\n\n\n<li>YAML GUI project persistence<\/li>\n\n\n\n<li>Scientific regression tests<\/li>\n<\/ul>\n\n\n\n<p class=\"has-white-color has-blue-background-color has-text-color has-background wp-block-paragraph\"><strong><strong>API (Application Programming Interface)<\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Users can script or automate Dyna&#8217;s functionality without using the GUI. It is designed for developers or advanced users who want to integrate Dyna into their own workflows or scripts.<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background has-link-color wp-elements-1\" style=\"background-color:#bfbfbf\"><code><code>from dyna import Experiment, Formalism, run_reflectivity<br>from dyna.Samples.Samples import SampleIni<br><br>experiment = Experiment()<br>experiment.Formalism = Formalism.STEPANOV_ANGLE<br>result = run_reflectivity(SampleIni(), experiment)<\/code><\/code><\/pre>\n\n\n\n<p class=\"has-white-color has-blue-background-color has-text-color has-background wp-block-paragraph\"><strong><strong>CLI (Command Line Interface)<\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run Dyna simulations, fits, or other tasks directly from the command line (e.g., Terminal on Linux\/macOS or Command Prompt\/PowerShell on Windows).<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background has-link-color wp-elements-2\" style=\"background-color:#c0c0c0\"><code><code>dyna-sim examples\/stepanov-angle.json --output reflectivity.csv<\/code><\/code><\/pre>\n\n\n\n<p class=\"has-white-color has-blue-background-color has-text-color has-background wp-block-paragraph\"><strong>Reference<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In case of use, please cite the reference paper&nbsp;:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>X-ray resonant magnetic reflectivity of stratified magnetic structures: Eigenwave formalism and application to a W\/Fe\/W trilayer<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>M.&nbsp;Elzo, et al., Journal of Magnetism and Magnetic Materials, 324 (2), pp. 105-112 (2012)<\/em> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/dx.doi.org\/10.1016\/j.jmmm.2011.07.019\">http:\/\/dx.doi.org\/10.1016\/j.jmmm.20&#8230;<\/a><a class=\"clickandreadBtn\" title=\"Ressource found in  UNPAYWALL\" name=\"CLICKANDREADLink\" href=\"https:\/\/hal.archives-ouvertes.fr\/hal-00594121\/file\/Magnetic_Reflectivity.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"data:image\/svg+xml;base64,PHN2ZyBpZD0iQ2FscXVlXzEiIGRhdGEtbmFtZT0iQ2FscXVlIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUwIDI4LjE4Ij48cmVjdCB3aWR0aD0iNTAiIGhlaWdodD0iMjguMTgiIHJ4PSIxNC4wOSIgc3R5bGU9ImZpbGw6IzIxY2UyMSIvPjxwYXRoIGQ9Ik0xOC45MywxNi40NWEuMzIuMzIsMCwwLDAtLjU0LjIydjJoLTRhNS4wOCw1LjA4LDAsMCwxLDAtMTAuMTZoNS4yMlY1LjQ0SDE0LjQ0YTguMTQsOC4xNCwwLDAsMCwwLDE2LjI4aDR2MmEuMzIuMzIsMCwwLDAsLjU0LjIzbDMuNTEtMy41MWEuMzQuMzQsMCwwLDAsMC0uNDZaIiBzdHlsZT0iZmlsbDojZmZmIi8+PHBhdGggZD0iTTQyLjUyLDIxLjA3bC00Ljg0LTUuNjlhMCwwLDAsMCwxLDAsMCw1LjMsNS4zLDAsMCwwLDIuNTktNC45LDUuNDMsNS40MywwLDAsMC01LjQ4LTVIMjguNDhhMCwwLDAsMCwwLDAsMFYyMS42OWEwLDAsMCwwLDAsMCwwaDMuMDVsMCwwVjguNTVzMCwwLDAsMEgzNWEyLjI0LDIuMjQsMCwwLDEsMi4yMiwyLjUzLDIuMywyLjMsMCwwLDEtMi4zMiwySDMyLjRhLjM2LjM2LDAsMCwwLS4yOC41OWw2LjYyLDcuNzlhLjkzLjkzLDAsMCwwLC42OC4zMWgyLjgxQS4zOS4zOSwwLDAsMCw0Mi41MiwyMS4wN1oiIHN0eWxlPSJmaWxsOiNmZmYiLz48Y2lyY2xlIGN4PSIyNC4yIiBjeT0iOC4yIiByPSIyLjc2IiBzdHlsZT0iZmlsbDojZmZmIi8+PC9zdmc+\" width=\"27\"><\/a> <a href=\"https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2020\/09\/Magnetic_Reflectivity.pdf\">preprint<\/a><\/p>\n\n\n\n<p class=\"has-white-color has-blue-background-color has-text-color has-background wp-block-paragraph\"><strong>Screenshots<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.04.38-1024x640.png\" alt=\"\" class=\"wp-image-1069\" srcset=\"https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.04.38-1024x640.png 1024w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.04.38-300x188.png 300w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.04.38-768x480.png 768w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.04.38-1536x960.png 1536w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.04.38.png 1680w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">All in one GUI, experiment and sample description, optimization panel, sliders to play around with parameters. <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"607\" src=\"https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.06.11-1024x607.png\" alt=\"\" class=\"wp-image-1071\" srcset=\"https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.06.11-1024x607.png 1024w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.06.11-300x178.png 300w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.06.11-768x455.png 768w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.06.11-1536x910.png 1536w, https:\/\/dyna.neel.cnrs.fr\/wp-content\/uploads\/2026\/08\/Capture-decran-2026-08-25-a-10.06.11.png 1792w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Dyna integrates a GUI to plot and build charge and magnetic x-ray scattering factors.<\/figcaption><\/figure>\n\n\n\n<p class=\"has-white-color has-blue-background-color has-text-color has-background wp-block-paragraph\"><strong>Provenance<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dyna was developped from <a href=\"http:\/\/elza-bontempi.unibs.it\/\">Elza Bontempi<\/a>&#8216;s Reftool within Matlab environment. Reftool was using Zak&#8217;s formalism, which was revisited and simplified, leading to Elzo&#8217;s formalisms. Both formalisms are based on the usual matricial optical formalism. The scattering formalism, by Stepanov and Sinha, was coded in order to better treat thick systems, notably for transmissivity (or &#8220;transmittance&#8221;).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We swiched to Python since 2020 for portability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Top image: <em>study of the sun reflection on wate<\/em>r by Leonardo<\/em>, <em>from a codex in display at Da Vinci&#8217;s exhibition in 2019, Mus\u00e9e du Louvre. (S. G.)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dyna is a simulation program for reflectivity and transmittance of x-rays and optics, aimed at determining structural, magnetic and electronic stackings in ultrathin multilayers. Dyna performs x-ray reflectivity simulation and fits. It includes anomalous, magnetic and anisotropic components in the &hellip; <a href=\"https:\/\/dyna.neel.cnrs.fr\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-32","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/pages\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":159,"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/pages\/32\/revisions"}],"predecessor-version":[{"id":1082,"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/pages\/32\/revisions\/1082"}],"wp:attachment":[{"href":"https:\/\/dyna.neel.cnrs.fr\/index.php\/wp-json\/wp\/v2\/media?parent=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}