Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Manipulating objects

importbinary

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Import binary data (1s and 0s) over an entire volume from a file. The object will be present wherever the binary data is 1 and not when it is 0. This command only applies to import primitives. The function returns 1 if the data is successfully imported. Example script files showing how to use these functions can be found in the Online Help. See the User Guide, Structures section.

 

Supported Product: FDTD, MODE

 

Syntax

Description

out = importbinary(filename,file_units,x0,y0,z0,reverse_index_order);

Import binary data from filename in three dimensional simulations. All arguments after the filename are optional.

 

Parameter

Default value

Type

Description

filename

required

string

name of the file with binary data to import. May contain complete path to file, or path relative to current working directory

file_units

"m"

string

The optional string argument file_units can be "m", "cm, "mm", "microns" or "nm" to specify the units in the file.

x0

0

number

The optional arguments x0, y0 and z0 specify the data origin in the global coordinates of the Graphical Layout Editor. For example, if you defined your volume with respect to a particular point in space, for example (0,0,-5) microns, then you should set z0 to -5 microns.

y0

0

number


z0

0

number


reverse_index_order

0

number

The optional argument reverse_index_order can be set to 1 to reverse how the indices are interpreted in the file. It is best to verify the correct setting with a graphical import before using the script command.

 

Example

Please refer to the importing spatial binary example for details.

 

See Also

Manipulating objects, importbinary2

Copyright Lumerical Inc. | Privacy | Site Map