---
title: "OpticalCalibrator"
description: "API documentation for OpticalCalibrator"
url: https://developer.disguise.one/python-api/docs/opticalcalibrator/
---

# OpticalCalibrator

Base class (inherits properties and methods): _[Resource](/python-api/docs/resource#resource)_

## Properties

#### **applyAlignment** : _int_

Apply the alignment of the currently selected plan or result to the stage via open module

_Options: {0: ‘None’, 1: ‘Plan’, 2: ‘Result’}_

#### **backupResults** : _List\[[OptiCalResult](/python-api/docs/opticalresult#opticalresult)\]_

Additional RigCheck Results that should never be deleted. Any Result in this backup list, as well as the Current and Fallback Result are considered ‘in use’.

_UserName: Additional Results to keep_

#### **cameraBandwidthGbit** : _float_

Total network bandwidth allocation for physical machine vision cameras in Gigabits per second.  
This will be divided evenly among all active cameras in a plan.  
Each camera is further limited by the practical 1-Gbit port limit of 920 Mbit/s.  
To avoid dropped packets set this to:

-   around 0.85 for a 1-Gbit switch
-   around 1.8-8.5 for a 10-Gbit switch (higher if more cameras are active)  
    Minimum: 0.16 Gbit/s, Maximum: 25 Gbit/s, Default: 0.85 Gbit/s.

_UserName: MV Network Bandwidth (Gbit/s)_

#### **cameraBandwidthMode** : _int_

Whether camera bandwidth is automatically managed or not

_Options: {0: ‘Manual’, 1: ‘Auto’}_

#### **discoveryAdapterName** : _str_

#### **fallbackResult** : _[OptiCalResult](/python-api/docs/opticalresult#opticalresult)_

A previous successful RigCheck Result, for fallback. The ‘Revert to Fallback’ action will switch to this, applying its calibration and alignment.

_UserName: Fallback Result_

#### **manageOnlyInternalProcesses** : _int_

Whether d3 only stop its own camera server processes, or also externally launched ones.

#### **nDaysToKeepResults** : _int_

Number of days for which to keep RigCheck Results. Any unused Results older than this will be removed during cleanup.  
Default: 14 days.

_UserName: Days to keep Results_

#### **plan** : _[OptiCalStagePlan](/python-api/docs/opticalstageplan#opticalstageplan)_

The OmniCal Plan for execution at this venue.

_UserName: Capture Plan_

#### **renderFrameDelay** : _int_

Delay in \[frames\] between setting OmniCal render state and assuming visible projector output for camera capture. Try values above 5 if the downstream signal chain has additional delays.’

#### **report** : _[OptiCalReport](/python-api/docs/opticalreport#opticalreport)_

#### **resetAndRescanTask** : _[OptiCalTask](/python-api/docs/opticaltask#opticaltask)_ _(Read-Only)_

#### **result** : _[OptiCalResult](/python-api/docs/opticalresult#opticalresult)_

Currently active RigCheck Result (if any).

_UserName: Result_

#### **showCode** : _int_

#### **simulateProjectorLensDistortion** : _bool_

#### **simulateProjectorWarpGrid** : _bool_

#### **simulateStackedProjectorOutputs** : _bool_

#### **testSimulatedProjectorWarps** : _bool_

#### **testWarpGridSize** : _[Int2](/python-api/docs/int2#int2)_

#### **visualisation** : _[OptiCalVisualisation](/python-api/docs/opticalvisualisation#opticalvisualisation)_

Turn visualisation of certain OmniCal results on or off.

#### **visualisationSource** : _[VisualisationSource](/python-api/docs/visualisationsource#visualisationsource)_

Whether to visualise currently selected Capture Plan or RigCheck Result

_UserName: Visualisation Source_

## Methods

#### **canDeleteResults**(self) -> _bool_

Whether cleaning up RigCheck Results is currently possible (i.e. whether OmniCal is already busy).

#### **canExecutePlan**(self) -> _bool_

Whether it is possible to run RigCheck to execute the current Plan. Returns false if OmniCal is busy, setup is not complete, or camera discovery is off.

#### **canExecutePlanIgnoreDiscovery**(self) -> _bool_

Whether it is possible to run RigCheck to execute the current Plan. Returns false if OmniCal is busy or setup is not complete.

#### **canRevertResult**(self) -> _bool_

Whether reverting a RigCheck Result is currently possible (a Fallback Result is valid, loaded and calibrated).

#### **cannotDeleteResultsReason**(self) -> _str_

Translated message describing why RigCheck Results cannot be cleaned up at the moment.

#### **cannotExecutePlanReason**(self) -> _str_

Translated message describing why Plan cannot be executed at the moment.

#### **cannotRevertResultReason**(self) -> _str_

Translated message describing why the RigCheck Result cannot be reverted at the moment.

#### **clearMeshDataCache**(self)

#### **clearRenderedObjects**(self)

#### **deleteOldResults**(self) -> _bool_

Deletes all Results that are not in use and that are older than the number of days configured in Designer.

#### **disableWarps**(self)

#### **executePlan**(self) -> _[OptiCalTask](/python-api/docs/opticaltask#opticaltask)_

#### **findOldResults**(self, nDaysToKeepResults: _int_) -> _List\[[Path](/python-api/docs/path#path)\]_

Find all RigCheck Results that are considered ‘old’, i.e. that are not in use and that are older than the specified number of days.

#### **findResultsToKeep**(self, nDaysToKeepResults: _int_) -> _List\[[Path](/python-api/docs/path#path)\]_

Find all RigCheck Results that are not considered ‘old’, i.e. that are in use or newer than the specified number of days.

#### **getObject**(self) -> _[OpticalCalibratorObject](/python-api/docs/opticalcalibratorobject#opticalcalibratorobject)_

#### **isBusy**(self) -> _bool_

#### **isCapturing**(self) -> _bool_

#### **noResultsToDeleteMessage**(self) -> _str_

Message detailing why no RigCheck Results get deleted with current settings.

#### **renderStageFromCamera**(self, cameraMats: _[CameraMats](/python-api/docs/cameramats#cameramats)_, widgetViewMat: _[Mat](/python-api/docs/mat#mat)_, imageScale: _[Vec2](/python-api/docs/vec2#vec2) | [Int2](/python-api/docs/int2#int2) | [Vec](/python-api/docs/vec#vec)_, imageCentre: _[Vec2](/python-api/docs/vec2#vec2) | [Int2](/python-api/docs/int2#int2) | [Vec](/python-api/docs/vec#vec)_, stageRenderOpacity: _float_)

#### **renderWireframeFromCamera**(self, mesh: _[Mesh](/python-api/docs/mesh#mesh)_, worldMat: _[Mat](/python-api/docs/mat#mat)_, cameraMats: _[CameraMats](/python-api/docs/cameramats#cameramats)_, widgetViewMat: _[Mat](/python-api/docs/mat#mat)_, imageScale: _[Vec2](/python-api/docs/vec2#vec2) | [Int2](/python-api/docs/int2#int2) | [Vec](/python-api/docs/vec#vec)_, imageCentre: _[Vec2](/python-api/docs/vec2#vec2) | [Int2](/python-api/docs/int2#int2) | [Vec](/python-api/docs/vec#vec)_, wireframeParams: _[WireframeRenderParams](/python-api/docs/wireframerenderparams#wireframerenderparams)_)

#### **requestResetAndRescan**(self) -> _[OptiCalTask](/python-api/docs/opticaltask#opticaltask)_

#### **revertResult**(self)

Revert current RigCheck Result to the last successful one, and apply its Calibration and Alignment to the Stage.

#### **saveCalibratedCameras**(self)

#### **sendWarps**(self)

#### **showRenderedObjects**(self)

#### **visualisationPlan**(self) -> _[OptiCalStagePlan](/python-api/docs/opticalstageplan#opticalstageplan)_

## Static Methods

#### **getAutoAlignTargetNames**() -> _List\[str\]_

#### **getGridToleranceMethodNames**() -> _List\[str\]_

#### **getOutlierModeNames**() -> _List\[str\]_

#### **getVisualisationNames**() -> _List\[str\]_

#### **helpText**() -> _str_
