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 HMR.)
There are four forms of this operator: It takes either one interpolation array, or an array of four such arrays, or a dictionary of either of two types. The array forms are analogous to settransfer
and setcolortransfer
according to the operand; apart from the different way of expressing the function, the method of application is just the same as for settransfer
(but note the arrays are applied as well as, not instead of, any settransfer
arrays). The dictionary form takes a type 5 dictionary, described in N-color form of setcalibration operator below, or a type 6 dictionary, described in Auto-selection using calibration groups.
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, 1- and 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.
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 Auto-selection using calibration groups.
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 [ ]
/IntendedPressCurve array % default [ ]
/ActualPressCurve array % default [ ]
/ForceSolids Boolean % default false
/NegativePrint Boolean % default false
>>
To see in which order these curves are applied for each colorant, read Order of application of calibration and transfer functions.
The RIP supports the four curve arrays in these forms:
/DeviceCurve [device pairs]
/DeviceCurve [[device pairs] [default pairs]]
/DeviceCurve [[] [default pairs]]
That is,
/DeviceCurve [SNV NDC...SNV NDC]
/DeviceCurve [[SNV SGV...SNV SGV] [SGV NDC...SGV NDC]]
/DeviceCurve [[] [SGV NDC...SGV NDC]]
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
]]
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 theWarningsCriteria
dictionary exists). Set totrue
to abort jobs where there is a missing calibration. Set tofalse
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
, andNegativePrint
specify the corresponding values fromcurrentpagedevice
, that must match at the time all screens are installed.xRes
andyRes
can be integers or reals (in dots per inch), but the exposure valueexp
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 theDot 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.