Skip to main content

hi,  i have a csv file with x by y cells.  each cell row and column represents an x, y position in microns.  each cell has a z height corresponding to the x, y position.  

 

I would like to import this csv file into a grid sag surface  to create a surface in zemax.  

 

how can i do this?

Hi John,

the grid sag surface requires a .DAT file with a specific format. The format is described in the following article: How to use the Grid Sag surface type – Knowledgebase (zemax.com)

Your .CSV file does not seem to conform to the .DAT file format. The conversion can be done programmatically, you can find MATLAB and Mathematica examples in this article here: How to write a Grid Sag DAT file programmatically – Knowledgebase (zemax.com)

Best regards
Benjamin


Reply