def usevessel(): _fourc.delta_scn = m5tth # note, if changed also update in _fourc_vessel constructor! setmin(delta, 0) setmax(delta, 150)
def usediode(): _fourc.delta_scn = diodetth setmin(delta, 0) setmax(delta, 180)
# fourc is created in diffcalc.gdasupport.you. Add some I21 hints into it fourc.hint_generator = _fourc.get_hints # (the callablemethod) # @UndefinedVariable if GDA: print "Running in GDA --- aliasing commands" alias_commands(globals()) ### Load the last ub calculation used from diffcalc.ub.ub import lastub lastub() ### Set i21 specifi limits print "INFO: diffcalc limits set in $diffcalc/startup/i21.py taken from http://confluence.diamond.ac.uk/pages/viewpage.action?pageId=51413586" setmin(delta, 0) setmax(delta, 150) #defult to m5tth limits setmin(chi, 60) setmax(chi, 135) setmin(eta, 0) setmax(eta, 360) setmin(phi, -179) setmax(phi, 179) #http://jira.diamond.ac.uk/browse/I21-361 setcut(eta, 0.0) setcut(phi, -180) print "Current hardware limits set to:" hardware() ### 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.
def usevessel(): _fourc.delta_scn = m5tth setmin(delta, 0) setmax(delta, 150)
# Configure and import diffcalc objects settings.hardware = DummyHardwareAdapter(('mu', 'delta', 'gam', 'eta', 'chi', 'phi')) settings.geometry = SixCircle() # @UndefinedVariable # These must be imported AFTER the settings have been configured from diffcalc.dc import dcyou as dc from diffcalc.ub import ub from diffcalc import hardware from diffcalc.hkl.you import hkl # Set some limits hardware.setmin('gam', -179) hardware.setmax('gam', 179) # These demos reproduce the outline in the developer guide def demo_all(): demo_orient() demo_motion() def demo_orient(): ub.listub() # Create a new ub calculation and set lattice parameters ub.newub('test') ub.setlat('cubic', 1, 1, 1, 90, 90, 90)