Warning: Trying to access array offset on value of type null in /home/site/wwwroot/lib/plugins/move/action/rename.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/lib/plugins/move/action/rename.php:42) in /home/site/wwwroot/inc/actions.php on line 38
flat-plate_transmission [topas wiki]

User Tools

Site Tools


flat-plate_transmission

Parallel beam, thin-plate transmission

This is a collection of macros that are used to model the effects of a flat plate sample in transmission, either in asymmetric or symmetric geometry.

There is a (nice) overview of their application in [1]. The required equations for reflection and capillary geometry are also reviewed, as are preferred orientation issues.

Contributor: Matthew Rowles

[1] Rowles, M. R., and C. E. Buckley. 2017. "Aberration Corrections for Non-Bragg-Brentano Diffraction Geometries." Journal of Applied Crystallography 50 (1): 240-251..

Master macros

These are probably the macros you'll actually put in your input files. They have all of the commonly used corrections.

''master macro to encapsulate all asymmetric transmission corrections in a single macro
macro Asymmetric_Transmission(omega, omega_v, beam, beam_v, sd, sd_v, mu, mu_v, t, t_v)
{
	Asymmetric_Transmission_Intensity_Correction(omega, omega_v, mu, mu_v, t, t_v)
	Asymmetric_Transmission_Absorption_Correction(omega, omega_v, mu, mu_v, t, t_v)
	Asymmetric_Transmission_Parallel_Footprint_Correction(omega, omega_v, beam, beam_v)
	Asymmetric_Transmission_Specimen_Displacement(omega, omega_v, sd, sd_v)
}
''master macro to encapsulate all symmetric transmission corrections in a single macro
macro Symmetric_Transmission(beam, beam_v, sd, sd_v, mu, mu_v, t, t_v)
{
	Symmetric_Transmission_Intensity_Correction(mu, mu_v, t, t_v)
	Symmetric_Transmission_Absorption_Correction(t, t_v)
	Symmetric_Transmission_Parallel_Footprint_Correction(beam, beam_v)
	Symmetric_Transmission_Specimen_Displacement(sd, sd_v)
}

The actual working macros

These are the macros that actually do the maths.

''Intensity correction in asymmetric transmission - equation 22
macro Asymmetric_Transmission_Intensity_Correction(omega, omega_v, mu, mu_v, t, t_v)
{						
   #m_argu omega ''in degrees
   #m_argu mu    ''in cm^-1
   #m_argu t     ''in mm
   If_Prm_Eqn_Rpt(omega, omega_v, min 0.0001 max 90)
   If_Prm_Eqn_Rpt(mu, mu_v, min 3 max 500)
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique beta = (180 - ((2 Th) Rad + CeV(omega, omega_v))); '' in degrees
   prm #m_unique mu_s = CeV(mu, mu_v) / 10; ''converts cm^-1 --> mm^-1 for dimensional consistency
 
   scale_pks = 2 Exp(-mu_s CeV(t, t_v) / Sin(beta Deg)) (Sin(beta Deg) /  (Sin(CeV(omega, omega_v)  Deg) - Sin(beta Deg))) (Exp(-mu_s CeV(t, t_v) (Sin(beta Deg) - Sin(CeV(omega, omega_v)  Deg)) / (Sin(CeV(omega, omega_v)  Deg) Sin(beta Deg))) - 1);
}
''Intensity correction in symmetric transmission - equation 24
macro Symmetric_Transmission_Intensity_Correction(mu, mu_v, t, t_v)
{						
   #m_argu mu    ''in cm^-1
   #m_argu t     ''in mm
   If_Prm_Eqn_Rpt(mu, mu_v, min 3 max 500)
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique mu_s = CeV(mu, mu_v) / 10; ''converts cm^-1 --> mm^-1 for dimensional consistency
 
   scale_pks = (2 mu_s CeV(t, t_v) Exp(-mu_s CeV(t, t_v) / Cos(Th))) / Cos(Th);
}
''Relative intensity scaling for buried layers in asymmetric transmission geometry -- Equation 25
macro Asymmetric_Transmission_Intensity_Correction_for_prelayers(omega, omega_v, mu, mu_v, t, t_v)
{
   #m_argu omega ''in degrees
   #m_argu mu    ''in cm^-1
   #m_argu t     ''in mm
   If_Prm_Eqn_Rpt(omega, omega_v, min 0.0001 max 90)
   If_Prm_Eqn_Rpt(mu, mu_v, min 3 max 500)
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique mu_s = CeV(mu, mu_v) / 10; ''converts cm^-1 --> mm^-1 for dimensional consistency
 
   scale_pks = Exp((-mu_s CeV(t, t_v)) / Sin(CeV(omega, omega_v) Deg)) ;
}
''Relative intensity scaling for buried layers in asymmetric transmission geometry -- Equation 26
macro Asymmetric_Transmission_Intensity_Correction_for_postlayers(omega, omega_v, mu, mu_v, t, t_v)
{
   #m_argu omega ''in degrees
   #m_argu mu    ''in cm^-1
   #m_argu t     ''in mm
   If_Prm_Eqn_Rpt(omega, omega_v, min 0.0001 max 90)
   If_Prm_Eqn_Rpt(mu, mu_v, min 3 max 500)
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique beta = (180 - ((2 Th) Rad + CeV(omega, omega_v))); '' in degrees
   prm #m_unique mu_s = CeV(mu, mu_v) / 10; ''converts cm^-1 --> mm^-1 for dimensional consistency
 
   scale_pks = Exp((-mu_s CeV(t, t_v)) / Sin(beta Deg) ;
}
''Relative intensity scaling for buried layers in symmetric transmission geometry -- implied from Equation 25 & 26
macro Symmetric_Transmission_Intensity_Correction_for_prepostlayers(omega, omega_v, mu, mu_v, t, t_v)
{
   #m_argu mu    ''in cm^-1
   #m_argu t     ''in mm
  If_Prm_Eqn_Rpt(mu, mu_v, min 3 max 500)
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique mu_s = CeV(mu, mu_v) / 10; ''converts cm^-1 --> mm^-1 for dimensional consistency
 
   scale_pks = Exp((-mu_s CeV(t, t_v)) / Cos(Th)) ;
}
''Line profile correction due to absorption in asymmetric transmission - equation 36
macro Asymmetric_Transmission_Absorption_Correction(omega, omega_v, mu, mu_v, t, t_v)
{						
   #m_argu omega ''in degrees
   #m_argu mu    ''in cm^-1
   #m_argu t     ''in mm
   If_Prm_Eqn_Rpt(omega, omega_v, min 0.0001 max 90)
   If_Prm_Eqn_Rpt(mu, mu_v, min 3 max 500)
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique beta = (180 - ((2 Th) Rad + CeV(omega, omega_v))); '' in degrees
   prm #m_unique mu_s = CeV(mu, mu_v) / 10; ''converts cm^-1 --> mm^-1 for dimensional consistency
 
   prm #m_unique g = Exp(-mu_s ((X Rs/Sin(2 Th) Deg   (Sin(CeV(omega, omega_v) Deg)/Sin(beta Deg) - 1) + (ts/Sin(beta Deg))));
 
   user_defined_convolution =g; ''convolutions are automatically normalised
   	min =(-CeV(t, t_v)/Rs) (Sin2 Th)/Sin(CeV(omega, omega_v) Deg)) Rad;
   	max 0
}
''Line profile correction due to absorption in symmetric transmission - equation 37
macro Symmetric_Transmission_Absorption_Correction(t, t_v)
{						
   #m_argu t     ''in mm
   If_Prm_Eqn_Rpt(t, t_v, min 0.001 max 5)
 
   prm #m_unique eps_min = (-2 CeV(t, t_v)/Rs) Sin(Th) Rad;
 
   user_defined_convolution = -1/eps_min;
   	min =eps_min;
   	max 0
}
''Line profile correction due to footprint in asymetric transmission - equation 38
macro Asymmetric_Transmission_Parallel_Footprint_Correction(omega, omega_v, beam, beam_v)
{						
   #m_argu omega ''in degrees
   #m_argu beam  ''height in mm
   If_Prm_Eqn_Rpt(omega, omega_v, min 0.0001 max 90)
   If_Prm_Eqn_Rpt(beam, beam_v, min 0.001 max 5)
 
   prm #m_unique beta = (180 - ((2 Th) Rad + CeV(omega, omega_v))); '' in degrees
 
   hat = ((CeV(beam, beam_v) Sin(beta Deg)) / (Rs Sin(CeV(omega, omega_v)  Deg))) Rad;
}	
''Line profile correction due to footprint in symetric transmission - implied by equation 38
macro Symmetric_Transmission_Parallel_Footprint_Correction(beam, beam_v)
{						
   #m_argu beam  ''height in mm
   If_Prm_Eqn_Rpt(beam, beam_v, min 0.001 max 5)
 
   hat = (CeV(beam, beam_v)/ Rs) Rad;
}	
''Specimen displacement in asymmetric transmission -- equation 39
macro Asymmetric_Transmission_Specimen_Displacement(omega, omega_v, sd, sd_v)
{
   #m_argu omega '' degrees
   #m_argu sd    ''displacement of the sample in mm
   If_Prm_Eqn_Rpt(omega, omega_v, min 0.0001 max 90)
   If_Prm_Eqn_Rpt(sd, sd_v, min -2 max 2)
 
   th2_offset = (CeV(sd, sd_v) / Rs) (Sin(2 Th)/Sin(CeV(omega, omega_v) Deg)) Rad;
}
''Specimen displacement in symmetric transmission -- equation 40
macro Symmetric_Transmission_Specimen_Displacement(sd, sd_v)
{
   #m_argu sd    ''displacement of the sample in mm
   If_Prm_Eqn_Rpt(sd, sd_v, min -2 max 2)
 
   th2_offset = (CeV(sd, sd_v) / Rs) (2 Sin(Th)) Rad;
}
flat-plate_transmission.txt · Last modified: 2022/11/03 15:08 by 127.0.0.1