Changing Data Collection Hardware

When a new Quantum detector is installed at a station, or the data collection computer is changed, or Compumotor modules are replaced, there are several things that may need to be done so that the ADX data collection software will work properly. Most changes are done on the data collection computer: some as root, some as szebenyi, and a few as specuser (do the last set also for any other user who will collect data using ADX).

as root:

Host names

The "/etc/hosts" file contains a list of host names and associated IP addresses. It must include entries for the PC's controlling the detector, and the names specified in "adsc_ccd_environ" and "detector_db.txt" (see below) must be included (as primary names or aliases) in the hosts file. If a PC is referred to as "a1ccda" in one place but "441-0" in another (for example), both names must be included on the appropriate line in "/etc/hosts". If Compumotor controllers are being contacted over the Ethernet (as opposed to via a serial line), they must also be correctly named in the hosts file.

ARP for Compumotor controllers

If Compumotor controllers are being accessed using the Ethernet, it is necessary to have permanent entries in the ARP table for them. A script "cm_arp" in ~/szebenyi/runfiles on praline.chess.cornell.edu contains commands to take care of this. As a convenience, the script also ensures that serial ports are usable by everyone (not just root); this is necessary for the distance readout to work. Copy the script to "/usr/local/sbin/cm_arp" and edit it to contain only the appropriate entries for the station. Execute the script to make Compumotor usable. To ensure that entries are recreated in the ARP table after a reboot: Copy "/home/szebenyi/runfiles/compumotor_arp_for_init.d" on praline to "/etc/rc.d/init.d/compumotor_arp" and make a link to it in /etc/rc.d/rc5.d, e.g.
ln -s /etc/rc.d/init.d/compumotor_arp /etc/rc.d/rc5.d/S96compumotor_arp

Environment variables

The file "adsc_ccd_environ" defines a number of environment variables used by the ADX programs. This file may be kept in ~/szebenyi/runfiles (usually) or in ~specuser/bin. It must be changed if the detector type is changed, e.g. from a Q-4 to a Q-210. Some computers have files "adsc_ccd_environ_q4", for example, which may be used to get the necessary information. Besides the detector-specific items, be sure the proper computers are specified for the controlling workstation (e.g. guideline), the PC's (e.g. f2ccda), and the station computer (e.g. f2).

as szebenyi:

To become szebenyi, you can become root and then use "su szebenyi"; this way you don't need to know the szebenyi password.

Calibration tables

Each detector has its own set of calibration tables, which are used by the "transform" (correction) program to produce corrected images from raw images. For the Quantum-4 (and the Quantum-1), these are kept on the controlling workstation; for the Q-210 and Q-270 they are on the PC "frame-grabber" computers, and the workstation keeps only a small file ("detector_db.txt") identifying which PC goes with which detector module. Tables, or "detector_db.txt", are kept in subdirectories of ~szebenyi/runfiles/adsc_data; the directory names are identified by the detectors' serial numbers: "tables_406", "tables_448", etc. For a new detector or computer, the necessary files must be obtained and put in an appropriately named directory. If a detector is being swapped from another station, get files from the workstation at that station (if necessary; copies may already be available on the current station). Copies of all tables are kept in ~szebenyi/adsc_data/tables_### directories on praline. Once the tables have been installed, make a link: in ~szebenyi/runfiles/adsc_data, type:
> ln -s -f tables_406 tables
if installing detector 406, for example.

Start_ccd script

The "start_ccd" script starts up the various programs which make up the ADX data collection package. There are different versions for different cases; look on a station with the same type of detector for an appropriate one. "Start_ccd" may be either in "~szebenyi/runfiles" or in "~specuser/bin", or both; be sure that the correct version is being used. When there are multiple detectors (i.e. at F1), there will be multiple scripts. Link the default one to "start_ccd":
> ln -s -f ~szebenyi/runfiles/start_ccd_q270 start_ccd
for example. Useful versions of start_ccd scripts include:

"Start_ccd_plus" starts up the same programs as "start_ccd", and then starts rspec and the crystal-centering software. The additional lines do not depend on the type of detector used, and so can just be copied from the old "start_ccd_plus" script, or one at another station.

Station_info

In ~szebenyi/runfiles on each workstation, there is a file called "station_info", which contains information about the detector(s) and computers at each station; it is used by mccview to set the default station and detector correctly. On the tourmaline computer, change to ~szebenyi/runfiles and edit "station_info" to reflect the new hardware. Then type:
> distribute_all station_info
to copy the file to all the workstations.

as specuser:

Config files

When ADX starts up, it reads some parameters from a configuration file. As defined in "adsc_ccd_environ", this file is called "ccd_config", and is located in ~/adsc. It must be updated for each user who will be using ADX: at least specuser, and others if you want to collect data as any other user. A copy of the config file for each detector is kept in the tables directory for that detector. If using the dual-detector setup, the config file must have information about both detectors; see "~specuser/adsc/ccd_config.406_409" on the F1 data collection computer. Copy the appropriate file to "~/adsc/ccd_config". The config file contains a default wavelength, which should be changed to match the station wavelength (except for F2, of course).

Crystal centering software

If the data collection computer is changed, and the replacement has a different IP address, the crystal centering software (if in use) must be informed of this. Edit "~specuser/CrystalCentering/conf/server.properties" on the computer running the centering server (in the hutch), to list the data collection computer's name or IP address under "compumotorip". Also be sure that "~specuser/CrystalCentering/conf/client.properties" on the computer running the centering client (typically the data collection computer, but can be the station computer) lists the appropriate video server, e.g. "server = f1-vid", etc..

Other items

A final note - to be sure of using the new "ccd_config" when you start up ADX, do this (as specuser, on the data collection workstation):

>cd ~/adsc
>rm marcollect
>touch marcollect
This removes the record of the last data collection run, which would otherwise be read on startup of ADX.

Marian Szebenyi, last updated April 2007.