spec, fourc, twoc, surf, etc.
X-ray diffractometer operation for specific configurations
SYNOPSIS
fourc [ -fhsvyFLS ] [ -d debug ] [ -g geometry ] [ -l outputfile [...]] [ -o option=value [...]] [ -p fd pid ] [ -t tty ] [ -u user ] [ -A allowed_host [...]] [ -C file [...]] [ -D directory ] [ -N my_name ] [ -S [ p1 ] | -S p1-p2 ] [ -T fake_tty ]
DESCRIPTION
spec provides a software environment for the operation of an X-ray diffractometer and other data-acquisition instruments. spec contains a sophisticated command interpreter that uses a C-like grammar and powerful macro language. spec supports a variety of X-ray diffractometer configurations. The diffractometer geometry is chosen by the program name. Some of the more popular geometries currently supported include:
- spec
- General instrument control and data acquisition
- fourc
- Standard four-circle diffractometer
- twoc
- Standard two-circle diffractometer
- sixc
- Six-circle diffractometer (delta, theta, chi, phi, mu, gamma)
- kappa
- kappa diffractometer
- psic
- Psi-circle, including kappa type
- surf
- Various liquid surface diffractometer configurations
The following options are recognized:
- -A allowed_host
- If present, only hosts that match the specified IP addresses will be allowed to connect as clients to a spec server or via socket ports opened with sock_par("listen"). Multiple -A options are allowed. The allowed_host argument recognizes standard CIDR (Classless Inter-Domain Routing) notation. The options -A 127.0.0.1 -A 192.168.1.0/24 would allow the localhost (127.0.0.1) and hosts in the 192.168.1.0 through 192.168.1.255 subnetwork. (This flag added in spec release 6.07.01.)
- -C file
- Open the command file file as a start-up command file to be read after the standard start-up command files, but before the optional file spec.mac in the current directory, which will always be read last. If there is an error in reading or executing the commands in these files, spec will jump to the main prompt and not read any remaining queued command files. Up to 32 files may be specified with multiple -C options. (This flag added in spec release 5.07.01-1.)
- -d debug
- Set the initial value of the debugging variable DEBUG to debug. See the debug help file for a list of the debugging categories. A value of 192 is useful for debugging hardware problems.
- -D directory
- Use directory instead of the compiled-in name (usually /usr/local/lib/spec.d) or the value of the SPECD environmental variable (if set) as the auxiliary file directory.
- -f
- Fresh start. All symbols are set to their default values and the standard macros are read to establish the default state.
- -F
- Clean and fresh start. All symbols are set to their default values but no command files are read and no macros are defined. Only the built-in commands are available.
- -g geometry
- Load macro files and activate geometry calculations for the specified geometry, while using the configuration files taken from the name by which spec is invoked.
- -h
- Retain history. When starting fresh, reset symbols and macros but keep command-line history. (Added in spec release 6.05.01.)
- -l logfile
- Specifies an output file. Output to the file will begin immediately, so will include the initial hardware configuration messages. Files will be opened even when starting fresh. (Added in spec release 5.09.02-2.) Files opened this way will not be saved as output files in the state file, so will not be automatically reopened the next time spec starts. (As of spec release 6.04.05.)
- -L
- Do not check or create the state-file lock. Normally, spec prevents more than one instance of itself from running with the same state file (derived from the user-name plus terminal-name). In some situations, particularly if a site configures the state files to reside on an NFS-mounted disk, the lock test that spec uses always indicates another instance of spec is running, making it impossible to start. This flag overrides that test. Normally, this flag will not be used.
- -N my_name
- Use my_name for setting the spec prompt and the name of the configuration file directory. Also sets the geometry as if -g was given as an argument. To select a geometry not corresponding to my_name, use the -g flag after the -N flag.
- -o option=value
- Initializes the spec_par() option to value. See the spec_par help file for a list of the available options. Multiple -o options may be given.
- -p fd pid
- Indicates that spec input is coming from a pipe from another program. The argument fd is the file descriptor that spec should use for standard input. The argument pid is the process ID of the spawning process. If fd is zero, spec will not re-echo input from the file descriptor to spec's standard output. (This feature is deprecated and may be removed in a future release.)
- -s
- Simulation mode. No hardware commands are issued. If started in simulation mode, simulation mode cannot be turned off without restarting the program.
- -S
- Starts spec in server mode listening at the first available port in the default range of 6510 to 6530.
- -S p1
- Starts spec in server mode listening at the specified port number p1.
- -S p1-p2
- Starts spec in server mode listening on the first available port in the given range.
- -t tty
- Use the current user (or user's) last saved state from the terminal specified by tty. The terminal can be specified as -t /dev/tty01 or -t tty01. Note, spec uses the string ttyp# to refer to a pseudoterminals on Linux and ttys00 on macOS.
- -T fake_tty
- This option creates a user state associated with fake_tty, which may be any name (although only the first six characters are used). This option allows you to bypass the locking feature that prevents multiple instances of spec to be started by the same user from the same terminal.
- -u user
- Use user's last saved state as the current user's initial state.
- -v
- Show version. Print version information and exit.
- -y
- "Yes", change motor controller registers initially if they disagree with the settings file. Normally, spec requires you to confirm such a change. This flag would be useful if you know controller power had been turned off.
ENVIRONMENT
spec uses the following environment variables:
- SPECD
- An auxiliary file directory to use instead of the compiled in name.
- TERM or term
- The text terminal type.
- GTERM
- The graphics terminal type for high-resolution graphics
- HOME
- The user's home directory.
- SHELL or shell
- The shell program to be used for interactive subshells.
- DISPLAY
- The display name and screen number on which to display the X-window plots.
FILES
spec.d is the auxiliary file directory, often /usr/local/lib/spec.d. gconf is the name by which spec was invoked, as in fourc, twoc, etc. Some significant spec files include the following:
- ./spec.mac
- Optional private command file always read at startup.
- spec.d/site.mac
- Optional site command file always read at startup.
- spec.d/site_f.mac
- Optional site command file read on fresh start.
- spec.d/standard.mac
- Standard macro definitions read on fresh start.
- spec.d/gconf.mac
- Standard geometry macro definitions read on fresh start. Uses only first 4 letters of gconf.
- spec.d/gconf/config
- Hardware configuration file.
- spec.d/gconf/settings
- Motor settings file.
- spec.d/gconf/conf.mac
- Optional configuration command file always read at startup.
- spec.d/gconf/userfiles/hdw_lock
- Hardware lock file.
- spec.d/gconf/userfiles/user_ttyS
- User's history file. Uses only first 6 letters of user and of tty.
- spec.d/gconf/userfiles/user_ttyL
- User's lock file. Uses only first 6 letters of user and of tty.
- spec.d/gconf/userfiles/user_ttyS
- User's state file. Uses only first 6 letters of user and of tty.
- spec.d/gconf/userfiles/user_ttyP
- User's data points file. Only first 6 letters of user and of tty.
- spec.d/spec_help/*
- Help files.
