Starting in 2025 R2.4, you can edit the source data for elements directly in the GUI for Ansys Lumerical CML Compiler™ as an alternative to editing the JSON files directly. You can intuitively edit most data fields for all elements using this data editor.
This article describes the functionalities of this data editor and highlights various special cases and limitations.
Note: This feature is an initial release, and there are a small number of limitations with respect to some elements, resulting in some fields or functionalities being unavailable. If editing a certain data field is currently unavailable in the GUI data editor, the alternative is to edit the JSON files directly.
General usage
Workflow
The general workflow of editing the source data in the GUI is as follows:
- Select one or more elements you want to edit, and open the GUI data editor by clicking on the edit button
. You can also open the data editor for any element by double clicking on its name in the element status center. When you select multiple elements, the edit button
opens all elements in separate tabs.
- View and update the data using the different fields under different tabs in the data editor. Usage of the data editor and special cases are discussed in the rest of this article. Note that the changes you make are not saved until you complete data validation in step 3.
- Click on the “Validate” button to validate the updated data. If validation passes, the changes are saved in the source JSON file. When validation fails, the source JSON file is not updated, and the invalid fields are highlighted.
Warning: The “Validate Data” button in the toolbar works on the saved copy of the source JSON file. If you update data for any element using the GUI, you must first save it to the JSON file using the “Validate” button in the data editor window. Until the changes are saved, the “Validate Data” and other buttons, such as “Build Library”, uses the old data from the source JSON file.
Editing the source data of an element is now complete, and you can proceed to compiling your library and to running QA tests with your CML.
Element data fields
Element properties in the GUI data editor follow the template of that element, which you can find on the directory on the Knowledge Base. Each group for the template is displayed in a separate tab.
Data displayed in the GUI data editor depends on what is in the compact model template source JSON file. Some photonic models require different sets of input data depending on the element being modeled. For example, the elec_eq_ckt_data is not required for a phase shifter when building an INTERCONNECT model but is mandatory when building a Verilog-A model for the same element. The GUI data editor does not allow you to add/edit these optional data, unless they are already present in the JSON file.
To address this, we recommend starting with a lumfoundry template element that best represents all the data you need to provide for your compact model. However, if such a template is not readily available, you can manually add optional data to the JSON, and they will then become available for edit in the GUI data editor.
The example below demonstrates various features of the main editor window using the Waveguide Straight (Fixed) template and the wg_strip_straight_c element from the lumfoundry template CML.
Warnings and indications are provided in the GUI to aid this process, as follows:
- Required fields for a photonic model is marked with an asterisk
*beside the name. - Once you edit a field, the tab that field belongs to is marked with a dot to denote that it was edited. This indicator is displayed even if you reverted a field back to the unedited value and does not disappear until you save the element by validating it or discarding all changes.
- When an invalid type of data is entered into a field, the box is highlighted in red to indicate the issue.
- Expressions referring to the ROOT element of INTERCONNECT, such as
%temperature%is supported.
You can edit most data fields intuitively; the subsequent section discusses special cases when using the data editor.
Special data fields and limitations
Adding and removing fields
Certain fields, such as notes and ports for certain models can contain multiple fields with similar options. For these elements, you can use the corresponding “Add” buttons to add more entries to the list, as shown below.
For fields where each entry can be removed independently, a “x” button is typically displayed near the field. You can use that field to remove the entries. For fields where addition and removal must be sequential, such as ports, a “Remove” button is displayed with the add button and pressing it removes the final entry.
You can also add and delete parameters from parameterized models using the GUI, using the “Add Parameter” button near the end of each parameter section. This opens a new window, and you can select which fields are included in the parameter using check boxes for each row.
You can remove parameters using the “x” button, and parameters you add are automatically included in the QA section of the element or in the model_data section of the element as applicable.
Editing fields with 1-D and 2-D matrix
You can edit element data fields containing 1-D and 2-D matrices using the built-in matrix editor.
Open the matrix editor by clicking on the element data field.
The matrix editor only supports real number inputs, along with the scientific notation “e” and “E”. An error is shown for an invalid input.
Basic controls of the matrix editor are as follows:
- Single-click on a cell to select it.
- Double-click on a cell to edit it.
- Drag the cursor to select multiple cells.
- Click on the row or column number to select the corresponding row or column.
Buttons on the side of the matrix editor supports the following controls:
- Add Row: Adds a row at the end.
- Add Column: Adds a column at the end.
- Remove: Removes highlighted cell(s), row, or column.
- Import: Import a comma separated
.txtor.csvfile into the editor.
Editing fields with 3-D and higher dimensional matrix
Matrices with dimesnions higher than 2-D cannot be viewed within the GUI data editor. You can import these data by clicking on the element data field, and selecting a JSON file that conforms to the Lumerical JSON format. The data must have the _type, _data, and _size fields.
Structures
Some elements, such as scripted elements, requires you to import structures with custom fields. In this case, you can use the GUI to load a JSON file with custom fields of your choosing.
Compound elements
The element and connection structures for compound elements are directly available in the GUI as tables. The diagrams below show how each column of the tables correspond to the fields in the structure. You can add and delete rows from tables in the same way as adding and deleting parameters. See the template page for the photonic model for more information on the description for each field.
In the connection table, the columns respectively represent the fields E1_name, E1_port, E2_name, and E2_port.
In the elements table, the columns respectively represent the element, name, and properties for each element inside the compound element. The property name and values are written as key-value pairs, separated using ;. If an element doesn’t need any property value to be set then the properties field should be kept empty.
Statistical elements and parameters
You currently can’t add or delete statistical parameters in the GUI. However, you can edit parameters in the GUI like any other fields if they are displayed.
To add statistical parameters or additional sensitivity of certain parameters with respect to each parameter (slope_xxfields), use a template that has the necessary fields or manually add the missing fields in the JSON file. Once the field is added in the JSON file, it becomes available for edit and validation through the GUI data editor.
Note: You cannot add statistical data to nominal elements in the GUI data editor, add them by directly modifying the source JSON file.