Added the binding for polarization keyword.

The polarization keyword may be None, 'linear_qOz', 'linear_xOy' or
'circular'. The IPOL parameter in spec.dat is set accordingly to
0, 1, -1 or 2 respectively.
This commit is contained in:
Sylvain Tricot 2022-02-15 15:37:28 +01:00
parent 25fd8114a5
commit 9787e99d2e
1 changed files with 13 additions and 2 deletions

View File

@ -19,8 +19,8 @@
# along with this msspec. If not, see <http://www.gnu.org/licenses/>. # along with this msspec. If not, see <http://www.gnu.org/licenses/>.
# #
# Source file : src/msspec/parameters.py # Source file : src/msspec/parameters.py
# Last modified: Mon, 27 Sep 2021 17:49:48 +0200 # Last modified: Tue, 15 Feb 2022 15:37:28 +0100
# Committed by : sylvain tricot <sylvain.tricot@univ-rennes1.fr> # Committed by : Sylvain Tricot <sylvain.tricot@univ-rennes1.fr>
""" """
@ -839,6 +839,17 @@ class GlobalParameters(BaseParameters):
self.phagen_parameters.calctype = phagen_calctype self.phagen_parameters.calctype = phagen_calctype
self.spec_parameters.calctype_spectro = spec_calctype self.spec_parameters.calctype_spectro = spec_calctype
def bind_polarization(self, p):
if p.value is None:
ipol = 0
elif p.value == 'linear_qOz':
ipol = 1
elif p.value == 'linear_xOy':
ipol = -1
elif p.value == 'circular':
ipol = 2
self.spec_parameters.calctype_ipol = ipol
def bind_spinpol(self, p): def bind_spinpol(self, p):
if p.value == True: if p.value == True:
LOGGER.error('Spin polarization is not yet enabled in the Python version.') LOGGER.error('Spin polarization is not yet enabled in the Python version.')