Adding Birefringent Materials from Data Files

This knowledge base article describes a FRED script (see attached file) which can be used to add a birefringent material to a FRED document using a data file.  Unlike sampled materials, there is currently no option to add birefringent material data from file through the graphical user interface.  The script itself uses the BASIC dialog capabilities to prompt the user for the material name, file location and crystal axis.

The pseudocode for the script is the following (documented in attached script):

  1. Prompt user to select file path
  2. Prompt user to enter material name
  3. Open the file, read data, and add sampled birefringent material
  4. Prompt user to enter the crystal axis vector

The file format for the text file is simple three column data separated by tabs, spaces or commas of the form: wavelength n_ordinary n_extraordinary.

This script can easily be modified to support additional gyrotropic coefficient data columns in the text file.  These values are currently set to zero in the script.
Download the FRED Script:readBirefringentData.frs