예제 #1
0
CREATE_DUMMY_AXES = False
if CREATE_DUMMY_AXES:
    print "!!! Starting dummy diffcalc with tth, th, chi, phi and en."
    tth = DummyPD('tth')
    th = DummyPD('th')
    en = DummyPD('en')
    en(1500)
    diffcalc_energy = en
else:
    print "!!! Starting LIVE diffcalc with th(dd2th), th(ddth), chi(dummy), phi(dummy) and denergy."
    tth = dd2th
    th = ddth
    diffcalc_energy = denergy

chi = DummyPD('chi')
phi = DummyPD('phi')

diffcalcObjects = create_objects(
    axis_scannable_list=[tth, th, chi, phi],
    energy_scannable=diffcalc_energy,
    energy_scannable_multiplier_to_get_KeV=.001,
    geometry='fourc',
    hklverbose_virtual_angles_to_report=('2theta', 'Bin', 'Bout', 'azimuth'))

#demoCommands = []
#diffcalcObjects['diffcalcdemo'].commands = demoCommands
add_objects_to_namespace(diffcalcObjects, globals())

hkl.level = 6
예제 #2
0
#rpenergy = DummyPD('rpenergy')
#rpenergy.moveTo(12398.42)
#exec('del tth, th, chi, phi')
CREATE_DUMMY_AXES = False
if CREATE_DUMMY_AXES:
	print "Creating Dummy Axes: tth, th, chi, phi and rpenergy"
	tth = DummyPD('tth'); tth.setLowerGdaLimits(-80); tth.setUpperGdaLimits(260)
	th  = DummyPD('th');th.setLowerGdaLimits(-100); th.setUpperGdaLimits(190)
	chi = DummyPD('chi'); chi.setLowerGdaLimits(86); chi.setUpperGdaLimits(94)
	phi = DummyPD('phi')
	rpenergy = DummyPD('rpenergy')
	rpenergy.moveTo(12398.42)
	print "Moved rpenergy to 12398.42 eV (1 Angstrom)"
	chi.moveTo(90)
	print "Moved chi to 90"
	print "="*80

diffcalcObjects = create_objects(
	axis_scannable_list = (tth, th, chi, phi),
	energy_scannable = denergy,
	energy_scannable_multiplier_to_get_KeV = .001,
	geometry = 'fourc',
	hklverbose_virtual_angles_to_report=('2theta','Bin','Bout','azimuth'),
	demo_commands = demoCommands
)
diffcalcObjects['alpha_par'] = diffcalcObjects['alpha']
del diffcalcObjects['alpha']
diffcalcObjects['diffcalcdemo'].commands = demoCommands
add_objects_to_namespace(diffcalcObjects, globals())
예제 #3
0
en = SingleFieldDummyScannable('en')
en.level = 3

virtual_angles = ('theta', 'qaz', 'alpha', 'naz', 'tau', 'psi', 'beta')
_objects = create_objects(
    engine_name='you',
    geometry='sixc',
    axis_scannable_list=(mu, delta, gam, eta, chi, phi),
    energy_scannable=en,
    hklverbose_virtual_angles_to_report=virtual_angles,
    simulated_crystal_counter_name='ct',
#    demo_commands=_demo
    )

#_objects['diffcalcdemo'].commands = demoCommands
add_objects_to_namespace(_objects, globals())

from diffcalc.gdasupport.minigda import command
pos = command.Pos(globals())
scan = command.Scan(command.ScanDataPrinter())
print '=' * 80

#def help_hkl():
#    print hkl.__doc__
#
#alias('help_hkl')


def demo_all():

    print "ORIENT\n"