Merge branch 'feature/polarization' into devel
epsi-builds/msspec_python3/pipeline/head There was a failure building this commit Details

This commit is contained in:
Sylvain Tricot 2022-02-15 17:30:12 +01:00
commit adb73f7fd8
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.')