def updateLens(self, lens): c = self._checkCal() a = ArgSetter('Update Lens', { 'date':{ 'value': c.currentTime(), 'dtype':str, 'tip':'Please stick to the date format'}, 'info': { 'value':'[change me]', 'dtype':str }, 'light_spectrum':{ 'value':'visible', 'dtype':str } }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] l = a.args['light_spectrum'] c.addLens(lens, date, info, l) self._updateInfo() self.pModified.setValue(True) self._autosave()
def udpateFlatField(self, arr, error=None): c = self._checkCal() a = ArgSetter('Update flat field', { 'date':{ 'value': c.currentTime(), 'dtype':str, 'tip':'Please stick to the date format'}, 'light spectrum':{ 'value': 'visible', 'dtype':str, 'tip':"e.g. 'IR'"}, 'info': { 'value':'[change me]', 'dtype':str} }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] c.addFlatField(arr, date, info, error, a.args['light spectrum']) self._updateInfo() self.pModified.setValue(True) self._autosave()
def updateDeconvolutionBalance(self, val): c = self._checkCal() a = ArgSetter('Update deconvolution balance', { 'value':{'value':str(val), 'dtype':float }, 'date':{ 'value': c.currentTime(), 'dtype':str, 'tip':'Please stick to the date format'}, 'info': { 'value':'[change me]', 'dtype':str }, 'light_spectrum':{ 'value':'visible', 'dtype':str } }) a.exec_() if a.result(): value = a.args['value'] date = a.args['date'] info = a.args['info'] l = a.args['light_spectrum'] c.addDeconvolutionBalance(value, date, info, l) self._updateInfo() self.pModified.setValue(True) self._autosave()
def updateLens(self, lens): c = self._checkCal() a = ArgSetter( 'Update Lens', { 'date': { 'value': c.currentTime(), 'dtype': str, 'tip': 'Please stick to the date format' }, 'info': { 'value': '[change me]', 'dtype': str }, 'light_spectrum': { 'value': 'visible', 'dtype': str } }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] l = a.args['light_spectrum'] c.addLens(lens, date, info, l) self._updateInfo() self.pModified.setValue(True) self._autosave()
def updateDeconvolutionBalance(self, val): c = self._checkCal() a = ArgSetter( 'Update deconvolution balance', { 'value': { 'value': str(val), 'dtype': float }, 'date': { 'value': c.currentTime(), 'dtype': str, 'tip': 'Please stick to the date format' }, 'info': { 'value': '[change me]', 'dtype': str }, 'light_spectrum': { 'value': 'visible', 'dtype': str } }) a.exec_() if a.result(): value = a.args['value'] date = a.args['date'] info = a.args['info'] l = a.args['light_spectrum'] c.addDeconvolutionBalance(value, date, info, l) self._updateInfo() self.pModified.setValue(True) self._autosave()
def udpateFlatField(self, arr, error=None): c = self._checkCal() a = ArgSetter( 'Update flat field', { 'date': { 'value': c.currentTime(), 'dtype': str, 'tip': 'Please stick to the date format' }, 'light spectrum': { 'value': 'visible', 'dtype': str, 'tip': "e.g. 'IR'" }, 'info': { 'value': '[change me]', 'dtype': str } }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] c.addFlatField(arr, date, info, error, a.args['light spectrum']) self._updateInfo() self.pModified.setValue(True) self._autosave()
def _createNew(self): a = ArgSetter( 'New camera calibration', { 'camera name': { 'value': 'change me', 'dtype': str }, 'bit depth': { 'value': 16, 'limits': [8, 12, 14, 16, 24, 32], 'dtype': int, 'tip': 'e.g. 16 for 16 bit' } }) a.exec_() if a.result(): c = CameraCalibration() c.path = None self.calibrations.append(c) name = a.args['camera name'] depth = a.args['bit depth'] c.setCamera(name, depth) self.calibrations.append(c) self.pModified.setValue(True) l = list(self.pCal.opts['limits']) l.append(name) self.pCal.setLimits(l) self.pDepth.setValue(depth) [p.show() for p in self.pCal.childs]
def updateDarkCurrent(self, slope, intercept): c = self._checkCal() a = ArgSetter('Update dark current', { 'date':{ 'value': c.currentTime(), 'dtype': str, 'tip':'Please stick to the date format'}, 'info': { 'value':'[change me]', 'dtype': str} }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] c.addDarkCurrent(slope, intercept, date, info, error=None) self._updateInfo() self.pModified.setValue(True) self._autosave()
def updateNoise(self, nlf_coeff): c = self._checkCal() a = ArgSetter('Update noise', { 'date':{ 'value': c.currentTime(), 'dtype':str, 'tip':'Please stick to the date format'}, 'info': { 'value':'[change me]', 'dtype':str } }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] c.addNoise(nlf_coeff, date, info, error=None) self._updateInfo() self.pModified.setValue(True) self._autosave()
def _createNew(self): a = ArgSetter('New camera calibration', { 'camera name':{ 'value': 'change me', 'dtype':str}, 'bit depth': { 'value':16, 'limits':[8,12,14,16,24,32], 'dtype':int, 'tip':'e.g. 16 for 16 bit'} }) a.exec_() if a.result(): c = CameraCalibration() self.calibrations.append(c) name = a.args['camera name'] c.setCamera(name,a.args['bit depth']) self.calibrations.append(c) self.pModified.setValue(True) l = list(self.pCal.opts['limits']) l.append(name) self.pCal.setLimits(l) [p.show() for p in self.pCal.childs]
def updateNoise(self, nlf_coeff): c = self._checkCal() a = ArgSetter( 'Update noise', { 'date': { 'value': c.currentTime(), 'dtype': str, 'tip': 'Please stick to the date format' }, 'info': { 'value': '[change me]', 'dtype': str } }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] c.addNoise(nlf_coeff, date, info, error=None) self._updateInfo() self.pModified.setValue(True) self._autosave()
def updateDarkCurrent(self, slope, intercept): c = self._checkCal() a = ArgSetter( 'Update dark current', { 'date': { 'value': c.currentTime(), 'dtype': str, 'tip': 'Please stick to the date format' }, 'info': { 'value': '[change me]', 'dtype': str } }) a.exec_() if a.result(): date = a.args['date'] info = a.args['info'] c.addDarkCurrent(slope, intercept, date, info, error=None) self._updateInfo() self.pModified.setValue(True) self._autosave()