Sharpness monitor accepting 0 as None
This commit is contained in:
parent
59a93c673a
commit
78c01de6d5
2 changed files with 13 additions and 2 deletions
|
|
@ -274,7 +274,7 @@ class JPEGSharpnessMonitor:
|
|||
dependency as required by the underlying class.
|
||||
:param method: The sharpness metric used when evaluating autofocus.
|
||||
:param record: Bitmask of sharpness metrics to record while monitoring.
|
||||
If ``None``, only the metric specified by ``method`` is recorded.
|
||||
If ``None`` or 0, only the metric specified by ``method`` is recorded.
|
||||
|
||||
:raises ValueError: If ``method`` is not included in ``record``.
|
||||
:raises ValueError: If ``SharpnessMethod.FOCUS_FOM`` is requested but
|
||||
|
|
@ -283,7 +283,7 @@ class JPEGSharpnessMonitor:
|
|||
self.camera = camera
|
||||
self.stage = stage
|
||||
self.method = method
|
||||
self.record = method if record is None else record
|
||||
self.record = method if record is None or record == 0 else record
|
||||
|
||||
if not self.method & self.record:
|
||||
raise ValueError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue