spectro/spec2cie

Summary

Convert spectral .ti3 readings into CIE XYZ or L*a*b* readings. FWA compensation may be applied.

Usage

spec2cie [options] input.ti3 output.ti3
  -v            Verbose mode
  -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, 1964_10c, shaw, J&V 1978_2
  -f            Use Fluorescent Whitening Agent compensation
  -I illum      Override instrument illuminant in .ti3 file:
                  A, D50, D65, F5, F8, F10 or file.sp
                  (only used in conjunction with -f)
 -n             Don't output spectral values
 -p             Plot each values spectrum
 input.ti3      Measurement file
 output.ti3     Converted measurement file

Comments

This program takes the spectral data in a .ti3 file, converts them to XYZ and Lab and fills the XYZ_[XYZ] and LAB_[LAB] columns in the output .ti3 file with the computed XYZ and Lab values. If the columns XYZ_[XYZ] and/or LAB_[LAB] are missing in the input file, they are added to the output file.

All other columns are copied from the input to the output .ti3 file.

If the -f option is used, the FWA corrected spectral reflectances are written to the output .ti3 file, instead of simply copying the spectral reflectances from the input .ti3 file. In this case, the XYZ_[XYZ] and LAB_[LAB] values are computed from the FWA corrected reflectances as well.

The -i flag allows specifying a standard or custom illumination spectrum, applied to spectral .ti3 data to compute PCS (Profile Connection Space) 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 custom spectrum file. This only works if spectral data is available. Illuminant details are:

        A   CIE tungsten filament lamp 2848K
        D50 CIE daylight 5000K
        D65 CIE daylight 6500K
        F5  CIE Fluorescent 6350K, CRI 72
        F8  CIE Fluorescent 5000K, CRI 95
        F10 CIE Fluorescent 5000K, CRI 81

Custom illuminants are most often used when a fluorescent tube base viewing booth is going to be used to view results.  Other illuminant reference files could be created using a suitable measuring instrument such as a spectrocam, or an eyeone, although such instruments do not provide the necessary response down to Ultra Violet that is needed for accurate operation of Fluorescent Whitening Agent compensation.
Note that if an illuminant other than D50 is chosen, the resulting ICC profile will not be standard, and cannot be freely interchanged with other profiles that that us the standard D50 illuminant. Profiles should only be linked with other profiles that have the same illuminant and observer.

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
  1964_10c selects a version of the CIE 1964 10 degree observer adjusted for better compatibility with the 1931 2 degree observer.
  1978_2 selects the Judd and Voss 1978 2 degree observer
  shaw selects the Shaw and Fairchild 1997 2 degree observer

Note that if an observer other than 1931 2 degree is chosen, the resulting ICC profile will not be standard, and cannot be freely interchanged with other profiles that that us the standard 1931 2 degree observer. Profiles should only be linked with other profiles that have the same illuminant and observer.

The -f flag enables Fluorescent Whitening Agent compensation. This allows the effects of different levels of Ultra Violet in the viewing illuminant from that used by the instrument, be compensated for.

The -I flag allows specifying a an illumination spectrum for the instrument illuminant, overriding that computed from the type of instrument (recorded in the .ti3 file). This flag is can only be used in combination with the -f flag. If a filename is specified instead, it will be assumed to be an Argyll specific .sp custom spectrum file. Illuminant details are:

        A   CIE tungsten filament lamp 2848K
        D50 CIE daylight 5000K
        D65 CIE daylight 6500K
        F5  CIE Fluorescent 6350K, CRI 72
        F8  CIE Fluorescent 5000K, CRI 95
        F10 CIE Fluorescent 5000K, CRI 81

The -n flag disables the output of the spectral values. If just the XYZ and L*a*b* values are needed, this makes for a smaller, easier to read file.

The -p flag causes each spectrum to be plotted. If FWA compensation is used, then the before/after compensation spectrums will be shown.