Opticka 2.16.1
Opticka is an experiment manager for behavioral research.
|
calibrateLuminance: automatic luminance calibration More...
calibrateLuminance: automatic luminance calibration
calibrateLuminance automatic luminance calibration: To enter settings:
c = calibrateLuminance() c.nMeasures = 40 c.useSpectroCal2 = true c.run(); collect uncalibrated data c.analyse(); fit models to the raw data c.test() test the fitted model for linearity c.plot() % plot the final result c.save() % save the data c.finalCAL % this holds the corrected table you can pass to PTB Screen('LoadNormalizedGammaTable')
calibrateLuminance will ask if you need to zero calibrate (e.g. ColorCal2, you only need to do this after first plugging in the ColorCal). Then simply place the meter in front of the monitor and follow instructions. After doing nMeasures of luminance steps, it will fit the raw luminance values using a variety of methods and then plot these out to a figure (it will ask you for comments to enter for the calibration, you should enter monitor type, lighting conditions etc). You can then save mycal to disk for later use by your programs.
Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md
Public Member Functions | |
function | calibrateLuminance (in args) |
Class constructor. | |
function | calibrate (in me) |
calibrate run the calibration loop, uses the max # screen by default | |
function get | maxLuminances (in me) |
get max luminance values for each channel | |
function get | displayBaseline (in me) |
get max luminance values for each channel | |
function get | displayRange (in me) |
get max luminance values for each channel | |
function | runAll (in me) |
run all options runs, analyzes (fits) and tests the monitor | |
function | run (in me) |
run run the main calibration loop, uses the max # screen by default | |
function | test (in me) |
test once the models are analyzed, lets test the corrected luminance | |
function | analyze (in me) |
analyze once the raw data is collected, this analyzes (fits) the data | |
function | plot (in me, in full) |
plot This plots the calibration results | |
function | cloneAxes (in src, in ignoredArg) |
function set | choice (in me, in in) |
set the model choice | |
function | getCCalxyY (in me) |
getCCalxyY Uses the ColorCalII to return the current xyY values | |
function | getSpectroCALValues (in me) |
getSpectroCALValues Uses the SpectroCAL2 to return the current xyY values | |
function | spectroCalLaser (in me, in state) |
function | makeSPD (in me) |
function | fullCalibration (in me) |
function | save (in me) |
function | close (in me) |
function | openSpectroCAL (in me) |
function | closeSpectroCAL (in me) |
Public Attributes | |
Property | comments |
comments to note about this calibration | |
Property | nMeasures |
number of measures | |
Property | screen |
screen to calibrate | |
Property | bitDepth |
Property | port |
specify port to connect to | |
Property | useSpectroCal2 |
use SpectroCal II automatically | |
Property | useCCal2 |
use ColorCalII automatically | |
Property | useI1Pro |
use i1Pro? | |
Property | tableLength |
length of gamma table, 1024 for Linux/macOS, 256 for Windows | |
Property | preferI1Pro |
choose I1Pro over CCal if both connected? | |
Property | testColour |
test Lum, R, G and B as seperate curves? | |
Property | correctColour |
correct R G B seperately (true) or overall luminance (false) | |
Property | analysisMethods |
Property | choice |
Property | targetSize |
Target (centered square that will be measured) size in pixels. | |
Property | backgroundColour |
background screen colour | |
Property | filename |
filename this was saved as | |
Property | externalInput |
EXTERNAL data as a N x 2 matrix. | |
Property | wavelengths |
wavelengths to test (SpectroCal2 is 380:1:780 | I1Pro is 380:10:730) | |
Property | monitorSync |
use monitor sync for SpectroCal2? | |
Property | verbose |
more logging to the commandline? | |
Property | runNow |
allows the constructor to run the open method immediately | |
Property | keepOpen |
keep spectrocal open | |
Property | screenVals |
Property | maxLuminances |
Property | displayRange |
Property | displayBaseline |
Property | info |
Property | finalCLUT |
Property | displayGamma |
Property | gammaTable |
Property | modelFit |
Property | cMatrix |
Property | thisx |
Property | thisy |
Property | thisY |
Property | thisSpectrum |
Property | thisWavelengths |
Property | ramp |
Property | inputValues |
Property | inputValuesI1 |
Property | inputValuesTest |
Property | inputValuesI1Test |
Property | spectrum |
Property | spectrumTest |
Property | rampNorm |
Property | inputValuesNorm |
Property | initialCLUT |
Property | oldCLUT |
Property | dacBits |
Property | lutSize |
Property | dateStamp |
clock() dateStamp set on construction | |
Property | uuid |
universal ID | |
Property | SPD |
Property | spCAL |
function calibrateLuminance::calibrateLuminance | ( | in | args | ) |
Class constructor.
More detailed description of what the constructor does.
args | are passed as a structure of properties which is parsed. |
function calibrateLuminance::analyze | ( | in | me | ) |
analyze once the raw data is collected, this analyzes (fits) the data
function calibrateLuminance::calibrate | ( | in | me | ) |
calibrate run the calibration loop, uses the max # screen by default
function set calibrateLuminance::choice | ( | in | me, |
in | in | ||
) |
set the model choice
function calibrateLuminance::cloneAxes | ( | in | src, |
in | ignoredArg | ||
) |
function calibrateLuminance::close | ( | in | me | ) |
function calibrateLuminance::closeSpectroCAL | ( | in | me | ) |
function get calibrateLuminance::displayBaseline | ( | in | me | ) |
get max luminance values for each channel
function get calibrateLuminance::displayRange | ( | in | me | ) |
get max luminance values for each channel
function calibrateLuminance::fullCalibration | ( | in | me | ) |
function calibrateLuminance::getCCalxyY | ( | in | me | ) |
getCCalxyY Uses the ColorCalII to return the current xyY values
function calibrateLuminance::getSpectroCALValues | ( | in | me | ) |
getSpectroCALValues Uses the SpectroCAL2 to return the current xyY values
function calibrateLuminance::makeSPD | ( | in | me | ) |
function get calibrateLuminance::maxLuminances | ( | in | me | ) |
get max luminance values for each channel
function calibrateLuminance::openSpectroCAL | ( | in | me | ) |
function calibrateLuminance::plot | ( | in | me, |
in | full | ||
) |
plot This plots the calibration results
function calibrateLuminance::run | ( | in | me | ) |
run run the main calibration loop, uses the max # screen by default
function calibrateLuminance::runAll | ( | in | me | ) |
run all options runs, analyzes (fits) and tests the monitor
function calibrateLuminance::save | ( | in | me | ) |
function calibrateLuminance::spectroCalLaser | ( | in | me, |
in | state | ||
) |
function calibrateLuminance::test | ( | in | me | ) |
test once the models are analyzed, lets test the corrected luminance
Property calibrateLuminance::analysisMethods |
methods list to fit to raw luminance values, first is always gamma
Property calibrateLuminance::backgroundColour |
background screen colour
Property calibrateLuminance::bitDepth |
bitDepth of framebuffer, '8bit' is best for old GPUs, but prefer 'FloatingPoint32BitIfPossible' for newer GPUS, 'Native10Bit' and can pass options to enable Display++ modes 'EnableBits++Bits++Output' 'EnableBits++Mono++Output' or 'EnableBits++Color++Output'
Property calibrateLuminance::choice |
which model should opticka select: 1 is simple gamma, 2:n are the analysisMethods chosen; 2=pchipinterp
Property calibrateLuminance::cMatrix |
Property calibrateLuminance::comments |
comments to note about this calibration
Property calibrateLuminance::correctColour |
correct R G B seperately (true) or overall luminance (false)
Property calibrateLuminance::dacBits |
Property calibrateLuminance::dateStamp |
clock() dateStamp set on construction
Property calibrateLuminance::displayBaseline |
Property calibrateLuminance::displayGamma |
Property calibrateLuminance::displayRange |
Property calibrateLuminance::externalInput |
EXTERNAL data as a N x 2 matrix.
Property calibrateLuminance::filename |
filename this was saved as
Property calibrateLuminance::finalCLUT |
Property calibrateLuminance::gammaTable |
Property calibrateLuminance::info |
Property calibrateLuminance::initialCLUT |
Property calibrateLuminance::inputValues |
Property calibrateLuminance::inputValuesI1 |
Property calibrateLuminance::inputValuesI1Test |
Property calibrateLuminance::inputValuesNorm |
Property calibrateLuminance::inputValuesTest |
Property calibrateLuminance::keepOpen |
keep spectrocal open
Property calibrateLuminance::lutSize |
Property calibrateLuminance::maxLuminances |
Property calibrateLuminance::modelFit |
Property calibrateLuminance::monitorSync |
use monitor sync for SpectroCal2?
Property calibrateLuminance::nMeasures |
number of measures
Property calibrateLuminance::oldCLUT |
Property calibrateLuminance::port |
specify port to connect to
Property calibrateLuminance::preferI1Pro |
choose I1Pro over CCal if both connected?
Property calibrateLuminance::ramp |
Property calibrateLuminance::rampNorm |
Property calibrateLuminance::runNow |
allows the constructor to run the open method immediately
Property calibrateLuminance::screen |
screen to calibrate
Property calibrateLuminance::screenVals |
Property calibrateLuminance::spCAL |
Property calibrateLuminance::SPD |
Property calibrateLuminance::spectrum |
Property calibrateLuminance::spectrumTest |
Property calibrateLuminance::tableLength |
length of gamma table, 1024 for Linux/macOS, 256 for Windows
Property calibrateLuminance::targetSize |
Target (centered square that will be measured) size in pixels.
Property calibrateLuminance::testColour |
test Lum, R, G and B as seperate curves?
Property calibrateLuminance::thisSpectrum |
Property calibrateLuminance::thisWavelengths |
Property calibrateLuminance::thisx |
Property calibrateLuminance::thisy |
Property calibrateLuminance::thisY |
Property calibrateLuminance::useCCal2 |
use ColorCalII automatically
Property calibrateLuminance::useI1Pro |
use i1Pro?
Property calibrateLuminance::useSpectroCal2 |
use SpectroCal II automatically
Property calibrateLuminance::uuid |
universal ID
Property calibrateLuminance::verbose |
more logging to the commandline?
Property calibrateLuminance::wavelengths |
wavelengths to test (SpectroCal2 is 380:1:780 | I1Pro is 380:10:730)