Beispiel #1
0
 def __init__(self, ubcalc, geometry, hardware, constraints,
               raiseExceptionsIfAnglesDoNotMapBackToHkl=True):
     HklCalculatorBase.__init__(self, ubcalc, geometry, hardware,
                                raiseExceptionsIfAnglesDoNotMapBackToHkl)
     self._hardware = hardware  # for checking limits only
     self.constraints = constraints
     self.parameter_manager = constraints  # TODO: remove need for this attr
Beispiel #2
0
 def __init__(self, ubcalc, geometry, hardware, constraints,
               raiseExceptionsIfAnglesDoNotMapBackToHkl=True):
     HklCalculatorBase.__init__(self, ubcalc, geometry, hardware,
                                raiseExceptionsIfAnglesDoNotMapBackToHkl)
     self._hardware = hardware  # for checking limits only
     self.constraints = constraints
     self.parameter_manager = constraints  # TODO: remove need for this attr
Beispiel #3
0
 def __init__(self, ubcalc, geometry, hardware,
              raiseExceptionsIfAnglesDoNotMapBackToHkl=True):
     r = raiseExceptionsIfAnglesDoNotMapBackToHkl
     HklCalculatorBase.__init__(self, ubcalc, geometry, hardware,
                                raiseExceptionsIfAnglesDoNotMapBackToHkl=r)
     self._gammaParameterName = ({'arm': 'gamma', 'base': 'oopgamma'}
                                 [self._geometry.gamma_location])
     self.mode_selector = ModeSelector(self._geometry, None,
                                       self._gammaParameterName)
     self.parameter_manager = VliegParameterManager(
         self._geometry, self._hardware, self.mode_selector,
         self._gammaParameterName)
     self.mode_selector.setParameterManager(self.parameter_manager)
Beispiel #4
0
 def __init__(self, ubcalc, raiseExceptionsIfAnglesDoNotMapBackToHkl=True):
     r = raiseExceptionsIfAnglesDoNotMapBackToHkl
     HklCalculatorBase.__init__(self,
                                ubcalc,
                                raiseExceptionsIfAnglesDoNotMapBackToHkl=r)
     self._gammaParameterName = ({
         'arm': 'gamma',
         'base': 'oopgamma'
     }[settings.geometry.gamma_location])
     self.mode_selector = ModeSelector(settings.geometry, None,
                                       self._gammaParameterName)
     self.parameter_manager = VliegParameterManager(
         settings.geometry, settings.hardware, self.mode_selector,
         self._gammaParameterName)
     self.mode_selector.setParameterManager(self.parameter_manager)
Beispiel #5
0
    def __init__(self, ubcalc, geometry, hardware, constraints,
                 raiseExceptionsIfAnglesDoNotMapBackToHkl=True):
        """"
        Where constraints.reference is a one element dict with the key either
        ('betain', 'betaout' or 'equal') and the value a number or None for
        'betain_eq_betaout'
        """

        HklCalculatorBase.__init__(self, ubcalc, geometry, hardware,
                                   raiseExceptionsIfAnglesDoNotMapBackToHkl)

        if constraints is not None:
            self.constraints = constraints
            self.parameter_manager = ConstraintAdapter(constraints)
        else:
            self.constraints = DummyConstraints()
            self.parameter_manager = DummyParameterManager()
Beispiel #6
0
    def __init__(self,
                 ubcalc,
                 constraints,
                 raiseExceptionsIfAnglesDoNotMapBackToHkl=True):
        """"
        Where constraints.reference is a one element dict with the key either
        ('betain', 'betaout' or 'equal') and the value a number or None for
        'betain_eq_betaout'
        """

        HklCalculatorBase.__init__(self, ubcalc,
                                   raiseExceptionsIfAnglesDoNotMapBackToHkl)

        if constraints is not None:
            self.constraints = constraints
            self.parameter_manager = ConstraintAdapter(constraints)
        else:
            self.constraints = DummyConstraints()
            self.parameter_manager = DummyParameterManager()