## Generic file format

The Generic file format is a text format that consists of three data columns, X, Y, and Z, separated by space (see Table 1).

**Note**: This format is one of the export formats. It is not supported by any of the

viewers.

X | Y | Z |

1 | 1 | 1 |

X | Y | Z |

2 | 2 | 2 |

X | Y | Z |

3 | 3 | 3 |

.. | .. | .. |

. | . | . |

X | Y | Z |

N | N | N |

**Table 1: Generic file format**

## Data file formats

Optiwave software uses the text data format for saving the simulation results and reading user defined fields and index of refraction distributions:

- Real Data 2D File Format: BCF2DPC
- Real Data 3D File Format: BCF3DPC
- Complex Data 2D File Format: BCF2DCX
- Complex Data 3D File Format: BCF3DCX
- User Refractive Index Distribution File Format

Optiwave software uses several different formatted text files for reading and saving optical fields and index of refraction distributions.

## Real Data 2D File Format: BCF2DPC

Applies to input and output files that contain real data as text. The file contains the file

header, number of data points, and the real x and y data points:

BCF2DPC | file header (this string is used to identify the file type) |

N | number of data points |

X1 Y1 | first x and y data separated by space |

X2 Y2 | second x and y data point |

. | |

. | |

. | |

XN YN | last x and y data point |

## Files that follow the BCF2DPC format

- Output files in 2D: [*.rpd], [*.poi]
- Output files in 3D: [*.rpd], [*.poi]

**Example: Power overlap integral output file in 2D [*.poi]**

In this example, a Gaussian input field is propagated in a Linear Waveguide from the starting distance 0.000000E+000 to the end distance 1.000000E-001. The propagating field is overlapped with the starting field, giving the power overlap value 1.000000E+000 at the start and the value 4.034535E-001 at the end of propagation. The number of displays in the Global Data dialog box is 30, while the actual number of saved data points is 31. This is, because the file contains also the power overlap value at the start of propagation in addition to 30 values from the propagation.

BCF2DPC | file header | |

31 | number of data points | |

0.000000E+000 1.000000E+000 | start distance and power overlap at start | |

3.3300000E-003 | 3.558430E-001 | distance and power overlap |

6.670000E-003 | 3.663763E-001 | distance and power overlap |

. | ||

. | ||

9.333000E-002 | 4.039581E-001 | distance and power overlap |

9.667000E-002 | 4.038129E-001 | distance and power overlap |

1.000000E-001 | 4.034535E-001 | end distance and power overlap |

## Real Data 3D File Format: BCF3DPC

This format applies to input and output files that contain real data as text. The file contains the file header, number of x and y data points, minimum and maximum values of x, y and z, and the real z(x,y) data points. The data points are presented in one column with the order determined by scanning the x and y coordinates.

BCF3DPC | file header |

NX NY | number of x and y data points |

XMIN XMAX | minimum and maximum x values |

YMIN YMAX | minimum and maximum y values |

ZMIN ZMAX | minimum and maximum z values |

Z1 | real z data point with coordinates (xmin, ymin) |

Z2 | real z data point with coordinates (xmin+dx, ymin) |

Z3 | real z data point with coordinates (xmin+2dx, ymin) |

. | |

ZNX | real z data point with coordinates (xmax, ymin) |

ZNX+1 | real z data point with coordinates (xmin, ymin+dy) |

. | |

. | |

ZN | last real z data point with coordinates (xmax, ymax), where N=NXxNY |

where dx = (xmax-xmin)/(nx-1) and dy = (ymax-ymin)/(ny-1).

## Files that follow the BCF3DPC format

- Output files in 2D: [*.amp], [*.pha], [*.rri]
- Output files in 3D: [*-x.amp], [*-y.amp], [*-x.pha], [*-y.pha], [*-x.rri], [*-y.rri]

For more information, see Data file formats.

**Example: Real refractive index in 2D [*.rri]**

In this example, the transverse mesh extends from -5.000000E+000 to 5.000000E+000 microns. The propagation distance extends from 0.000000E+000 to 1.000000E-001 millimeters. A Linear Waveguide with refractive index 1.5 is laid out on a wafer with the index 1.3. The number of mesh points is 100 and the number of displays in the Global Data dialog box is 30. The actual y number of saved index x distributions is 31. This is, because the file contains also the index distribution at the start of propagation in addition to 30 values from the propagation.

BCF3DPC | file header | |

100 31 | number of x and y data points | |

-5.000000E+000 | 5.000000E+000 | minimum and maximum transverse mesh values |

0.000000E+000 | 1.000000E-001 | minimum and maximum distance |

0.000000E+000 | 1.000000E+000 | unused values added to conform to the formatNote: Optiwave software adds a line of default values 0 and 1 to conform this format. |

1.300000E+000 | real z data point with coordinates (xmin, ymin) | |

1.300000E+000 | ||

1.300000E+000 | ||

. | ||

. | ||

. | ||

1.300000E+000 | ||

1.300000E+000 | ||

1.300000E+000 |

## Complex Data 2D File Format: BCF2DCX

This format applies to input and output files that contain complex number data as text.

The file contains the file header, number of data points, mesh width, and the complex

z data points:

## New format

BCF2DCX 3.0 | file header |

N | number of data points |

Xmin Xmax | minimum and maximum of x values |

Z1 | first complex data point |

Z2 | second complex data point |

. | |

. | |

. | |

ZN | last complex data point |

## Files that follow the BCF2DCX format

- Output files in 2D: [*.f2d]

For more information, see Data file formats.

## Example: Complex field (end of propagation) in 2D [*.f2d]

In this example, the number of data points, that is, the number of mesh points is 100.

The transverse mesh extends from -5.000000E+000 to 5.000000E+000 microns

giving the mesh width 1.000000E+001 microns.

BCF2DCX | |

100 | |

1.000000E+001 | 3.000000E+001 |

-1.625361825110615E-003, | -4.389245939619818E-004 |

-1.509141347436203E-003, | -5.157781413025380E-001 |

1.396612427100470E-003, | 5.882450646580990E-004 |

. | |

. | |

. | |

1.396612427102228E-003, | -5.882450646589938E-004 |

-1.509141347437384E-003, | -5.157781413024150E-004 |

-1.625361825110870E-003, | -4.389245939610474E-004 |

## Complex Data 3D File Format: BCF3DCX

This format applies to input and output files that contain complex data as text. The file contains the file header, number of x and y data points, mesh widths in x and y, and the complex z(x,y) data points. The data points are presented in one column with the order determined by scanning the x and y coordinates.

## New format

BCF3DCX 3.0 | file header |

NX NY | number of x and y data points |

Xmin Xmax Ymin Ymax | minimum and maximum x and y values |

Z1 | complex number z data point with coordinates (xmin, ymin) |

Z2 | complex number z data point with coordinates (xmin+dx, ymin) |

Z3 | complex number z data point with coordinates (xmin+2dx, ymin) |

. | |

ZNX | complex number z data point with coordinates (xmax, ymin) |

ZNX+1 | complex number z data point with coordinates (xmin, ymin+dy) |

. | |

. | |

ZN | last complex number z data point with coordinates (xmax, ymax), N=NXxNY |

where dx = (xmax-xmin)/(nx-1) and dy = (ymax-ymin)/(ny-1).

**Example: Complex field (end of propagation) in 3D [*.f3d]**

In this example, the number of data points is 100 and equals to the number of mesh points. The transverse mesh extends from -5.000000E+000 to 5.000000E+000 microns giving the mesh width 1.000000E+001 microns.

BCF3DCX 3.0

100 100

1.000000E+001 1.100000E+001 2.000000 E+001 3.000000 E+001

-4.582487025358980E-004, | -2.411965546811583E-002 |

1.813879122411751E-004, | -2.322439514101689E-002 |

8.864140535377826E-004, | -2.245463661588051E-002 |

. | |

. | |

. | |

-1.004141897700716E-002, | 7.709994296904761E-003 |

-9.736326254112302E-003, | 8.732395427319460E-003 |

-9.270032367315658E-003, | 9.686774052240091E-003 |

## Files that follow the BCF3DCX format

- Output files in 3D: [*.f3d]

For more information, see Data file formats.

## User Refractive Index Distribution File Format

UPI2DRI 3.0 | file header |

NPM | number of points in mesh |

XMIN XMAX | min and max mesh points |

Z1 | first complex number data point |

Z2 | second complex number data point |

. | |

. | |

. | |

ZN | last complex number data point |

**Example**

UPIDRI 3.0 | |

500 | |

-50 50 | |

1.491000000000000E+000, | 0.000000000000000E+000 |

1.491000000000000E+000, | 0.000000000000000E+000 |

. | |

. | |

. | |

1.491000000000000E+000, | 0.000000000000000E+000 |

## Default format for 3D Refractive Index Distribution

UPI3DRI 3.0 | file header |

NPMX NPMY | number of points in mesh in X and Y |

Xmin Xmax Ymin Ymax | min and max mesh points in X and Y |

Z1 | first complex number data point |

Z2 | second complex number data point |

. | |

. | |

. | |

ZN | last complex number data point |

**Example**

UPI3DRI 3.0 | |

151 121 | |

-7.5 7.5 -3 3 | |

3.300000000000000E+000, | 0.000000000000000E+000 |

3.300000000000000E+000, | 0.000000000000000E+000 |

. | |

. | |

. | |

3.250000000000000E+000, | 0.000000000000000E+000 |

## Reading User Refractive Index Files

During the propagation, the Optiwave software simulator reads the index distribution

file in a step by step manner. The information for reading the user data file is provided

by the Device Layout Designer and it concerns the number of mesh points and the

extent of the User Defined File Region.

If the refractive index distribution as defined by the properties of the region is

independent of the propagation distance (i.e. constant), then the simulator reads the

index data only once, for the first step of propagation in the region and uses the same

data for every step in that region.

If the refractive index distribution is defined as propagation dependent, then the

propagation enters the User Defined File Region, the program reads index of

refraction data for each propagation step. The number of lines that is read at one step

is equal to the number of transverse mesh points.

For more information, see Data file formats.

## Complex Data 3D Vectorial File Format: BCF3DCXV

This format applies to input and output files that contain vectorial complex data. The

file contains the file header, number of x and y data points, mesh widths in x and y,

and the complex z(x,y) data points both for Ex and Ey field components. The data

points are presented in one column with the order determined by scanning the x and

y coordinates.

BCF3DCXV | file header |

Nx Ny | number of x and y mesh points |

Xmin Xmax Ymin Ymax | minimum and maximum X and Y coordinates |

Za1 | complex field (Ex field component) at point with coordinates (xmin, ymin) |

Za2 | complex field (Ex field component) at point with coordinates (xmin+dx, ymin) |

Za3 | complex field (Ex field component) at point with coordinates (xmin+2dx, ymin) |

. | |

ZaNX | complex field (Ex field component) at point with coordinates (xmax, ymin) |

ZaNX+1 | complex field (Ex field component) at point with coordinates (xmin, ymin+dy) |

. |

. | |

ZaN (N=Nx*Ny) | complex field (Ex field component) at point with coordinates (xmax, ymax) |

Zb1 | complex field (Ey field component) at point with coordinates (xmin, ymin) |

Zb2 | complex field (Ey field component) at point with coordinates (xmin+dx, ymin) |

Zb3 | complex field (Ey field component) at point with coordinates (xmin+2dx, ymin) |

. | |

ZbNX | complex field (Ey field component) at point with coordinates (xmax, ymin) |

ZbNX+1 | complex field (Ey field component) at point with coordinates (xmin, ymin+dy) |

. | |

. | |

ZbN (N=Nx*Ny) | complex field (Ey field component) at point with coordinates (xmax, ymax) |

where N=Nx*Ny, dx=(xmax-xmin)/(Nx-1), and dy=(ymax-ymin)/(Ny-1).

**Note**: The total number of data points is twice the number of the total mesh points

Nt=2*N.

**Path Monitoring File Format**

The sample is provided (*.**mon**):

**BCF2DPM**

**Npts NPath Number of data points (lines) and number of paths**

[Distance] | [Path 1] | [Path 2] | [Path 3] | …[Path NPath] text discriptor |

XCoord 1 | P1val1 | P2val1 | P3val1 | …. PNPathval1 |

XCoord 2 | P1val2 | P2val2 | P3val2 | …. PNPathval1 |

… | ||||

XCoord NPts | P1valNPts | P2valNPts | P3valNPts | …. PNvalNPts |

**Power In Output Waveguides File Format**

The sample is provided (*.**piw**)

**BCF2DMC**

**Npts NPath Number of data points (lines) and number of paths**

[Distance] | [Path 1] | [Path 2] | [Path 3] | …[Path NPath] text discriptor |

XCoord 1 | P1val1 | P2val1 | P3val1 | …. PNPathval1 |

XCoord 2 | P1val2 | P2val2 | P3val2 | …. PNPathval1 |

… | ||||

XCoord NPts | P1valNPts | P2valNPts | P3valNPts | …. PNvalNPts |

**Power In Output Waveguides File Format**

The sample is provided (*.**piw**)

**BCF2DMC**

**NPts WGN Number of data points (lines) and number of waveguides**

[Wavelen] | [ WG1 ] | [ WG2 ] | [ WG3 ] | …. [ WGWGN] text descriptor |

XCoord1 | P1val1 | P2val1 | P3val1 | …. PWGNval1 |

XCoord2 | P1val2 | P2val2 | P3val2 | …. PWGNval2 |

… | ||||

XCoordNPts | P1valNPts | P2valNPts | P3valNPts | …. PWGNvalNPts |