spotread
Author: Graeme Gill

## target/spotread

### Summary

Use an instrument to read a single color value. This can be a useful diagnostic aid. The type of instrument is determined by the communication port selected.

### Usage Summary

spotread [-options] [logfile]
-v Verbose mode
-s Print spectrum for each reading.
-S Plot the spectrum in a graph window.
-c comport Set COM port, 1..4 (default 1)
-t Use transmission measurement mode
-d Use display measurement mode (absolute results)
-db Use display white brightness relative measurement mode
-dw Use display white relative measurement mode
-e Use emissive measurement mode (absolute results)
-a Use ambient measurement mode (absolute results)
-y c|l Display type, c = CRT, l = LCD
-i illum Choose illuminant for print/transparency spectral data:
A, D50 (def.), D65, F5, F8, F10 or file.sp
-o observ Choose CIE Observer for spectral data:
1931_2 (def.), 1964_10, S&B 1955_2, shaw, J&V 1978_2
(Choose FWA during operation)
-N Disable auto calibration of instrument
-f filter Set filter configuration:
n None
p Polarising filter
6 D65
u U.V. Cut
-F extrafilterfile Apply extra filter compensation file
-x Display Yxy instead of Lab
-T Display correlated color temperatures and CRI
-N Disable auto calibration of instrument
-H Use high resolution spectrum mode (if available)
-W n|h|x Ovride serial port flow control: n = none, h = HW, x = Xon/Xoff
-D [level] Print debug diagnostics to stderr
logfile Optional file to save reading results

### Usage Details and Discussion

spotread operates in a similar fashion to chartread, but allows the reading of a succession of single color values. This can be useful in diagnosing issues with profile creation and operation.
The -v flag causes extra information to be printed out during chartread operation.
The -s flag enables the printing out spectral reflectance/transmittance values, if the instrument supports this.
The -S flag enables the plotting of the spectral reflectance/transmittance values, if the instrument supports this. If a reference is taken, this will be plotted in red. You must strike a key in the plot window to continue with another measurement.
The instrument is assumed to communicate through a USB or serial communication port, and the port can be selected with the -c option, if the instrument is not connected to the first port. If you invoke dispread so as to display the usage information (i.e. "dispread -?" or "dispread --"), then the discovered USB and serial ports will be listed. On UNIX/Linux, a list of all possible serial ports are shown, but not all of them may actually be present on your system.
If using an Xrite DTP41T or SpectroScanT, and printing onto transparent or back lit media, use the -t flag to operate the instrument in transparency mode. If using the Spectroscan, this triggers a fake transparency mode, that uses a separate backlight (such as a light box). The instrument will be used to calibrate the level of backlight, and use this to compute the transparency of the test chart samples. Note that for good transparency values, the backlight level needs to be neither too bright not too dark, should ideally be incandescent rather than fluorescent (since fluorescent lights often have big dips in their spectrum), and ideally should be of uniform brightness over the measurement area.
The -d flag allows measuring in display mode, using instruments that support this mode. Values returned are absolute.
The -db flag allows measuring in display mode using instruments that support this mode, with the brightness normalized to the white value read as the first reading. While the brightness values are then relative to the white, the readings are otherwise absolute. This corresponds to the raw ICC absolute readings created by dispread.
The -dw flag allows measuring in display mode using instruments that support this mode, with the white normalized to the white value read as the first reading.
The -e flag allows measuring in emission mode (e.g. displays or illuminants) using instruments that support this mode. Values returned are absolute.
The -a flag allows measuring in ambient illumination mode using instruments that support this mode (i.e. Eye-One Display 2). Values returned are absolute, and include the various color temperatures and Color Rendering Index (see -T). If the instrument does not support ambient mode, emissive mode will be used instead.
Display type. Some colorimeters (like the DTP94 and Eye-One Display) require that the the type of display technology used be specified. Use -yc if you are calibrating a CRT (Cathode Ray Tube) type monitor, and use -il if you are calibrating an LCD (Liquid Crystal Display).
The -i flag allows specifying a standard or custom illumination spectrum, applied to reflective spectral data to compute CIE tristimulus values. A, D50, D65, F5, F8, F10 are a selection of standard illuminant spectrums, with D50 being the default. If a filename is specified instead, it will be assumed to be an Argyll specific .sp spectrum file.
The -o flag allows specifying a tristimulus observer, and is used to compute PCS (Profile Connection Space) tristimulus values. The following choices are available:
1931_2 selects the standard CIE 1931 2 degree observer. The default.
1964_10 selects the standard CIE 1964 10 degree observer.
1955_2 selects the Stiles and Birch 1955 2 degree observer
1978_2 selects the Judd and Voss 1978 2 degree observer
shaw selects the Shaw and Fairchild 1997 2 degree observer
The -N flag disables any automatic instrument calibration (used for the Gretag Spectrolino for instance). This would be used when the instrument is being used for a series of measurements, and it is inconvenient to place it on it's calibration tile between measurements. The instrument should be calibrated at least once for each measurement session though.
The -f options allows configuring the instrument to have a particular filter fitted to it. Some instruments (i.e. the Gretag Spectrolino) allow the fitting of various filters, such as a polarizing filter, D65 illuminant simulation, or Ultra Violet Cut filter, and this option allows the instrument to be configured appropriately.
The -F option allows the setting of an extra filter compensation file, that allows for the filtration of the spectral readings through a medium of some kind, when in emission mode. This is useful in allowing for such things as telescopic adapters that use a glass of acrylic lens in the optical path.
The -x option causes the reading to be displayed as XYZ and Yxy values, rather than the default XYZ and L*a*b*
The -T option causes various color temperatures to be displayed, plus the Color Rendering Index. Three color temperatures will be shown. The first is the classic Correlated Color Temperature, which is the black body (Plankian) color closest to the measured color in the CIE 1960 UCS color space. The second is the black body (Plankian) color that has a minimum CIEDE2000 error to the measured color. The last is the daylight color that has a minimum CIEDE2000 error to the measured color. The delta E between the closest temperature and the measured color is also shown for each. The Color Rendering Index (CRI Ra) is also computed if the instrument is capable of spectral measurement. If the notation (Invalid) is displayed after the CRI, then this means that the the spectrum white point is to far from the black body and Daylight locus to be meaningful.
The -N option disables the automatic calibration of an instrument if it is possible to do so. Sometimes it is awkward to have to re-calibrate and instrument every time a utility starts, and unnecessary if the instrument has recently been calibration, and this switch prevents it happening.
The -H option turns on high resolution spectral mode, if the instrument supports it. See Operation of particular instruments for more details.
The -W n|h|x parameter overrides the default serial communications flow control setting. The value n turns all flow control off, h sets hardware handshaking, and x sets Xon/Xoff handshaking. This commend may be useful in workaround serial communications issues with some systems and cables.
The -D flag causes communications and other instrument diagnostics to be printed to stdout. A level can be set between 1 .. 9, that may give progressively more verbose information, depending on the instrument. This can be useful in tracking down why an instrument can't connect.
The logfile is an optional file that can be specified to capture each reading taken. There will be column headers printed to the first row, and then each reading will be on a separate line with tab separators.
All instruments will be used in a spot mode. For the SpectroScan instrument, the samples can be placed on the table, and the measuring head positioned before taking a measurement. Note that the default mode (reflectance measurement) may not be supported by the instrument, so a mode it does support will be selected automatically. Override this on the command line if desired. Note that the DTP51, DTP92, DTP94 and Eye-One Display are colorimeters, and cannot read spectral information, and that the DTP92 can only read CRT type displays.

Once spotread has established communications with the instrument, it awaits a command from the user, indicated by the user hitting a key or activating the instrument switch.
If Fluorescent Whiter Additive (FWA) compensated readings are to be made, then this needs to be enabled with the correct command line switches, and then setup for each paper white background color, to establish an FWA reference. There is one FWA reference locations available for each alphabetic character not used for a special function (ie. not H, K, N, Q, R, S), keyed to the capital letters A-Z, allowing FWA corrected comparisons between many different media.
Once a particular reference location is initialized with the FWA paper color, subsequent readings triggered by using the corresponding lower case letter a-z will use FWA compensation for that keyed location. Note that readings that are triggered some other way (ie. using a non alphabetic key, or using the instrument switch) will not be FWA corrected readings.
If a non-FWA readings is to be performed, then a reading for a location that has not been initialised for paper white should be used, or a non alphabetic key (such as space or return) or instrument switch trigger should be used.
If the instrument supports a high resolution spectral mode, then it can be toggled on and off using the h key.
If the instrument supports stored readings (ie. DTP20), then these can be ignored using the n key.
The previous reading can be stored as a reference, and delta E's computed for each reading, using the r key.
A previous spectral reading can be saved in a spectrum CGATS file (spectrum.sp) using the s key, making this a convenient way of creating a custom illuminant spectrum.
A calibration can be initiated using the k key.