C C C This code is distributed under the terms and conditions of the C CCP4 licence agreement as `Part 2' (Annex 2) software. C A copy of the CCP4 licence can be obtained by writing to the C CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. C C+++ orient.fh +++ C C C C Orientation block data C C This contains slots for all information that seems to be essential C at present. Each group of parameters is padded at the end for future C expansion. C C Data in the orientation block are referred to the "Cambridge" C laboratory axis frame: x along the (idealized) X-ray beam, z along C usual rotation axis E1 (omega on 3-axis system). Note that the C laboratory frame is essentially defined by the vectors e1,e2,e3 & C source. It doesn't really seem necessary to carry through a whole lot C of crystal and beam tensors, particularly as we have integrated C intensities at this stage, but maybe someone will want to, using the C allocated padding C C The general orientation equation is C C x = R M U B h C C where x position in laboratory frame C R goniostat matrix C M missetting angle matrix (if relevant, see MISFLG) C PhiZ PhiY PhiX (PHIXYZ) C U crystal orientation matrix UMAT C B cell orthogonalization matrix, derived from cell dimensions C h reflection indices C C Note that the description below is NOT is the same order as in the C common block, in which all the integers come before all the reals C (flagged as I or R in the description below) C CI NWORDS number of words in orientation block CI NINTGR number of integers (first part of block, C includes these counts) CI NREALS number of reals CI IORTYP type of orientation block (for possible future use, now = 0) CI INTPAD(9) padding for future use (integers) C C--- Information for this crystal C CR CELL(6) cell dimensions (A & degrees) CI LBCELL(6) refinement flags for cell dimensions CR UMAT(3,3) orientation matrix U. If MISFLG .gt. 0, U is the C "standard" setting when PhiXYZ ==0 CI MISFLG status of "missetting" angles PHIXYZ C = 0 PHIXYZ not used, all orientation in UMAT C = 1 1 set of missetting angles (PHIXYZ(I,1)) C = 2 2 sets PHIXYZ(I,J), J=1,2 CR PHIXYZ(3,2) missetting angles at beginning & end of rotation CI JUMPAX reciprocal axis closest to principle goniostat axis E1 C (only used for printing) CI NCRYST crystal number: a crystal may contain several batches CI LBSETID dataset number (this indexes a list of datasets in the C file header) CI LCRFLG type of crystal mosaicity information C (=0 for isotropic, =1 anisotropic) C *** CRYDAT(12) equivalenced to following *** CR ETAD reflection width (full width) (degrees) (if LCRFLG=0) C or CR ETADH,ETADV horizontal & vertical reflection width (if LCRFLG=1) CR rest of CRYDAT: padding for crystal information (eg more complicated C mosaicity model) C *** C C--- Information for this batch C CI LDTYPE type of data C = 1 oscillation data (2D spots) C = 2 area detector data (3D spots) C = 3 Laue data CR DATUM(3) datum values of goniostat axes, from which Phi is measured C (degrees) CR PHISTT,PHIEND start & stop values of Phi (degrees) relative to datum CR PHIRANGE range of Phi values: typically this will be PHIEND-PHISTT, C but storing this explicitly allows a distinction C eg between a rotation of +160 degrees from a rotation C of -200 degrees CI JSCAXS goniostat scan axis number (=1,2,3, or =0 for C multiple axis scan CR SCANAX(3) rotation axis in laboratory frame (not yet implemented: C only relevant if JSCAXS=0) CR TIME1, TIME2 start & stop times in minutes CI NBSCAL number of batch scales & Bfactors plus SD's C (4 at present, BSCALE, BBFAC & sd's) C set = 0 if batch scales unset CR BSCALE batch scale CR BBFAC batch temperature factor C corresponding scale is exp(-2 B (sin theta/lambda)**2) CR SDBSCL sd (Bscale) CR SDBFAC sd (BBfac) CR BATPAD(11) padding for batch information C C--- Crystal goniostat information C CI NGONAX number of goniostat axes (normally 1 or 3) CI E1(3),E2(3),E3(3) vectors (in "Cambridge" laboratory frame, see below) C defining the NGONAX goniostat axes CC GONLAB(3) names of the three goniostat axes CR GONPAD(12) padding for goniostat information C C--- Beam information C CR SOURCE(3) Idealized (ie excluding tilts) source vector C (antiparallel to beam), in "Cambridge" laboratory frame CR S0(3) Source vector (antiparallel ! to beam), in C "Cambridge" laboratory frame, including tilts CI LBMFLG flag for type of beam information following C = 0 for ALAMBD, DELAMB only (laboratory source) C = 1 ALAMBD,DELAMB,DELCOR,DIVHD,DIVVD (synchrotron) C (other options could include white beam) C *** BEMDAT(25) equivalenced to following *** CR ALAMBD Wavelength in Angstroms CR DELAMB dispersion Deltalambda / lambda. CR DELCOR Correlated component of wavelength dispersion. CR DIVHD Horizontal beam divergence in degrees. CR DIVVD Vertical beam divergence (may be 0.0 for isotropic beam C divergence. CR rest of BEMDAT: padding for beam information C (*** How much here for Laue? ***) C *** C C--- Detector information C CI NDET number of detectors (current maximum 2) C -- for each detector CR DXn crystal to detector distance (mm) CR THETAn detector tilt angle (=Madnes:tau2) (degrees) CR DETLMn(2,2) minimum & maximum values of detector coordinates (pixels) C (i,j): i = 1 minimum, = 2 maximum C j = 1 Xdet, = 2 Ydet C The exact detector frame is not important, but Ydet C should be the axis ~ parallel to the pricipal C rotation axis CR DETPAD(34) padding for detector information C C C Lengths: MBLENG is total length of block, MBLINT, MBLREA are numbers C of integers & reals INTEGER MBLENG,MBLINT,MBLREA PARAMETER (MBLENG=185,MBLINT=29,MBLREA=156) INTEGER NWORDS,NINTGR,NREALS,IORTYP,LCELL,MISFLG, . JUMPAX,NCRYST,LCRFLG,LDTYPE,JSCAXS,NBSCAL,NGONAX,LBMFLG, $ NDET,LBSETID,INTPAD REAL CELL,UMATR,PHXYZ,CRYDAT,ETAD,DATUM, $ PHISTT,PHIEND,PHIRANGE,SCANAX,TIME1,TIME2,GONPAD, $ BSCALE,BBFAC,SDSCAL,SDBB,BATPAD,E1,E2,E3, $ SOURCE,S0,BEMDAT,ALAMBD,DELAMB,DELCOR,DIVHD,DIVVD, $ DX1,THETA1,DETLM1,DX2,THETA2,DETLM2,DETPAD CHARACTER BTITLE*70, GONLAB*8 C COMMON /CORIEN/BTITLE,GONLAB(3) C COMMON /ORIENT/ NWORDS,NINTGR,NREALS,IORTYP,LCELL(6),MISFLG, . JUMPAX,NCRYST,LCRFLG,LDTYPE,JSCAXS,NBSCAL,NGONAX,LBMFLG, $ NDET,LBSETID,INTPAD(8), + CELL(6),UMATR(3,3),PHXYZ(3,2),CRYDAT(12),DATUM(3), $ PHISTT,PHIEND,SCANAX(3),TIME1,TIME2, $ BSCALE,BBFAC,SDSCAL,SDBB,PHIRANGE,BATPAD(11), $ E1(3),E2(3),E3(3), $ GONPAD(12),SOURCE(3),S0(3),BEMDAT(25), $ DX1,THETA1,DETLM1(2,2),DX2,THETA2,DETLM2(2,2),DETPAD(33) C C *** Note well the following equivalences: these are to allow for C alternative definitions of crystal mosaicity, beam parameters, etc EQUIVALENCE (ETAD,CRYDAT(1)) EQUIVALENCE (BEMDAT(1),ALAMBD) EQUIVALENCE (BEMDAT(2),DELAMB) EQUIVALENCE (BEMDAT(3),DELCOR) EQUIVALENCE (BEMDAT(4),DIVHD) EQUIVALENCE (BEMDAT(5),DIVVD) C *** c save /orient/, /corien/ C--- orient.fh ---