ModeCalc User Guide
Table of Contents
- 1 Table of Contents
- 2 MODECALC USER GUIDE
- 3 Introduction
- 4 Functionalities
- 5 Session
- 6 User Launch
- 7 ModeCalc Window
- 7.1 Session Window
- 7.1.1 New session
- 7.1.2 Open Session
- 7.1.3 Save Session
- 7.1.4 Save Session As
- 7.2 Modes Window
- 7.3 Export Widow
- 7.4 Python Window
- 7.1 Session Window
MODECALC USER GUIDE
Introduction
ModeCalc is a GUI that provides a graphical shell for a Python sensor mode generator module. It only gets parameter lists from the Python file, populates its window with a control for each one, calls the Python file to get results, and displays the results. It's completely sensor independent.
Functionalities
It has 'exporters' to convert results of user generated modes to a file.
The resultant file can be saved in classic DevX ini format, or as shared settings format or as json file.
It can save the user's set of parameter values in a text file so the user can preserve it for later, share it, check it in to a repository, etc.
It has a text editor that's loaded with the Python source code of the module in use.
There's a Python Console window (like DevWareX) that shows print() output, error messages, etc.
Session
ModeCalc provides an option to load only one session i.e., either by loading the python sensor settings module file or saved json file at any one point of time. But user can clone the settings to a new one and modify it with multiple sets of parameters. So, in each tab in the main view user can maintain multiple settings for example, Linear, 2-exposure HDR, 3-exposure HDR, etc., and easily flip between them & save them all in one file.
User Launch
ModeCalc is part of the DevX release, it will be in the bin folder of the installation path. As the user launches it, will look like below.
ModeCalc Window
Once user loads the python module or saved json file from the session pane the ModeCalc window will appear as shown below. The ModeCalc window has multiple sub windows.
Parameters Pane
This pane is populated with the default values from the loaded python module.
Pane has multiple sections.
Sensor Config Overview: User can choose the sensor config related parameters and modify the values as per his requirements to generate the recommended output values.
Integration Time settings: Provides user an option to override the default value into a new value by clicking on the respective check boxes.
Advanced Clock Settings: Provides an option to override the divider and multiplier values.
AdvancedSensorModeSettings: Provides an option to override the values of Image width / height, FOV Values, Embedded Rows, DTR, STR, Stats values.
Advanced MIPI Timing: Provides option to choose the MIPI clock to be Continuous or Non-Continuous, MIPI Timing Margin values etc.
Advanced Shutter Settings: Provides user to override the advanced shutter related fields.
Notes Pane
Shows up the summary of the output values generated with the given set of the input parameters in Parameters pane. Covers the summary of the Clock Settings, MIPI Timings, Fine Integration Timing details, Delay Buffers, Frame Timing data.
Register Settings Pane
This pane gives the updated register values to be loaded into the sensor for a particular mode based on the input parameters provided by user in parameters pane. User can save these values either into an ini file or shared settings file. The details on how to save are provided in the Export window section.
Errors Pane
While overriding the default values to an any value in parameters pane, the errors pane shows up the error details & also gives info on the possible fix for the error.
ModeCalc Window’s top pane provides different functionalities to an user. Each of them are explained in detail in below sections.
Session
Modes
Export
Python
Session Window
This window provides user below functionalities.
New Session… : User can start the new session by providing the right python module.
Open session… : User can open a session by providing the proper json file, where in which both json file & python module file should be in same location.
Save session : To save the current session.
Save session As… : To save the session to proper json file name.
Recent Session Files : Shows the lists of recent sessions it may be either a python module file, json file or ini file.
Each of the session operations are shown below.
New session
Once user clicks new session, a window will pop up which lists the sensor part numbers which are previously loaded or user can select the new python module file by choosing the option “Browse for a file…”
Once the user selects the right python module and clicks ok, the ModeCalc window will look like below picture. This window will load all the default parameters for each of the controls from the python module and generates the output.
Open Session
User can load a session by choosing the proper json file. The json file which was saved earlier should be in the same path where the python module file resides. Below picture has BLUE colored highlighted section which clearly shows the json data files from the folder location. Once user chooses a particular json file, ModeCalc will load the parameters as per the json file and displays the results.
Save Session
This option will save the current session to a json file format.
Save Session As
This option helps the user to save the session to a json file format. User can load this saved session using open session option.
Modes Window
Modes window will help the user in below scenario.
User has loaded a mode using the python module. Later he want to generate a new mode by slightly modfying few parmeters. In such scenario user go to Modes section and clone the current mode and update the parmeters he is interested and look for the results.
In the below picture the modes generated and cloned are highlighted in blue color.
User has generated HDR_2_exp_Full_Resoution_Mode_4_Lane_12bit_38fps_nontrimed mode and cloned to generate a new mode by modifying the exposure from 2 to 4 i.e HDR_4_exp_Full_Resoution_Mode_4_Lane_12bit_38fps_nontrimed.
In other mode user has updated the exposure from 2 to 3 to get HDR_3_exp_Full_Resoution_Mode_4_Lane_12bit_66fps_nontrimed.
User can switch to any of the mode by clicking on the respective tabs or by choosing the modes listed in the Modes window.
Export Widow
User has generated a mode and has to export this settings / mode / preset to proper file format so that this preset can be tested in DevX or in Canvas. ModeCalc provides an option to save the generated mode into 3 different options –
Shared settings format
Ini file format
Json file format
Single Mode exported in Shared Settings format.
A sample shared setting file for a single mode is shown below.
ModeCalc generates both the initializer configuration file and python file with all the parameters values as shown below.
Initializer file
Python File
Single mode exported to an Ini file.
Multiple Modes exported into a Shared Settings file.
When user has cloned a mode and generated multiple modes / settings out of it and wants to save all the modes into a single shared setting file. ModeCalc can does by export option. User can choose export and choose the Shared settings format. ModeCalc will generate below initializer file and python file supporting multiple modes.
Initializer file
Python file with multiple modes.
Multiple modes exported to an ini file format.
In below picture clearly, we can see at line numbers 2, 30 & 58 provides the multiple mode names and rest of the lines depicts the standard ini file modules generated by ModeCalc which are required to load these settings in DevX.
Python Window
User has loaded a session with python module file and wants to update or change the source of the file with some new parameters or formulas. In such scenario, ModeCalc provides an option to load the Python source file and update those and check the results on fly. On the pane window click on “Python” and load the respective python source file. Once user selects the proper python source file, a python text editor will appear where use can update the values or formulas & execute it to check for the result.
The below picture depicts the same.