# Initialization for Four Circle Diffractometers

This section describes how the modules which are special for a four circle single crystal diffractometer are configured into SICS. The following feautures are available:

MakeHKL theta omega chi phi
  MakeHKL creates the hkl command for the calculation of settings for a four circle diffractometer. The four parameters are the names of the motors driving the two theta, omega, chi and phi circles of the diffractometer. These motors must already exists before this command may succeed.
MakeHKLMot hkl
  Creates the drivable H, k, l virtual motors using hkl, an object created by MakeHKL for calculations.
MakeDifrac tth om chi phi cter
  This command installs the Difrac subsystem into SICS. Difrac is a whole F77 package for controlling a four circle diffractometer. Afterwards Difrac commands are available in SICS with the prefix dif, for example dif ah calls the difrac ah command. Difrac is described in more detail elsewhere. The parameters are the four circle motors two theta, omega, chi and phi and the counter. This is no longer maintained.
MakeMesure name scanobject hklobject omega s2t fileroot datanumberobject
  MakeMesure installs the single counter four circle diffractometer measurement procedure into SICS. It will be accessible as object name afterwards. MakeMesure takes a lot of parameters:
  scanobject
    The name of the internal scan object.
  hklobject
    The name of the object which does crystallographic calculations.
  omega
    The name of the motor driving omega.
  s2t
    The name of the two theta motor for use in omega two theta scans.
  fileroot
    The full path to the data file directory without final /
  datanumberobject
    The name of the SICS data number object for creating unique file numbers.
MakeUBCalc name hklobject
  This installs a UB matrix calculation module with the name name into SICS. The second parameter is a hklobject as created with MakeHKL to which any calculated UB's can be transferred.
MakeHklscan scanobject hklobject
  Installs the hklscan command which allows to scan in reciprocal space. Scanobject is the name of SICS internal scan object, hklobject the name of a reciprocal space calculation object as configured with MakeHKL.
MakeTRICSSupport
  Installs a command, tricssupport, which helps the TRICS status display.

Commands implemented by tricssupport:

tricssupport oldframe file idet nFrame
  Loads and sends the frame nFrame of detector idet from file file in UUencoded form.
tricssupport interest
  Enables this connection to receive notifications whenever a new frame of data had been written
tricssupport newframe
  Called from scripts. Triggers sending new frames to all registered connections.

There are also a lot of scripted command available for four circle diffractometers. These may be copied from tricscom.tcl. These include:

four
  print the four all important angles
tricsscan start step np
  Omega scan with a PSD
psdrefscan file step np mode preset
  Read reflections from file, drive to them, do a omega scan with tricsscan using the parameters specified.
detscan start step np
  Do a detector calibration scan.
phscan start step np
  Do a phi scan
hklscan2d
  Scanning reciprocal space with the area detector
scan2d
  Configure SICS for general scanning with the PSD. This is meant to supersede many of the special scans above.
scan1d
  Configure SICS for general scanning with the single detector.