Class GammaCalculator
source code
Class for managing gamma tables
Parameters:
- inputs (required)= values at which you measured screen luminance either
in range 0.0:1.0, or range 0:255. Should include the min
and max of the monitor
Then give EITHER "lums" or "gamma":
- lums = measured luminance at given input levels
- gamma = your own gamma value (single float)
- bitsIN = number of values in your lookup table
- bitsOUT = number of bits in the DACs
myTable then generates attributes for gammaVal (if not supplied)
and lut_corrected (a gamma corrected lookup table) which can be
accessed by;
myTable.gammaTable
myTable.gammaVal
|
|
__init__(self,
inputs=[],
lums=[],
gammaVal=[],
bitsIN=8,
bitsOUT=8,
eq=1) |
source code
|
|
|
|
|
|
|
|
|
Fits a gamma function to the monitor calibration data.
- Parameters:
- -xVals are the monitor look-up-table vals (either 0-255 or 0.0-1.0)
-yVals are the measured luminances from a photometer/spectrometer
|
fitGammaErrFun(self,
params,
x,
y,
minLum,
maxLum)
| source code
|
Provides an error function for fitting gamma function
(used by fitGammaFun)
|