Skip to main content
Skip table of contents

(v13) The setcalibration operator

This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

Another method of supplying interpolation arrays is through the setcalibration operator, an extension. (This is the operator called by the calibration manager in the GUI version of the RIP.)

There are three forms supported by the RIP. In these forms, setcalibration takes either one interpolation array or an array of four such arrays, and is therefore analogous to settransfer and setcolortransfer according to its operand; apart from the different way of expressing the function, the method of application is just the same as for settransfer. The arrays are applied as well as, not instead of, the other methods of calibration. The third form of setcalibration uses a dictionary operand. See N-color form of setcalibration operator for details.

setcalibration is located in internaldict.

For example:

            [ 0.0 0.0 0.013 0.01 ... 1.0 1.0 ]
            1183615869 internaldict /setcalibration get exec

This applies the same calibration to all colors, as settransfer does. The following example applies separate calibrations to each of the process colors, as setcolortransfer does:

            [ 0.0 0.0 0.013 0.01 ... 1.0 1.0 ] % Cyan, or possibly Red
            [ 0.0 0.0 0.012 0.01 ... 1.0 1.0 ] % Magenta, or possibly Green
            [ 0.0 0.0 0.017 0.01 ... 1.0 1.0 ] % Yellow, or possibly Blue
            [ 0.0 0.0 0.016 0.01 ... 1.0 1.0 ] % Black, or Gray
            1183615869 internaldict /setcalibration get exec

setcalibration operator, 1and 4-array forms

array setcalibration

Default : [0 0 1 1]

array is either a single interpolation array of number pairs, where the first numbers of all the pairs form a monotonically increasing sequence, and the first numbers of the first and last pairs are 0.0 and 1.0; or an array of four arrays where each is an interpolation array of this form. The mapping implied by a single interpolation array is applied to all color values.

The arrays form part of the graphics state, and setcalibration is therefore subject to gsave and grestore, and setgstate.

N-color form of setcalibration operator

The array style of setcalibration is not adequate for N-color, because the colorants are only defined by convention for CMYK, RGB, and Gray - using a scheme that is not easily extended to arbitrary colorants.

The N-color form of setcalibration is modeled on the type 5 halftone dictionary: that is, it contains a sequence of keys, with the names of each colorant entry, and associated dictionaries. There may be a /Default colorant key for use with any colorants not otherwise named; see WarningsCriteria subdictionary (N-color calibration) for a description of what happens when this key is not present.

Here is an example for a Hex (six-color CMYKOG) colorant family. See sections Colorant subdictionaries (N-color calibration) and WarningsCriteria subdictionary (N-color calibration) for the contents of the subsidiary dictionaries, shown here by <<...>> :.

            /CalibrationType 5
            (Hex Cyan) cvn << … >>
            (Hex Magenta) cvn << … >>
            (Hex Yellow) cvn << … >>
            (Hex Black) cvn << … >>
            /Default << … >>
            (Hex Orange) cvn << … >>
            (Hex Green) cvn << … >>
            /ForceSolids Boolean % default false
            /NegativePrint Boolean % default false
            /WarningsCriteria << … >>
            1183615869 internaldict /setcalibration get exec

When using the built-in capabilities of Harlequin MultiRIP, it should never be necessary to construct this dictionary; all the necessary information is created based on user actions in the Calibration Manager and Edit Calibration dialog boxes. You may need to use this information if you are using Harlequin Core or if you wish to override the calibration that the GUI version would provide.

The /CalibrationType key is required, and always has value 5 in dictionaries created by the RIP. (The value could be 1, for a single colorant, but GGS software does not use this option.)

The keys for colorants, including Default, can be names as shown or strings. See Colorant subdictionaries (N-color calibration) for details of the sub dictionaries.

ForceSolids and NegativePrint are optional, and can also appear in the colorant sub dictionaries, which is their preferred location. When absent or false the value is determined by any values given in the colorant sub-dictionaries. When true this overrides any values given in the colorant sub-dictionaries. See WarningsCriteria subdictionary (N-color calibration) for details.

WarningsCriteria is optional, and can be used to specify when there will be warnings about use of unsuitable calibration sets. See WarningsCriteria subdictionary (N-color calibration) for details of the sub dictionary.

Colorant subdictionaries (N-color calibration)

The values associated with each colorant are dictionaries containing the constituent calibration sets for the colorant. There may be a Default colorant dictionary which is used for all colorants not given explicitly named dictionaries. The possible keys in each colorant dictionary are:

  /colorant_key <<
  /CalibrationType 1
  /DeviceCurve array % default  [ ]
  /ToneCurve array % default [ ]
array % default [ ]
array % default [ ]
  /ForceSolids Boolean % default false
  /NegativePrint Boolean % default false

To see in which order the curves are applied for each colorant see (v13) Order of application of calibration and transfer functions.

A curve is used as a normal transform if a value on the measured axis is used to derive the device code that produces that value. In addition to this group calibrations are available which allow the RIP to select the calibration that best matches the halftone in use. For information see (v13) Auto-selection and bump-up curves for calibration.

Interpolation arrays”  explains this usage. A curve is used as a backwards transform if it is used in the opposite sense, perhaps to remove a pre-applied calibration; you can view this as using the device code to derive the desired (measured) value - a backwards progress from one axis to the curve to the other axis - or as a “flip” of the curve about a straight line from 0.0, 0.0 to 1.0, 1.0.

See also the comments on ordering in (v13) Order of application of calibration and transfer functions. The RIP supports the four curve arrays in the form:

/DeviceCurve [device pairs ]

That is:

            /DeviceCurve [[device pairs][default pairs]]

            /DeviceCurve [[][default pairs]]

That is,


The extended form containing two sub-arrays is however only likely to be useful for Device and possibly Actual Press Curves. The two sub arrays do not have to contain the same number of pairs. The implementation in the HqnCalibrate and HqnPageSetupConf procsets only uses this extended format for the device curve and only for new calibration sets thus:

/DeviceCurve [[SNV SGV ...SNV SGV ][SGV NDC...SGV NDC ]]

Notes on the keys:

Only the CalibrationType key is required, and it must have value 1. If there are no curve-related keys, a colorant is associated with no calibration sets (and this implies linear calibration).

The arrays in this dictionary are derived from calibration sets in the GUI version of the RIP. Each array or sub-array, (in the case where an array contains two sub-arrays), contains a series of points (where each point is an input, output pair of numbers) and must be zero length (linear) or contain at least two calibration points (four numbers).

In our implementation, all curves except for the DeviceCurve consist of SNV/NDC pairs. The Device Curve consists of SNV/SGV pairs and SGV to NDC pairs. However, we support all curves in either the single array SNV/NDC format, or the two sub-array SNV/SGV plus SGV/NDC format.

The HqnCalibrate procset, which handles calibration, derives data in the two press curves, IntendedPressCurve and ActualPressCurve, from two sources. Without color management active, we use “Normalized DotGain” / NDC pairs, that is, the DotGain percentage values are divided by 100 (to bring values into the range 0 through 1). With color management, the ActualPressCurve uses SNV/NDC pairs while the IntendedPressCurve is not present. (The function of IntendedPressCurve, and more, is performed by colorimetric data in the color management input profiles). Other uses of setcalibration should follow similar rules.

This describes our implementation of the HqnCalibrate and HqnPageSetupConf procset; however, the RIP supports the extended form if provided.

At least some of the NDC or SGV values must be in the range 0 through 1, with values outside this range ignored. The values should be strongly monotonic in each curve: that is, strictly increasing or decreasing with no values equal.

Tone curves can be inverted though they must still be monotonic. Again, the RIP supports the extended form of tone curves if provided.

SNV values in the arrays are expected to overlap the range of 0 through 1 and be weakly monotonic in each curve: that is, strictly increasing or decreasing but allowing consecutive values to be equal. This definition allows some values to be outside the range of 0 through 1 but only that part of the range that lies in the range 0 through 1 is used by setcalibration.

Set ForceSolids to true if 100% colorant is to be preserved (not used when printing actual calibration strips).

Set NegativePrint to true if the DeviceCurve is for a negative. It has the effect of inverting the measurement data for the DeviceCurve but has no effect for any of the other curves.

WarningsCriteria subdictionary (N-color calibration)

There is an optional key, WarningsCriteria, in the top level of the dictionary operand to setcalibration, introducing a subdictionary of this form:

            /WarningsCriteria <<
              /MissingCalibrationAbort Boolean
              /DeviceCurve << ... >>
              /ToneCurve << ... >>
              /IntendedPressCurve << ... >>
              /ActualPressCurve << ... >>

The WarningsCriteria subdictionaries have two effects:

  • When present, each subdictionary sets a range of applicability for calibration sets.
  • When absent, each key/subdictionary pair also has an effect on warnings about the use of substitute calibrations for spot colors.

The second effect needs some explanation. Remember that any colorant without a specific calibration, typically a spot color not represented in the calibration set, inherits the calibration for /Default. If there is no calibration for /Default in a curve (device curve, tone curve, and so on) then the colorant will attempt to use the calibration for Black (and give an appropriate warning) or detect that there is no Black and assume a linear calibration (and give a different warning). For example, if there is no DeviceCurve key in the WarningsCriteria dictionary, then there are no warnings about the use of the Black or linear calibration for the device curve .

Notes on the keys:

  • The MissingCalibrationAbort key is required (if the WarningsCriteria dictionary exists). Set to true to abort jobs where there is a missing calibration. Set to false to continue the job after issuing a warning.
  • All of the keys introducing subdictionaries in WarningsCriteria are optional.

Curve-related subdictionaries (N-color calibration)

If present, each subdictionary of WarningsCriteria accepts the optional keys shown in the following example, where /xxxCurve represents one of the keys with a subdictionary:

            /xxxCurve <<
              /HWResolution [xRes yRes]
              /Exposure exp
              /NegativePrint Boolean
              /HalftoneName (int_name)
              /Frequency [low high]

Notes on the keys:

  • All keys are optional. An absent key means that any match is allowed.
  • HWResolution, Exposure, and NegativePrint specify the corresponding values from currentpagedevice, that must match at the time all screens are installed. xRes and yRes can be integers or reals (in dots per inch), but the exposure value exp must be an integer (as shown in the RIP user interface), which has no units, and which has a value range and meaning that vary from device to device.
  • HalftoneName specifies a single (internal) name that must match all screens used. Some examples are: Euclidean, Round, or Hds-a6. The screen must have an external name visible in the Dot Shape menu of the edit calibration dialog box.
  • Frequency specifies a low and high value (in lines per inch) for the range allowed by all screens used.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.