The following sets of routines are available:
Creating and Handling a Laue Simulations View-Object
The following routines are available:
Create a Laue simulation view-object - xdl_laue_sim
Calculate size requirements - xdl_laue_sim_getsize
Display a new simulation - xdl_laue_sim_new
Fortran call: CALL XDLF_LAUE_SIM (IVH, IVHPARENT, IX, IY, ICSET, ITYPE, ISIZE, + NSPOT, IHKL, XF, YF, ALAM, DTHR, MULTI,FLAGS, + NODHKLS, IDXLAM, IDXDMIN, IDXNOD, FILMR, + GNOMR, ALMIN, ALMAX, DMIN, D_LMIN, D_LMAX, + D_DMIN, CELL, PHIS, LATT, CTOF, + MINW, MINH, IERR)
Parameters: IVH (R) View-object handle (see vh) IVHPARENT (R) View-object handle for parent 0=none (see vh_parent) IX (R) X position (may be -1 if no parent) (see x) IY (R) Y position (may be -1 if no parent) (see y) ICSET (R) Colorset number (see cset) ITYPE (R) Simulation type =1 Colour, = 2 Monochrome with soft limits options etc. (see type) ISIZE (R) Half width/height for displayed pattern in pixels (see size) NSPOT (R) Number of spots predicted (see nspot) IHKL (R) Array of NSPOT packed indices (see hkl) XF (R) Array of NSPOT 'xf' coordinates (see xf) YF (R) Array of NSPOT 'yf' coordinates (see yf) ALAM (R) Array of NSPOT lambda values (see lam) DTHR (R) Array of NSPOT (1/dmin)**2 thresholds (see dthr) MULTI (R) Array of NSPOT multiplicict data flags (see multi) FLAGS (R) Array of NSPOT reflection flags (see flags) NODHKLS (R) Array of NSPOT packed nodal indices (see nodhkls) IDXLAM (R) Index array for lambda sorted data; NSPOT values from 1 to NSPOT (see idxlam) IDXDMIN (R) Index array for dmin sorted data; NSPOT values from 1 to NSPOT (see idxdmin) IDXNOD (R) Index array for packed nodal index values (see idxnod) FILMR (R) Pattern radius in mm (see filmr) GNOMR (R) Minimum radius in mm (>0.1) from image centre for conversion of plot to a gnomonic projection. For a normal Laue simulation, give a value of 0.0 ALMIN (R) Lambda minimum of prediction (see lmin) ALMAX (R) Lambda maximum of prediction (see lmax) DMIN (R) Dmin value of prediction (see dmin) D_LMIN (R) Interval for lambda-min slider (see d_lmin) D_LMAX (R) Interval for lambda-max slider (see d_lmax) D_DMIN (R) Interval for dmin slider (see d_dmin) CELL (R) Array of the 6 real cell dimensions (see cell) PHIS (R) Array of 4 setting angles, Phix, Phiy, Phiz and spindle (see phis) LATT (R) 4 integer array; crystal system, lattice type, rotation axis, beam axis (see latt) CTOF (R) Crystal to film distance (mm) (see ctof) MINW (R) Minimum width for view-object or 0 (see min_width) MINH (R) Minimum height for view-object or 0 (see min_height) IERR (W) Returns status from xdl_laue_sim call
'C' call: int xdl_laue_sim (int vh, int vh_parent, int x, int y, int cset, int type, int size, int nspot, int * hkl, float * xf, float * yf, float * lam, float * dthr, int * multi, int * flags, int * nodhkls, int * idxlam, int * idxdmin, int * idxnod, float filmr, float gnomr, float lmin, float lmax, float dmin, float d_lmin, float d_lmax, float d_dmin, float * cell, float * phis, int * latt, float ctof, int min_width, int min_height)
Parameters: int vh; User selected view-object handle (R) int vh_parent; View-object handle for the parent base frame, if 0 then a base level frame is created to enclose the view-object (R) int x; x coordinate for the view-object. If no parent may be -1 to give default x (R) int y; y coordinate for the view-object. If no parent may be -1 to give default y (R) int cset; Number of the colorset to be used; must have 53 or more colorcells allocated (R) int type; Simulation type =1 Colour, =2 Monochrome with soft limit sliders etc. int size; Pattern display area half width/height in pixels (R) int nspot; Number of spots predicted (R) int hkl[]; Array of 'nspot' 'hkl' packed indices (as LRL) (R) float xf[]; Array of 'nspot' 'xf' coordinates in mm from the pattern centre (R) float yf[]; Array of 'nspot' 'yf' coordinates in mm from the pattern centre (R) float lam[]; Array of 'nspot' lambda values (R) float dthr[]; Array of 'nspot' (1/dmin)**2 threshold values (R) int multi[]; Array of 'nspot' multiplicity flags (format as for 'LRL' data = 1 single > 1 2**20*mult + 2**12*min-hrm + 2**4*max-hrm + harm_inc int flags[]; Array of 'nspot' reflection flags Flags format as for 'LRL' data Bit 0 set = spatial overlap; this is the only bit used by this routine. (R) int nodhkls[]; Array of 'nspot' packed nodal indices; packed as 2**20(h+512)+2**10(k+512)+l+512 (R) int idxlam[]; Index array for data sorted by lambda, 'nspot' values from 1 to nspot (R) int idxdmin[]; Index array for data sorted by dmin 'nspot' values from 1 to nspot (R) int idxnod[]; Index array for data sorted by packed nodal index from 1 to nspot (R) float filmr; Pattern radius in mm (R) float gnomr; Minimum radius in mm (>0.1) from image centre for conversion of plot to a gnomonic projection. For a normal Laue simulation, give a value of 0.0 (R) float lmin; Lambda minimum of prediction (R) float lmax; Lambda maximum of prediction (R) float dmin; Dmin value of prediction (R) float d_lmin; Lambda interval in Angstoms for lambda-min slider (R) float d_lmax; Lambda interval in Angstoms for lambda-max slider (R) float d_dmin; Dmin interval in Angstoms for dmin slider (R) float cell[6]; Real cell dimensions a, c, c, alpha, beta, gamma (R) float phis[4]; Setting angles phix, phiy, phiz, spindle (R) int latt[4]; Crystal system, lattice, rotation axis, beam axis (R) float ctof; Crystal to film distance (mm) int min_width; The program will calculate the width required for the view-object based on the display area width, control panel width etc. If this is less than min_width then min_width will be used instead and the layout altered to reflect this (R) int min_height; minimum height cf min_width (R) Note: Data arrays hkl[],.....idxnod[] must remain in place during the lifetime of the view-object
Return: Status flag =0 OK, >0 error bit 0 set: Requested parent not found in the view-objects list bit 1 set: Unable to allocate memory for x, y pixel positions arrays.
Fortran call: CALL XDLF_LAUE_SIM_GETSIZE (ITYPE, ISIZE, IWIDTH, IHEIGHT)
Parameters: ITYPE (R) Simulation type =1 Colour, = 2 Monochrome with soft limits options etc. (see type) ISIZE (R) Half width/height for displayed pattern in pixels (see size) IWIDTH (W) Returns the width required (see w) IHEIGHT (W) Returns the height required (see h)
'C' call: void xdl_laue_sim_getsize (type, size, w, h)
Parameters: int type; /* Simulation type =1 Colour, =2 Monochrome with soft limit sliders etc.*/ int size; /* Pattern display area half width/height in pixels (R)*/ int *w; /* Returns the width required (W)*/ int *h; /* Returns the height required (W)*/
Return: None
Fortran call: CALL XDLF_LAUE_SIM_NEW (IVH, NSPOT, IHKL, XF, YF, + ALAM, DTHR, MULTI, FLAGS, + NODHKLS, IDXLAM, IDXDMIN, IDXNOD, FILMR, + GNOMR, ALMIN, ALMAX, DMIN, + CELL, PHIS, LATT, CTOF, IERR)
Parameters: IVH (R) View-object handle (see vh) NSPOT (R) Number of spots predicted (see nspot) IHKL (R) Array of NSPOT 'packed' indices (see hkl) IK (R) Array of NSPOT 'k' indices (see k) IL (R) Array of NSPOT 'l' indices (see l) XF (R) Array of NSPOT 'xf' coordinates (see xf) YF (R) Array of NSPOT 'yf' coordinates (see yf) ALAM (R) Array of NSPOT lambda values (see lam) DTHR (R) Array of NSPOT (1/dmin)**2 thresholds (see dthr) MULTI (R) Array of NSPOT multiplicities flags (see multi) FLAGS (R) Array of NSPOT reflection flags (see flags) NODHKLS (R) Array of NSPOT packed nodal indices (see nodhkls) IDXLAM (R) Index array for lambda sorted data; NSPOT values from 1 to NSPOT (see idxlam) IDXDMIN (R) Index array for dmin sorted data; NSPOT values from 1 to NSPOT (see idxdmin) IDXNOD (R) Index array for packed nodal index values (see idxnod) FILMR (R) Pattern radius in mm (see filmr) GNOMR (R) Minimum radius in mm (>0.1) from image centre for conversion of plot to a gnomonic projection. For a normal Laue simulation, give a value of 0.0 ALMIN (R) Lambda minimum of prediction (see lmin) ALMAX (R) Lambda maximum of prediction (see lmax) DMIN (R) Dmin value of prediction (see dmin) CELL (R) Array of the 6 real cell dimensions (see cell) PHIS (R) Array of 4 setting angles, Phix, Phiy, Phiz and spindle (see phis) LATT (R) 4 integer array; crystal system, lattice type, rotation axis, beam axis (see latt) CTOF (R) Crystal to film distance (mm) (see ctof) IERR (W) Returns status from xdl_laue_sim_new call
'C' call: int xdl_laue_sim_new (int vh, int nspot, int * hkl, float * xf, float * yf, float * lam, float * dthr, int * multi, int * flags, int * nodhkls, int * idxlam, int * idxdmin, int * idxnod, float filmr, float gnomr, float lmin, float lmax, float dmin, float * cell, float * phis, int * latt, float ctof)
Parameters: int vh; User selected view-object handle (R) int nspot; Number of spots predicted (R) int hkl[]; Array of 'nspot' 'hkl' packed indices (as LRL) 2**20(h+512)+2**10*(k+512)+l+512 (R) float xf[]; Array of 'nspot' 'xf' coordinates in mm from the pattern centre (R) float yf[]; Array of 'nspot' 'yf' coordinates in mm from the pattern centre (R) float lam[]; Array of 'nspot' lambda values (R) float dthr[]; Array of 'nspot' (1/dmin)**2 threshold values (R) int multi[]; Array of 'nspot' multiplicities flags as for 'LRL' data (see main routine) (R) int flags[]; Array of 'nspot' reflection flags Flags format as for LRL' data Bit 0 set = spatial overlap; this is the only bit used by this routine. (R) int nodhkls[]; Array of 'nspot' packed nodal indices; packed as 2**20(h+512)+2**10(k+512)+l+512 (R) int idxlam[]; Index array for data sorted by lambda, 'nspot' values from 1 to nspot (R) int idxdmin[]; Index array for data sorted by dmin 'nspot' values from 1 to nspot (R) int idxnod[]; Index array for data sorted by packed nodal index from 1 to nspot (R) float filmr; Pattern radius in mm (R) float gnomr; Minimum radius in mm (>0.1) from image centre for conversion of plot to a gnomonic projection. For a normal Laue simulation, give a value of 0.0 (R) float lmin; Lambda minimum of prediction (R) float lmax; Lambda maximum of prediction (R) float dmin; Dmin value of prediction (R) float cell[6]; Real cell dimensions a, c, c, alpha, beta, gamma (R) float phis[4]; Setting angles phix, phiy, phiz, spindle (R) int latt[4]; Crystal system, lattice, rotation axis, beam axis (R) float ctof; Crystal to film distance (mm)
Return: Status flag =0 OK, >0 error bit 0 set: View-object handle not found bit 1 set: View handle does not match view object bit 2 set: Unable to allocate required memory