StollLab / EasySpin

MATLAB toolbox for Electron Paramagnetic Resonance (EPR) spectroscopy
http://easyspin.org
MIT License
48 stars 25 forks source link

Redesign of mw mode interface #244

Closed stestoll closed 1 year ago

stestoll commented 2 years ago

Currently, two fields are needed to specify the microwave excitation mode: Exp.mwPolarization and Exp.Mode. This can be simplified to a single field and made consistent with the light excitation mode in Exp.lightMode (see #240).

Proposed general syntax: Exp.mwMode = {k alpha} where k is the propagation direction (y or [0;1;0] or [pi/2 pi/2] for the lab y direction) and alpha is the polarization type and angle ('unpol', 'circ+', 'circ-', and the actual polarization angle for linear polarization). Exp.mwMode='perp' and Exp.mwMode='para' would be shortcuts for Exp.Mode = {k alpha} with appropriate values for k and alpha.

This would rename Exp.Mode to Exp.mwMode, for name consistency with Exp.mwFreq, Exp.mwPhase etc. as well as input consistency with Exp.lightBeam.

This change would not affect any simulation functionality, but just input parsing. Most of it is currently in private/p_excitationgeometry.m. Documentation needs to be updated in several places. Tests need to be adjusted, new ones added.