TwiceAsNice
2019-02-18
|
Variables | |
float | bias_level = 100.0 |
tuple | off_minmax = (200, 400) |
refrect = Nice.Rect(50.0, 50.0, 200.0, 200.0) | |
list | arg = ["pdvcam", "--CAMERA.CONFIG=[ALIAS=laos.sx.hws.pcam.ccd47-svr.CAMERA]"] |
app = Nice.Application(arg) | |
config = app.config() | |
ctrl = BasdaVinoCamera.VinoCameraCtrl.create("CAMERA.CTRL") | |
push = BasdaVinoCamera.VinoImagePushU16.create("CAMERA.PUSH") | |
chipsize = ctrl.chipsize() | |
channels = ctrl.channels() | |
channelpos = ctrl.channelpos() | |
channelscale = ctrl.channelscale() | |
channelnum = int(channels.width() * channels.height()) | |
fsize = Nice.Size(chipsize.width() / channels.width(), chipsize.height() / channels.height()) | |
fhalf = Nice.Size(fsize.width() / 2.0, fsize.height() / 2.0) | |
fcenter = Nice.Point(fsize.width() / 2.0, fsize.height() / 2.0) | |
list | refwin = [] |
chrect = Nice.Rect(refrect) | |
pixel | |
list | stat = [[], []] |
list | bias = [[], []] |
biasAll = ctrl.biasAll() | |
w = BasdaVino.ImageU16().crop(BasdaVino.ImageU16(push.getNewImage()), refwin[ch]) | |
list | final_off_minmaxsets = [] |
tuple | m0 = (stat[0][ch].quantileLower(0.05) + stat[0][ch].quantileUpper(0.95)) / 2.0 |
tuple | m1 = (stat[1][ch].quantileLower(0.05) + stat[1][ch].quantileUpper(0.95)) / 2.0 |
tuple | m = (m0 - m1) / (bias[0][ch] - bias[1][ch]) |
tuple | n = m0 - (m * bias[0][ch]) |
off_minmaxset = int((bias_level - n) / m) | |
setOffset.app = Nice.Application(arg) |
list setOffset.arg = ["pdvcam", "--CAMERA.CONFIG=[ALIAS=laos.sx.hws.pcam.ccd47-svr.CAMERA]"] |
list setOffset.bias = [[], []] |
float setOffset.bias_level = 100.0 |
setOffset.biasAll = ctrl.biasAll() |
setOffset.channelnum = int(channels.width() * channels.height()) |
setOffset.channelpos = ctrl.channelpos() |
setOffset.channels = ctrl.channels() |
setOffset.channelscale = ctrl.channelscale() |
setOffset.chipsize = ctrl.chipsize() |
setOffset.config = app.config() |
setOffset.ctrl = BasdaVinoCamera.VinoCameraCtrl.create("CAMERA.CTRL") |
setOffset.fcenter = Nice.Point(fsize.width() / 2.0, fsize.height() / 2.0) |
setOffset.fhalf = Nice.Size(fsize.width() / 2.0, fsize.height() / 2.0) |
list setOffset.final_off_minmaxsets = [] |
setOffset.fsize = Nice.Size(chipsize.width() / channels.width(), chipsize.height() / channels.height()) |
tuple setOffset.off_minmax = (200, 400) |
setOffset.off_minmaxset = int((bias_level - n) / m) |
setOffset.pixel |
setOffset.push = BasdaVinoCamera.VinoImagePushU16.create("CAMERA.PUSH") |
setOffset.refrect = Nice.Rect(50.0, 50.0, 200.0, 200.0) |
list setOffset.refwin = [] |
list setOffset.stat = [[], []] |
setOffset.w = BasdaVino.ImageU16().crop(BasdaVino.ImageU16(push.getNewImage()), refwin[ch]) |