The import generation object allows users to import optical generation data into DEVICE. The data should be defined in a rectangular coordinate. The coordinate vectors should be named x, y, and z, and the generation matrix should be named G with a dimension (A x B x C) where A, B, and C are the lengths of the vectors x, y, and z. The data can be saved in a Matlab data file (.mat) and loaded into DEVICE. There are two ways in which this data can be loaded into the import generation object in DEVICE.
Using the GUI: The easiest way to load the data is through the property editor of the import generation object in the GUI. To do this, simply open the property editor for the import generation object, click ‘Browse’ and select the .mat file with the generation data.
Using script: Often we want to create our simulation file using script commands. In such a case, we need to create a rectilinear dataset that can be loaded into the generation object. We need to first load the data into the script workspace using the matlabload command and then create the dataset using the rectilineardataset command. Finally we can attach the dataset to the import generation object using the importdataset command. A sample script is shown below:
matlabload(‘GenRate.mat’); # read the data
Gen = rectilineardataset(x,y,z); # create the dataset
addimportgen; # create the import generation object
importdataset(Gen); # attach the data to the import generation object
set(“selected attribute”,“G”); # select the data in the dataset created by the object