From 3144e20851223c7bbc9949a9cbaa10e5b98464c7 Mon Sep 17 00:00:00 2001
From: Karl-Michael Schindler <karl-michael.schindler@web.de>
Date: Thu, 13 Feb 2025 17:44:30 +0100
Subject: [PATCH] work on yaml input files

- fix eelsbosin001.yaml
- create eelsbosin002.yaml
- add description of conversion
---
 tests/inputFiles/Parameter conversion.rtf | 53 +++++++++++++++++++++++
 tests/inputFiles/eelsbosin001.yaml        | 23 ++--------
 tests/inputFiles/eelsbosin002.yaml        | 42 ++++++++++++++++++
 3 files changed, 99 insertions(+), 19 deletions(-)
 create mode 100644 tests/inputFiles/Parameter conversion.rtf
 create mode 100644 tests/inputFiles/eelsbosin002.yaml

diff --git a/tests/inputFiles/Parameter conversion.rtf b/tests/inputFiles/Parameter conversion.rtf
new file mode 100644
index 0000000..ac35061
--- /dev/null
+++ b/tests/inputFiles/Parameter conversion.rtf	
@@ -0,0 +1,53 @@
+{\rtf1\ansi\ansicpg1252\cocoartf2821
+\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;\f2\fnil\fcharset0 Menlo-Regular;
+}
+{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red255\green255\blue255;}
+{\*\expandedcolortbl;;\csgenericrgb\c0\c0\c0\c85000;\csgenericrgb\c100000\c100000\c100000;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww19400\viewh11000\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+
+\f0\fs24 \cf0 How to convert the old input parameters for oscillators for HREELS calculations to the ones for the yaml input files.\
+\
+\ul Lorentz\
+\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \ulnone \uc0\u969 \sub TO_new\nosupersub 	= \uc0\u969 \sub TO_old\
+\nosupersub Q\sub K_new\nosupersub 	= Q\sub K_old\nosupersub \
+\uc0\u947 \sub new\nosupersub 	= \uc0\u955 \sub old\nosupersub  * \uc0\u969 \sub TO_old \nosupersub = osc[3] * osc[1]\sub \
+\
+\nosupersub \uc0\u969 \sub TO_old\nosupersub :	osc[1]\
+Q\sub K_old\nosupersub :	osc[2]\sub \
+\nosupersub \uc0\u955 \sub old\nosupersub :		osc[3]\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \ul \ulc0 \
+Drude\
+\ulnone \
+\uc0\u969 \sub P_new\nosupersub 	= \uc0\u969 \sub P_old \nosupersub / sqrt(epsinf)\
+\uc0\u947 \sub new\nosupersub 	= \uc0\u955 \sub old\nosupersub  * \uc0\u969 \sub P_old\
+\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \nosupersub \uc0\u969 \sub P_old\nosupersub :	osc[1]\
+\uc0\u955 \sub old\nosupersub :		osc[3]\
+\
+Note: old osc[2] is -1 or negative to indicate Drude term. Its value is not further used as a parameter in the calculations.\
+\
+
+\f1\b Examples:\
+
+\f0\b0 \ul Pt\ulnone \
+    8.90\
+160000.0         -1.0           0.12\
+185541.0\
+\
+wP: 160000.0\
+y: 0.012\
+\
+\ul Ag\ulnone \
+      1.0\
+  31460.0         -1.0          0.05\
+\pard\tx593\pardeftab593\pardirnatural\partightenfactor0
+
+\f2 \cf2 \cb3 \
+wP: 31460.0\
+y: 0.05\
+}
\ No newline at end of file
diff --git a/tests/inputFiles/eelsbosin001.yaml b/tests/inputFiles/eelsbosin001.yaml
index 7335966..134e64c 100644
--- a/tests/inputFiles/eelsbosin001.yaml
+++ b/tests/inputFiles/eelsbosin001.yaml
@@ -5,8 +5,8 @@ PhiB:   1.8
 wMin:  50.0
 wMax: 700.0
 dw:     2.0
-Comment1: "WFW: MnO layer on metal"
-Comment2: 
+Comment1: "MnO layer on Pt"
+Comment2: "Compare with eelsin001"
 NumberOfPeriodicLayers: 1
 
 Layers:
@@ -17,23 +17,8 @@ Layers:
       [
         {Type: Lorentz,
          wTO: 269.0,
-         Qk:  16.000,
-         yk:  0.05}
-      ,
-        {Type: Lorentz,
-         wTO: 279.0,
-         Qk:    17.000,
-         yk: 0.06}
-      ]
-  }
-- { Name: "Platinum",
-    thickness: 1000.0,
-    epsInfinity: 8.90,
-    Terms:
-      [
-        {Type: Drude,
-         wP: 160000.0,
-         y: 0.012}
+         Qk:   16.000,
+         yk:   13.45}
       ]
   }
 
diff --git a/tests/inputFiles/eelsbosin002.yaml b/tests/inputFiles/eelsbosin002.yaml
new file mode 100644
index 0000000..e8ce26f
--- /dev/null
+++ b/tests/inputFiles/eelsbosin002.yaml
@@ -0,0 +1,42 @@
+E0:     4.0
+Theta: 60.0
+PhiA:   1.8
+PhiB:   1.8
+wMin:  50.0
+wMax: 700.0
+dw:     2.0
+Comment1: "MnO"
+Comment2: "Compare with eelsin006"
+NumberOfPeriodicLayers: 1
+
+Layers:
+- { Name: "MnO",
+    thickness: 994.0,
+    epsInfinity: 4.95,
+    Terms:
+      [
+        {Type: Lorentz,
+         wTO: 269.0,
+         Qk:   16.000,
+         yk:    0.05}
+      ]
+  }
+- { Name: "Platinum",
+    thickness: 1000.0,
+    epsInfinity: 8.90,
+    Terms:
+      [
+        {Type: Drude,
+         wP: 62193.5,
+         y:  22264.9}
+      ]
+  }
+
+ImageCharge: False
+
+T:     300.0
+Width:  57.0
+Gauss:   0.5
+Asym:    0.3
+EMin: -500.0
+EMax:  750.0
-- 
GitLab