"""
        return _scan(*args)


from diffcalc.gdasupport.scannable.sim import sim  # @UnusedImport

_scn_group = settings.axes_scannable_group
_diff_scn_name = settings.geometry.name  # @UndefinedVariable
_energy_scannable = settings.energy_scannable

# Create diffractometer scannable
_diff_scn = DiffractometerScannableGroup(_diff_scn_name, _dc, _scn_group)
globals()[_diff_scn_name] = _diff_scn

# Create hkl scannables
hkl = Hkl('hkl', _scn_group, _dc)
h = hkl.h
k = hkl.k
l = hkl.l

hkloffset = HklOffset('hkloffset', _scn_group, _dc)
h_offset = hkloffset.h
k_offset = hkloffset.k
l_offset = hkloffset.l
pol_offset = hkloffset.polar
az_offset = hkloffset.azimuthal

sr2 = Sr2('sr2', _scn_group, _dc)

qtrans = Qtrans('qtrans', _scn_group, _dc)
 def setup_method(self):
     TestFourcBase.createDiffcalcAndScannables(self)
     self.hklverbose = Hkl('hkl', self.fourc, self.dc,
                           ('theta', '2theta', 'Bin', 'Bout', 'azimuth'))
     self.orient()
 def setup_method(self):
     TestSixcBase.createDiffcalcAndScannables(self, SixCircleGeometry)
     self.hklverbose = Hkl('hkl', self.sixc, self.dc, ('Bout'))
     self.orient()
Exemple #4
0
setLimitsAndCuts(delta, chi, th, phi)

### Create i21 bespoke secondary hkl devices
# Warning: this breaks the encapsulation provided by the diffcalc.dc.you public
#          interface, and may be prone to breakage in future.

print 'Creating i21 bespoke scannables:'

from diffcalc.dc import dcyou as _dc
from diffcalc.gdasupport.scannable.diffractometer import DiffractometerScannableGroup
from diffcalc.gdasupport.scannable.hkl import Hkl

print '- fourc_vessel & hkl_vessel'
_fourc_vessel = ScannableGroup('_fourc', (delta, th, chi, phi)) #I21DiffractometerStage('_fourc_vessel', m5tth, sa)
fourc_vessel = DiffractometerScannableGroup('fourc_vessel', _dc, _fourc_vessel)
hkl_vessel = Hkl('hkl_vessel', _fourc_vessel, _dc)
h_vessel, k_vessel, l_vessel = hkl_vessel.h, hkl_vessel.k, hkl_vessel.l

print '- fourc_lowq & hkl_lowq'
LOWQ_OFFSET_ADDED_TO_DELTA_WHEN_READING = -8
_fourc_lowq = ScannableGroup('_fourc', (delta, th, chi, phi)) #I21DiffractometerStage('_fourc_lowq', m5tth, sa,delta_offset=LOWQ_OFFSET_ADDED_TO_DELTA_WHEN_READING)
fourc_lowq = DiffractometerScannableGroup('fourc_lowq', _dc, _fourc_lowq)
hkl_lowq = Hkl('hkl_lowq', _fourc_lowq, _dc)
h_lowq, k_lowq, l_lowq = hkl_lowq.h, hkl_lowq.k, hkl_lowq.l

print '- fourc_highq & hkl_highq'
highq_OFFSET_ADDED_TO_DELTA_WHEN_READING = 0
_fourc_highq = ScannableGroup('_fourc', (delta, th, chi, phi)) #I21DiffractometerStage('_fourc_highq', m5tth, sa,delta_offset=highq_OFFSET_ADDED_TO_DELTA_WHEN_READING)
fourc_highq = DiffractometerScannableGroup('fourc_highq', _dc, _fourc_highq)
hkl_highq = Hkl('hkl_highq', _fourc_highq, _dc)
h_highq, k_highq, l_highq = hkl_highq.h, hkl_highq.k, hkl_highq.l
 def setup_method(self):
     self.mock_dc_module = mock.Mock()
     self.mockSixc = mock.Mock(spec=DiffractometerScannableGroup)
     self.hkl = Hkl('hkl', self.mockSixc, self.mock_dc_module)
 def setup_method(self):
     TestHkl.setup_method(self)
     self.hkl = Hkl('hkl', self.mockSixc, self.mock_dc_module,
                    ['theta', '2theta', 'Bin', 'Bout', 'azimuth'])