Home

Letter - OpenGDA

image

Contents

1. now be read up from angle settings the easy direction gt gt gt pos hkl hkl h 0 00000 k 1 00000 1 0 00000 gt gt gt pos hklverbose hklverbose h 0 00000 k 1 00000 1 0 00000 theta 30 00000 qaz 90 00000 alpha 0 00000 naz 0 00000 tau 90 00000 psi 90 00000 beta 0 00000 Before calculating the settings to reach an hkl position the trickier direction hardware limits must be set and combi nation of constraints chosen The constraints here result in a four circle like mode with a vertical scattering plane and incident angle alpha equal to the exit angle beta gt gt gt con qaz 90 2 more constraints required qaz 90 0000 gt gt gt con a eq b 1 more constraint required qaz 90 0000 a eq b gt gt gt con mu 0 qaz 90 0000 a eq b mu 0 0000 To check the constraints gt gt gt con DET REF SAMP delta gt a_eq_b gt mu alpha eta gaz beta chi naz psi phi mu is nu qaz 90 0000 a eq b mu 0 0000 4 9 Motion 15 Diffcalc Developer Guide Release 1 0 Type help con for instructions Limits can be set to help or in somfe cases alow Diffcalc choose a solution gt gt gt setmin delta 0 gt gt gt setmin chi 0 The hkl scannable can now be moved which will in turn move sixc and the underlying motors mu delta nu eta chi and phi gt gt gt pos hkl dd 1 0 0 hkl h 1 00000 k 0 00000 1 0 00000 gt gt gt si
2. type geometries J Appl Cryst 1998 31 198 203 pdf link Willmott2011 C M Schlepiitz S Mariager S A Pauli Feidenhans and P R Willmott Angle calculations for a 2 3 type diffractometer focus on area detectors J Appl Cryst 2011 44 73 83 pdf link 29
3. type of calculation were laid by by Busing amp Levi in their classic paper Busing1967 Diffcalc s orientation algorithm is taken from this paper Busing amp Levi also provided the original definition of the coordinate frames and of the U and B matrices used to describe a crystal s orientation and to convert between Cartesian and reciprical lattice space Geometry plugins are used to adapt the six circle model used internally by Diffcalc to apply to other diffractometers These contain a dictionary of the missing angles which Diffcalc uses to constrain these angles internally and a methods to map from external angles to Diffcalc angles and visa versa Options to use Diffcalc The Quick Start Python API section describes how to run up only the core in Python or IPython This provides a base option for system integration The Quick Start Scanning section describes how to start Diffcalc in Python in a way that provides a scan command and that also exposes user level commands to the root namespace This does not provide motor control but does provide dummy software motor objects that could be easily replaced with real implementations for EPICS or TANGO for example The Quick start OpenGDA section describes how to start Diffcalc within the Jython interpreter of an OpenGDA server OpenGDA provides a scan command a system for controlling motors and also a way to alias user level commands so that brackets and commas need not be
4. 0000 30 6573 0 0000 78 6901 0 53991 0 40000 1 00000 0 00000 0 0000 65 1654 0 0000 32 5827 0 0000 68 1986 0 00134 0 60000 1 00000 0 00000 0 0000 71 3371 0 0000 35 6685 0 0000 59 0362 0 00134 0 80000 1 00000 0 00000 0 0000 79 6302 0 0000 39 8151 0 0000 51 3402 0 53991 1 00000 1 00000 0 00000 0 0000 90 0000 0 0000 45 0000 0 0000 45 0000 3 98942 Rotate about the hk12101 reflection while counting a counter timer for 1s and reporting the three unconstraied sample angles gt gt gt con psi qaz 90 0000 psi mu 0 0000 gt gt gt scan psi 0 90 10 hkl 1 0 1 eta chi phi ct 1 psi eta chi phi h k 1 Gt 0 00000 0 0000 290 0000 290 0000 1 00000 0 00000 1 00000 0 39894 10 00000 0 4385 82 9470 82 8929 1 00000 0 00000 1 00000 0 39894 20 00000 1 7808 76 0046 75 5672 1 00000 0 00000 1 00000 0 39894 30 00000 4 1066 69 2952 67 7923 1 00000 0 00000 1 00000 0 39894 40 00000 7 5463 62 9660 59 3179 1 00000 0 00000 1 00000 0 39894 50 00000 12 2676 57 2022 49 8793 1 00000 0 00000 1 00000 0 39894 60 00000 18 4349 52 2388 39 2315 1 00000 0 00000 1 00000 0 39894 70 00000 26 1183 48 3589 27 2363 1 00000 0 00000 1 00000 0 39894 80 00000 35 1489 45 8640 14 0019 1 00000 0 00000 1 00000 0 39894 90 00000 45 0000 45 0000 0 0000 1 00000 0 00000 00000 0 39894 4 10 Scanning 17 Diffcalc Developer Guide Release 1 0 18 Chapter 4 Quick Start Scanning CHAPTER FIVE QUICK START OPENGDA 5 1 Install Copy th
5. addas tie x Adoos eigener d 14 49 Motom decs ede F e RUE Bs oe Te e UR E Eus 15 2 10 Scanning 24 54 8b4 4 8084 wo Roe X X boh m n Roh nox qe Ebo ORE Kok e 16 5 Quick start OpenGDA 19 S l nstall i Sets gh a Reo m Rep two Ree Ios A AUR RR RR Den eR p es 8 19 2 2 Start diticale se g 4 Oe cech y Ue E OR ae i 19 6 Development 23 7 Thanks 25 8 Indices and tables 27 Bibliography 29 Diffcalc Developer Guide Release 1 0 Author Rob Walton Contact rob walton at diamond dot ac dot uk Website http www opengda org Diffcalc A diffraction condition calculator for diffractometer control CONTENTS 1 Diffcalc Developer Guide Release 1 0 2 CONTENTS CHAPTER ONE INTRODUCTION Diffcalc is a diffraction condition calculator used for controlling diffractometers within reciprocal lattice space It performs the same task as the fourc sixc twoc kappa psic and surf macros from SPEC Diffcalc s standard calculation engine is an implementation of You1999 The first versions of Diffcalc were based on Vlieg1993 and Vlieg1998 and a Vlieg engine is still available The You engine is more generic and the plan is to remove the old Vlieg engine once beamlines have been migrated New users should use the You engine The foundations for this
6. alc Developer Guide Release 1 0 ipython i example startup sixcircle api py gt gt gt demo all Alternatively start Python or IPython and cut and paste lines from the rest of this tutorial python ipython 3 3 Configure a diffraction calculator To setup a Diffcalc calculator gt gt gt from diffcalc hkl you geometry import SixCircle gt gt gt from diffcalc hardware import DummyHardwareAdapter gt gt gt from diffcalc diffcalc import create diffcalc gt gt gt hardware DummyHardwareAdapter mu delta nu eta chi phi gt gt gt dc create diffcalc you SixCircle hardware The hardware adapter is used by Diffcalc to read up the current angle settings wavelength and axes limits It is primarily used to simplify commands for end users It could be dropped for this API use but it is also used for the important job of checking axes limits while choosing solutions Geometry plugins are used to adapt the six circle model used internally by Diffcalc to apply to other diffractometers These contain a dictionary of the missing angles which Diffcalc internally uses to constrain these angles and a methods to map from external angles to Diffcalc angles and visa versa 3 4 Getting help To get help for the orientation phase the angle calculation phase and the dummy hardware adapter commands gt gt gt help dc ub gt gt gt help dc hkl gt gt gt help hardware 3 5 Orientati
7. e Diffcalc folder into the gda root folder i e so it sits alongside plugins thirdparty etc 5 2 Start diffcalc Diffcalc is started from the command line or it can be started in localStation automatically To start a dummy sixcircle installation gt gt gt diffcalc path gda data PathConstructor createFromProperty gda root split plugins 0 diffcalc gt gt gt execfile diffcalc path example startup sixcircle dummy py scratch ws 8 A4 diffcalc added to GDA Jython path Created DummyPD alpha Created DummyPD delta Created DummyPD gamma Created DummyPD omega Created DummyPD chi Created DummyPD phi Created diffractometer scannable sixc Created dummy energy scannable Set dummy energy to 1 Angstrom Created wavelength scannable wl Created hkl scannable hkl Created hkl component scannables h 1 Created verbose hkl scannable hklverbose Reports virtual angles 2theta Bin Bout azimuth Created parameter scannable phi par Created parameter scannable alpha par Created parameter scannable oopgamma Created parameter scannable betaout Created parameter scannable azimuth Created parameter scannable betain Created parameter scannable blw Aliased command addref Aliased command autosector Aliased command calcub Aliased command checkub Aliased command dcversion 19 Diffcalc Developer Guide Release 1 0 Aliased command delref Aliased command editref Alias
8. ed command handleInputError Aliased command helphkl Aliased command helpub Aliased command hklmode Aliased command listub Aliased command loadub Aliased command mapper Aliased command newub Aliased command raiseExceptionsForAllErrors Aliased command saveubas Aliased command sector Aliased command setcu Aliased command setla Aliased command setmax Aliased command setmin Aliased command setpar Aliased command setu Aliased command setub Aliased command showref Aliased command sigtau Aliased command sim Aliased command swapref Aliased command trackalpha Aliased command trackgamma Aliased command trackphi Aliased command transforma Aliased command transformb Aliased command transformc Aliased command ub Aliased command diffcalcdemo Try the following newub cubic setlat cubic 1 1 1 90 90 90 pos wl 1 pos sixc 0 900 45 45 0 addref 10 1 pos phi 90 addref 0 11 checkub ub hklmode Or type diffcalcdemo to run this script Caution will move the diffractometer Added objects methods to namespace gamma trackalpha phi diffcalc object editref transformc newub setub setpar transforma setu off autosector dcversion betaout sector swapref showref setmin trackgamma ub oopgamma transformb handleInputError 1 listub chi manual helpub helphkl azimuth wl setlat sim trackphi alpha sigtau omega raiseExceptionsForAllErrors saveuba
9. g diffcalc without the additional functionality described in Quick Start Scanning or Quick start OpenGDA provides a good way to understand how the code is structured It also provides an API which could be used to integrate Diffcalc into an existing data acquisition system although the interface described in Quick Start Scanning would normally provide a better starting point For a full description of what Diffcalc does and how to use it please see the Diffcalc user manual 3 1 Setup environment Change directory to the diffcalc project python adds the current working directory to the path cd diffcalc ls COPYING diffcalc doc example mock py mock pyc model numjy test If using Python make sure numpy and diffcalc can be imported Python 2 7 2 default Oct 4 2011 20 06 09 GCC 4 6 1 on linux2 Type help copyright credits or license for more information gt gt gt import numpy gt gt gt import diffcalc If using Jython make sure Jama and diffcalc can be imported jython Dpython path diffcalc root path to Jama Jama 1 0 1 jar Jython 2 2 1 on javal 5 0 11 Type copyright credits or license for more information gt gt gt import Jama gt gt gt import diffcalc 3 2 Start With Python start the sixcircle api py example startup script notice the i and m and type demo a11 python i m example startup sixcircle api gt gt gt demo all Or with IPython Diffc
10. gt dc checkub ENERGY H K L H COMP K COMP 1 COMP TAG 1 12 3984 1 00 0 00 0 00 1 0000 0 0000 0 0000 2 12 3984 0 00 1 00 0 00 0 0000 1 0000 0 0000 3 6 Motion positions and virtual angles can now be read up from angle settings the easy direction gt gt gt dc angles to hkl1 0 60 0 30 Osp O energy from hardware Clu 00 0 0 alpha 0 0 beta 0 0 naz 0 0 Posi 90 0 5 90 0 90 0 theta 29 999999999999996 Before calculating the settings to reach an hkl position the trickier direction hardware limits must be set and combi nation of constraints chosen The constraints here result in a four circle like mode with a vertical scattering plane and 3 6 Motion 9 Diffcalc Developer Guide Release 1 0 gt incident angle alpha equal to the exit angle beta gt gt gt dc hkl con qaz 90 2 more constraints required qaz 90 0000 gt gt gt dc hkl con a eq 1 more constraint required qaz 90 0000 a eq b gt gt gt dc hkl con mu 0 qaz 90 0000 a eq b mu 0 0000 To check the constraints gt gt gt do hkl con DET REF SAMP delta gt a_eq_b gt mu alpha eta qaz beta chi naz psi phi mu is nu qaz 90 0000 a eq b mu 0 0000 Type help con for instructions Limits can be set to help Diffcalc choose a solution gt gt gt hardware set lower limit delta 0 used when cho
11. information gt gt gt import numpy gt gt gt import diffcalc If using Jython make sure Jama and diffcalc can be imported jython Dpython path diffcalc root path to Jama Jama 1 0 1 jar Jython 2 2 1 on javal 5 0 11 Type copyright credits or license for more information gt gt gt import Jama gt gt gt import diffcalc 11 Diffcalc Developer Guide Release 1 0 4 3 Start With Python start the sixcircle api py example startup script notice the i and m and type demo a11 python i m example startup sixcircle gt gt gt demo all gt gt gt demo scan Or with IPython ipython i example startup sixcircle py gt gt gt demo all gt gt gt demo scan Alternatively start Python or IPython and cut and paste lines from the rest of this tutorial python ipython 4 4 Configure a diffraction calculator and Scannables Create some dummy motor Scannables and an energy Scannable gt gt gt from diffcalc gdasupport minigda scannable import SingleFieldDummyScannable gt gt gt mu SingleFieldDummyScannable mu gt gt gt delta SingleFieldDummyScannable delta gt gt gt nu SingleFieldDummyScannable nu gt gt gt eta SingleFieldDummyScannable eta gt gt gt chi SingleFieldDummyScannable chi gt gt gt phi SingleFieldDummyScannable phi gt gt gt en SingleFieldDummyScannable en I
12. ncrease the priority of the energy scnannable so that it will be moved before hk 1 in scans see below gt gt gt en level 3 Build a Diffcalc calculator and associated Scannables and user level commands gt gt gt from diffcalc gdasupport factory import create_objects gt gt gt virtual angles theta qaz alpha naz tau psi beta gt gt gt objects create objectsq engine name you geometry sixc axis scannable list mu delta nu eta chi phi energy scannable en hklverbose virtual angles to report virtual angles simulated crystal counter name ct Add these to the root namespace for easy interactive use gt gt gt from diffcalc gdasupport factory impor add objects to namespace gt gt gt add objects to namespace objects globals gt gt gt gt gt gt Added objects methods to namespace gt gt gt addref alpha beta c2th calcub checkub chi par con 12 Chapter 4 Quick Start Scanning Diffcalc Developer Guide Release 1 0 gt gt gt ct dc delref delta par editref eta par h hardware hkl gt gt gt hklverbose 1 listub loadub mu par naz newub nu par gt gt gt phi par psi qaz saveubas setcut setlat setmax setmin gt gt gt setu setub showref sigtau sim sixc swapref trialub ub gt gt gt uncon wl gt gt gt This is equivilent to globals extend _objects but checks for names
13. nge directory into the test folder and run nosetests Ran 3914 tests in 9 584s OK SKIP 15 23 Diffcalc Developer Guide Release 1 0 24 Chapter 6 Development CHAPTER SEVEN THANKS I would like to acknowledge the people who have made a direct impact on the Diffcalc project knowingly or not in terms of encouragement suggestions criticism bug reports code contributions and related projects Names are ordered alphabetically by surname Allesandro Bombardi Mark Booth Busing Steve Collins Levy Martin Lohmier Chris Nicklin Elias Vlieg writer of DIF software used as a model for Diffcalc Robert Walton You Thank you Rob Walton 25 Diffcalc Developer Guide Release 1 0 26 Chapter 7 Thanks CHAPTER EIGHT INDICES AND TABLES 27 Diffcalc Developer Guide Release 1 0 28 Chapter 8 Indices and tables BIBLIOGRAPHY You1999 You Angle calculations for a 4S 2D six circle diffractometer J Appl Cryst 1999 32 614 623 pdf link Busing1967 W R Busing and H A Levy Angle calculations for 3 and 4 circle X ray and neutron diffractometers Acta Cryst 1967 22 457 464 pdf link Vlieg1993 Martin Lohmeier and Elias Vlieg Angle calculations for a six circle surface x ray diffractometer J Appl Cryst 1993 26 706 716 pdf link Vlieg1998 Elias Vlieg A 2 3 type surface diffractometer mergence of the z axis and 2 2
14. on To orient the crystal for example see the user manual for a fuller tutorial first find some reflections gt gt gt Create a new ub calculation and set lattice parameters gt gt gt dc ub newub test gt gt gt dc ub setlat cubic 1 1 1 90 90 90 gt gt gt Add 1st reflection 35 gt CEL 0 0 energy from hardware 60 gt gt gt hardware position 0 60 0 30 0 0 mu del nu eta chi phi gt gt gt dc ub addref 1 0 0 energy and pos from hardware gt gt gt Add 2nd reflection gt gt gt dc ub addref 0 1 0 0 60 0 30 0 90 en Calculating UB matrix 8 Chapter 3 Quick Start Python API Diffcalc Developer Guide Release 1 0 To check the state of the current UB calculation gt gt gt dc ub ub UBCALC name test CRYSTAL name cubic ay by 1 00000 1 00000 1 00000 90 00000 90 00000 90 00000 B matrix 6 28319 0 00000 0 00000 0 00000 6 28319 0 00000 0 00000 0 00000 6 28319 UB MATRIX U matrix 1 00000 0 00000 0 00000 0 00000 1 00000 0 00000 0 00000 0 00000 1 00000 UB matrix 6 28319 0 00000 0 00000 0 00000 6 28319 0 00000 0 00000 0 00000 6 28319 REFLECTIONS ENERGY H K L MU DELTA NU ETA CHI PHI TAG 112 398 1 00 0 00 0 00 0 0000 60 0000 0 0000 30 0000 0 0000 20 0000 2 12 398 0 00 1 00 0 00 0 0000 60 0000 0 0000 30 0000 0 0000 90 0000 And finally to check the reflections were specified acurately gt gt
15. osing solution Angles and virtual angles are then easily determined for a given hkl reflection gt gt gt dc hkl to angles 1 0 0 energy from hardware 0 0 60 0 0 0 30 0 0 0 0 0 alpha 0 0 beta 0 0 Qa 0y psi 90 0 90 0 tau 90 0 theta 30 0 10 Chapter 3 Quick Start Python API CHAPTER FOUR QUICK START SCANNING This section describes how to start Diffcalc in Python in a way that provides a scan command and that also exposes user level commands to the root namespace This does not provide motor control but does provide dummy software motor objects that could be easily replaced with real implementations for EPICS or TANGO for example The dummy software objects operate through a Scannable interface compatable with the OpenGDA s gda device Scannable inter face For a full description of what Diffcalc does and how to use it please see the Diffcalc user manual 4 1 Introduction to Scannables Scannables are objects that can be operated by a scan or pos command 4 2 Setup environment Change directory to the diffcalc project python adds the current working directory to the path cd diffcalc ls COPYING diffcalc doc example mock py mock pyc model numjy test If using Python make sure numpy and diffcalc can be imported Python 2 7 2 default Oct 4 2011 20 06 09 GCC 4 6 1 on linux2 Type help copyright credits or license for more
16. pace collisions and does some re porting 4 5 Import pos and scan commands To create a pos command for moving Scannables and a scan command for scannig them gt gt gt from diffcalc gdasupport minigda import command gt gt gt pos command Pos globals gt gt gt scan command Scan command ScanDataPrinter 4 6 Introduction to pos and scan The pos command can be used to check the position of all scannables gt gt gt pos sixc mu 0 0 delta 0 0 nu 0 0 eta 0 0 chi 0 0 phi 0 0 alpha Error alpha To check the position of a single scannable gt gt gt pos phi phi 0 0 gt gt gt phi alternatively phi 0 0 gt gt gt phi 100 call to get number 100 To move a scannable gt gt gt pos phi 5 phi 5 0000 To perform a basic and not very useful scan for example gt gt gt scan phi 0 50 10 chi 5 eta Fri Mar 16 10 02 37 2012 phi delta 0 0000 0 0000 0 0000 0 0000 20 0000 0 0000 30 0000 0 0000 40 0000 0 0000 4 5 Import pos and scan commands 13 Diffcalc Developer Guide Release 1 0 4 7 Getting help To get help for the orientation phase the angle calculation phase and the dummy hardware adapter commands gt gt gt help ub gt gt gt help hk1 4 8 Orientation To orient the crystal for example see the user manual for a fuller tutorial first find some reflections gt gt gt gt gt gt newub test gt g
17. s DIFFCALC Diffcalc Developer Guide Release 1 0 Diamond Light Source December 10 2015 CONTENTS 1 Introduction 3 2 Project Files amp Directories 5 3 Quick Start Python API 7 3 1 Setupenvionment s s siso aiok ase eee bea Ad UE RR Red dep mos s 7 3 2 UL Re Bele eee al Go ee 7 3 3 Configure a ditfracuon calculator s 26k 8 JA Getting help RR eddie USOS Rod be ae p hea eg pod ke ko ATE 8 3 9 Ortentatiol 2 doeet see Se em scs e di deem duret eas Susie exe ted eg 8 36 Moton SE Re Ex EA ee ee ee UR ICM 9 4 Quick Start Scanning 11 4 1 Introduction to Scannables 225 2 mk ok om ym m ye on dm RR oS PR 11 42 Setupenvironment ono seio eoe Seule ee 8 eee d 11 4 3 Staffe one Heda me o URP XD Reka ei ek eR ADU S Rog OR M A 12 4 4 Configure a diffraction calculator and Scannables ee ee 12 45 Importposand scan commands 4 5a ao Rer m PRX Y Rege y SORTE E 13 4 6 Introduction to pos and scan 2 044 2 2559 24658 24 5 294 Y x 9 4 9 b 9 X Xe oe b om og 13 47 Getting help us oe Boe RU ARE E Eos S 14 48 OrnentgHon Ana veto Nu Gade ch Bee Re do due quus
18. s delref hklmode calcub blw k setcut en diffcalcdemo sixc hklverbose addref h delta betain setmax auto checkub hkl mapper on loadub phi par alpha par Notice that this example script creates dummy scannables for the six axes and energy To use preexisting scannables modify 20 Chapter 5 Quick start OpenGDA Diffcalc Developer Guide Release 1 0 diffcalcObjects createDiffcalcObjects dummyAxisNames alpha delta gamma omega chi phi dummyEnergyName en geometryPlugin sixc hklverboseVirtualAnglesToReport 2theta Bin Bout azimuth demoCommands demoCommands Lost diffcalcObjects createDiffcalcObjects axisScannableList alpha delta gamma omega chi phi energyScannable en geometryPlugin sixc hklverboseVirtualAnglesToReport 2theta Bin Bout azimuth demoCommands demoCommands Check out the user manual doc user manual html Also type diffcalcdemo to run the example session displayed above 5 2 Start diffcalc 21 Diffcalc Developer Guide Release 1 0 22 Chapter 5 Quick start OpenGDA CHAPTER SIX DEVELOPMENT The files are kept here on github See bootcamp for an introduction to using github To contribute please fork the project Otherwise you can make a read only clone or export Code format should follow pep8 guidelines PyDev has a good pep8 checker To run the tests install nose cha
19. t gt setlat cubic 1 1 1 90 90 90 gt gt gt Add Ist reflection gt gt gt pos wl 1 gt gt gt c2th 1 0 0 60 gt gt gt pos sixc 0 60 0 30 0 0 Sixc mu 0 0 delta 60 0 nu 0 0 eta gt gt gt addref 1 0 0 gt gt gt Add 2nd reflection gt gt gt pos phi 90 gt gt gt addref 0 1 0 Calculating UB matrix To check the state of the current UB calculation gt gt gt ub UBCALC name test CRYSTAL name cubic ay 1 00000 1 00000 1 00000 90 00000 290 00000 90 00000 B matrix 6 28319 0 00000 0 00000 0 00000 6 28319 0 00000 0 00000 0 00000 6 28319 UB MATRIX U matrix 1 00000 0 00000 0 00000 0 00000 1 00000 0 00000 0 00000 0 00000 1 00000 UB matrix 6 28319 0 00000 0 00000 0 00000 6 28319 0 00000 0 00000 0 00000 6 28319 30 0 chi Create a new ub calculation and set lattice parameters 0 0 phi 0 0 14 Chapter 4 Quick Start Scanning Diffcalc Developer Guide Release 1 0 REFLECTIONS ENERGY H K L MU DELTA NU ETA CHI PHI TAG 112 398 1 00 0 00 0 00 0 0000 60 0000 0 0000 30 0000 0 0000 0 0000 2 12 398 0 00 1 00 0 00 0 0000 60 0000 0 0000 30 0000 0 0000 90 0000 And finally to check the reflections were specified acurately gt gt gt checkub ENERGY H K L H COMP K COMP 1 COMP TAG 1 12 3984 1 00 0 00 0 00 1 0000 0 0000 0 0000 2 12 3984 0 00 1 00 0 00 0 0000 1 0000 0 0000 4 9 Motion positions and virtual angles can
20. typed e g typing gt gt gt addref 1 0 0 calls from the root namespace gt gt gt addref 1 0 0 Diffcalc will work with Python 2 5 or higher with numpy or with Jython 2 5 of higher with Jama The very small Willmott engine currently handles the case for surface diffraction where the surface normal is held vertical Willmott201 1 The You engine handles this case fine but currently spins nu into an unhelpful quadrant We hope to remove the need for this engine soon Diffcalc Developer Guide Release 1 0 4 Chapter 1 Introduction CHAPTER TWO PROJECT FILES amp DIRECTORIES diffcalc The main source package test Diffcalcs unit test package use Nose to run them numjy very minimal implentation of numpy for jython It supports only what Diffcalc needs doc The documentation is written in reStructuredText and can be compiled into html and pdf using Python s Sphinx With Sphinx installed use make clean 11 from within the user and developer guide folders to build the documentation doc references Includes links to relevant papers example Example startup scripts model Vrml models of diffractometers and a hokey script for animating then and controlling them from diffcalc Diffcalc Developer Guide Release 1 0 6 Chapter 2 Project Files amp Directories CHAPTER THREE QUICK START PYTHON API This section describes how to run up only the core in Python or IPython Startin
21. xc sixc mu 0 0 delta 60 0 nu 0 0 eta 30 0 chi 0 0 phi 0 0 gt gt gt hkl hkl hkl 1 0000 0 0000 0 0000 alpha 0 0 beta 0 0 naz t 0 0 psi 90 0 qaz 90 0 tau s 90 0 theta 30 0 Alternatively h k and 1 can moved gt gt gt pos k 1 k 1 00000 gt gt gt hkl hkl hkl 1 0000 1 0000 0 0000 alpha 0 0 beta 0 0 naz 0 0 psi 4 90 0 qaz 90 0 tau 90 0 theta 45 0 4 10 Scanning Scannables can be moved in very generic ways to construct many types of scan Scan delta through hkl 100 while counting a counter timer ct for 1s and reporting the resulting hkl position 16 Chapter 4 Quick Start Scanning Diffcalc Developer Guide Release 1 0 gt gt gt pos hkl 1 0 0 hkl h 1 00000 k 0 00000 1 0 00000 gt gt gt scan delta 40 80 10 hkl ct 1 delta h k 1 ct 40 0000 0 67365 0 11878 0 00000 0 00959 50 0000 0 84202 0 07367 0 00000 0 87321 60 0000 1 00000 0 00000 0 00000 3 98942 70 0000 1 14279 0 09998 0 00000 0 87321 80 0000 1 26604 0 22324 0 00000 0 00959 Scan h from hkl 010 to hkl 110 while counting a counter timer for 1s and reporting h and and all the axes postions gt gt gt pos hkl 0 1 0 hkl h 0 00000 1 00000 1 0 00000 gt gt gt Scanih D 1 2 Ky l SZLXC GU 1 h k 1 mu delta nu eta chi phi ct 0 00000 1 00000 0 00000 0 0000 60 0000 0 0000 30 0000 0 0000 90 0000 3 98942 0 20000 1 00000 0 00000 0 0000 61 3146 0

Download Pdf Manuals

image

Related Search

Related Contents

tb 0359.super soie idem  Smeg KD150X-1 cooker hood  競 技 規 則 - 日本トライアスロン連合  GE 840102700 User's Manual  GE Rotary Control Valves masoneilan 39004 series Technical Specifications  PMA-SX11 / DCD-SX11  Lire la convention - Demeure historique  

Copyright © All rights reserved.
Failed to retrieve file