Navigation: Sources > Ray Positions > User Defined Rays

 

User Defined Rays

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


This feature defines ray position, direction, power, and path length for each ray in a tabular form.  Rays can also be read from a file into the dialog specification by right mouse clicking in the spreadsheet area and selecting "Replace with rays from a file".  If the number of rays is significant, it is recommended that the ray position specification "Read rays from a file and generate dynamically" be used in order to reduce the size of the FRED model in memory.

 

 

Navigation


This command can be accessed by selecting User defined rays (manually defined) as the ray position type on the Positions/Directions tab of a detailed source dialog box.

 

 

Controls


Control

Inputs / Description

Defaults

Ray Positions

Type

Drop down menu for selecting the method of defining ray positions.  Select "User defined rays".

Grid plane

Parameters

X Pos

X coordinate of the ray position.

0

Y Pos

Y coordinate of the ray position.

0

Z Pos

Z coordinate of the ray position.

0

X Dir

X component of the ray direction cosines a.

0

Y Pos

Y component of the ray direction cosines b.

0

Z Pos

Z component of the ray direction cosines g.

1

Power

Power of the ray

1

Path Len

Path length of the ray at this (X, Y, Z) location.

0

 

OK

Accept settings and close dialog box.

 

Cancel

Discard settings and close dialog box.

 

Apply

Apply settings and close dialog box.

 

Help

Access this Help page.

 

 

 

Application Notes


Rays from file

User-defined ray data from a file can be imported in the following formats:

FRED binary format ( .ray )

FRED/Generic text format ( .dat )

TracePro binary format ( .ray )

TracePro / Oslo text format ( .dat )

Zemax binary format ( .dat )

OPTICAD binary format ( .ray )

LightTools text format ( .ray )

ASAP binary format ( .dis )

LucidShape binary format ( .ray )

 

To load ray data from a file, right mouse click in the spreadsheet area and select either “Append Rays From a File…” or “Replace With Rays From a File…” from the list menu.  Note that it is important to specify the correct ray file data type in the “File Open” dialog before attempting to import rays from the file as the wrong data type will result in invalid rays being imported.

 

Control

Inputs / Description

Defaults

Name

Ray file name

N/A

Format

Ray file format  [binary = *.ray  or  text = *.txt]

N/A

Total number of rays in file

Total number of rays

N/A

Start/Stop

Beginning/ending ray number

1, max #

Read every n’th ray

Reduces number of rays read by a factor of n

1

 

OK

Accept settings and close dialog box.

 

Cancel

Discard settings close dialog box.

 

Help

Access this Help page.

 

 

 

The User-defined Source type reads FCR and ASCII rayfile types. This source cannot read the FRBS file type.

 

Text file format for entry of user-defined rays is one ray per row with eight columns of data (Xpos, Ypos, Zpos, Xdir, Ydir, Zdir, Power and Pathlength).  An example format is shown below.

 

 

 

 Ray limit

The User-defined Rays source type is limited to 5 million rays or less. This limitation is due entirely to issues related to populating the spreadsheet table in the dialog box. If more than 5 million rays must be loaded, then the Imported Source type must be used.

 

Export to a FRED Script File

If a document containing a source with user-defined ray position specifications is exported to a FRED script file (Menu > File > Export > FRED Script Format), a *.frr file will be written to the same directory as the *.frs file.  The *.frr file should then travel with the *.frs file and placed in the same directory if the script file is used to rebuild the model at a later date.

 

 

Related Topics


Ray Positions - Bitmap

Ray Positions - Grid Plane

Ray Positions - Hexagonal Plane

Ray Positions - Read rays from a file

Ray Positions - Random Plane

Ray Positions - Random String

Ray Positions - Random Volume

Ray Positions - User-defined Rays

 

 

 

 

 

Copyright © Photon Engineering, LLC