Exporting contents of LDF file to MAT file


#1

Hi,

I would like to export the mode profile of a Gaussian beam, including all E-field components, to .MAT file.

I know a Gaussian beam profile can be generated in the “Overlap analysis” window within Eigensolver Analysis, and then saved as an .LDF file. However, can I use scripting to export that data to .MAT format?

If not, is there another way to export Gaussian beam profile E-field data to .MAT?

Thanks,
Herman


#2

Hi @herman.wong

Yes, you can. After you click on “Create Beam”, the Gaussian beam profile will be saved on DECK. The next step would be to use some scripting to send data to workspace to export. Lets says that the name of the file on d-card1 is gaussian. You can use getdata command to view and send available data to workspace:

Here is also a good link for your review:

Once, for example, the Ex data is sent to workspace, you can use matlabsave command to save it in the .mat file.

You can modify matrix and build one using matrixdataset command.

I hope this answered your question.

Thanks


Question about how to save far field data in MODE as ldf and reload for mode overlap calculations
#3

Thanks! That helped.

Best,
Herman