diff --git a/src/msspec/parameters.py b/src/msspec/parameters.py index 8a682f4..3b4b40c 100644 --- a/src/msspec/parameters.py +++ b/src/msspec/parameters.py @@ -19,8 +19,8 @@ # along with this msspec. If not, see . # # Source file : src/msspec/parameters.py -# Last modified: Mon, 27 Sep 2021 17:49:48 +0200 -# Committed by : sylvain tricot +# Last modified: Tue, 15 Feb 2022 15:37:28 +0100 +# Committed by : Sylvain Tricot """ @@ -839,6 +839,17 @@ class GlobalParameters(BaseParameters): self.phagen_parameters.calctype = phagen_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): if p.value == True: LOGGER.error('Spin polarization is not yet enabled in the Python version.')