3. The Raith_element class

Class overview: Raith_element

Properties (public)

Raith_element.type

Character array specifying type of element

Raith_element.data

Structure with fields defining element geometry

Methods

Raith_element.plot()

Plot element as filled polygons

Raith_element.plotedges()

Plot element as unfilled polygons

class Raith_element

Raith_element objects define low-level, unnamed patterns, collections of which are bundled together to form named structures in the GDSII library.

3.1. Properties

Raith_element.type

Character array specifying type of element; allowed values are 'polygon', 'path', 'dot', 'arc', 'circle', 'ellipse', 'text', 'fbmspath', 'fbmscircle', 'sref', or 'aref'.

Raith_element.data

Structure containing additional record data for element; allowed field names and typing of values are determined by the element type (see §3.2).

3.2. Constructors

E=Raith_element('polygon',layer,uv,DF)
E=Raith_element('path',layer,uv,w,DF)
E=Raith_element('dot',layer,uv,DF)
E=Raith_element('arc',layer,uv_c,r,theta,angle,w,N,DF)
E=Raith_element('circle',layer,uv_c,r,w,N,DF)
E=Raith_element('ellipse',layer,uv_c,r,w,angle,N,DF)
E=Raith_element('text',layer,uv_0,h,angle,uv_align,textlabel,DF)
E=Raith_element('fbmspath',layer,uv,cvtr,w,DF)
E=Raith_element('fbmscircle',layer,uv_c,r,w,DF)
E=Raith_element('sref',name,uv_0[,mag[,angle[,reflect]]])
E=Raith_element('aref',name,uv_0,n_colrow,a_colrow[,mag[,angle[,reflect]]])

The above constructors may be used to create Raith_element objects. The first argument sets the element type property, followed by a list of arguments comprising the fields of the data property (a MATLAB struct object), which vary depend on the type. Agruments shown in brackets are optional. Alternately, an empty, argumentless Raith_element object may be called, with the type and data properties assigned afterward. For example:

E=Raith_element;
E.type='polygon';
E.data.layer=0;
E.data.uv=[0 1 1 0 0;0 0 1 1 0];
E.data.DF=1.5;

The above is equivalent to

E=Raith_element('polygon',0,[0 1 1 0 0;0 0 1 1 0],1.5);

By default, all properties are checked for correctness (typing, allowed values, size) before being assigned, whether the Raith_element object is created with a constructor or its properties are amended individually; this behaviour can be disabled if necessary (see §7.1).

Descriptions of the eleven Raith_element types are given in the following subsections.

3.2.1. Polygon element

Description:

Closed, filled polygon

Constructor:

E=Raith_element('polygon',layer,uv,DF)

Properties:
  • type'polygon' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv – 2 × n matrix [u;v] of polygon vertices (µm)

  • data.DF – Dose factor for polygon

Note

If the first and last vertices in data.uv are not the same (i.e., an open polygon), data.uv is amended to close the polygon and a warning is issued.

Example

E=Raith_element('polygon',0,[0 2 2 1 1 0 0; ...
                             0 0 1 1 2 2 0],1.3);
_images/polygon_element.svg

Fig. 3.1 Example 'polygon' element

3.2.2. Path element

Description:

Path of line segments

Constructor:

E=Raith_element('path',layer,uv,w,DF)

Properties:
  • type'path' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv – 2 × n matrix [u;v] of path vertices (µm)

  • data.w – Width of path (µm); a value of zero yields single-pixel line; a negative value is considered to be the same as zero by the Raith NanoSuite software (single-pixel line)

  • data.DF – Dose factor for path

Note

The interpretation of a negative value for GDSII path WIDTH records differs between the Raith NanoSuite software and the standard GDSII specification. In the former, a negative width is considered the same as zero width (single-pixel line); in the latter, a negative value denotes an absolute width, that is, a fixed width which is not affected by magnification of any parent structure ('sref' or 'aref' elements).

Example

E1=Raith_element('path',0,[0 0 1 1 2;1 0 0 1 1],0,1.3);
E2=Raith_element('path',0,[0 0 1 1 2;1 0 0 1 1],0.2,1.3);
_images/path_element.svg

Fig. 3.2 Example 'path' elements

Element E1: data.w = 0; Element E2: data.w = 0.2

3.2.3. Dot element

Description:

Single-pixel dot(s)

Constructor:

E=Raith_element('dot',layer,uv,DF)

Properties:
  • type'dot' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv – 2 × n matrix [u;v] of dot positions (µm)

  • data.DF – Dose factor(s) for dot(s); if scalar, all dots given in data.uv have the same dose factor; if vector, data.DF must be the same length as data.uv and specifies the dose factor of each dot

Example

E1=Raith_element('dot',0,[0 2 2 0;0 0 1 1],1.3);
E2=Raith_element('dot',0,[0 2 2 0;0 0 1 1],[0 0.5 1.0 1.5]);
_images/dot_element.svg

Fig. 3.3 Example 'dot' elements

Element E1: scalar data.DF; Element E2: vector data.DF

3.2.4. Arc element

Description:

Segment of circular or elliptical path (Raith curved element)

Constructor:

E=Raith_element('arc',layer,uv_c,r,theta,angle,w,N,DF)

Properties:
  • type'arc' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv_c – Arc centre; 1 × 2 vector [uc vc] (µm)

  • data.r – Radius of arc; may be scalar for a circular arc, or a 1 × 2 vector denoting semi-axes, [a b], for an elliptical arc (µm); a corresponds to the semi-axis in the data.angle direction

  • data.theta – Starting and ending angles of arc with respect to axis defined by data.angle argument, counter-clockwise positive; 1 × 2 vector [θ1 θ2] (degrees)

  • data.angle – Angle of rotation ϕ between positive u-axis and θ = 0 axis (degrees)

  • data.w – Arc linewidth (µm); if empty, arc is a filled elliptical disc segment; if zero, arc is a single-pixel line; if non-zero, arc has a width (elliptical annulus sector); a negative value is considered to be the same as empty by the Raith NanoSuite software (filled elliptical disc segment)

  • data.N – Number of vertices along arc length

  • data.DF – Dose factor for arc

Note

Arc elements are interpreted by the Raith NanoSuite software using the following parametric equations:

\[ \begin{align}\begin{aligned}u(\theta)=u_c+a\cos(\theta)\cos(\phi)-b\sin(\theta)\sin(\phi)\\v(\theta)=v_c+a\cos(\theta)\sin(\phi)+b\sin(\theta)\cos(\phi)\end{aligned}\end{align} \]

with \(\theta\in[\theta_1,\theta_2]\) spaced linearly over data.N points. As such, for elliptical arcs (i.e., \(a\not= b\)), \(\theta\) is a parametric angle, and does not in general correspond to the angle from the positive u axis (assuming \(\phi = 0\)). To convert between the polar angle from the ellipse centre \(\phi'\) and the parametric angle \(\theta\) required by data.theta, use

\[\tan\theta=\frac{a}{b}\tan{\phi'}\]

Note that \(\theta=\phi'\) for multiples of 90°.[1]

_images/arc_diagram.svg

Fig. 3.4 Angles used in 'arc' elements. For a = 2 and b = 1, \(\theta\) = 120° corresponds to \(\phi'\) = 139.1°.

Example

E1=Raith_element('arc',0,[0 3],[2 1],[0 120],10,[],7,1.3);
E2=Raith_element('arc',0,[0 1.5],[2 1],[0 120],10,0,7,1.3);
E3=Raith_element('arc',0,[0 0],[2 1],[0 120],10,0.2,7,1.3);
_images/arc_element.svg

Fig. 3.5 Example 'arc' elements

Element E1: data.w = []; Element E2: data.w = 0; Element E3: data.w = 0.2

3.2.5. Circle element

Description:

Circle or circular disc (Raith curved element)

Constructor:

E=Raith_element('circle',layer,uv_c,r,w,N,DF)

Properties:
  • type'circle' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv_c – Circle centre; 1 × 2 vector [uc vc] (µm)

  • data.r – Radius of circle (µm)

  • data.w – Circle linewidth (µm); if empty, circle is filled (disc); if zero, circle is a single-pixel line; if non-zero, circle has a width; a negative value is considered to be the same as empty by the Raith NanoSuite software (disc)

  • data.N – Number of vertices along circle circumference

  • data.DF – Dose factor for circle

Example

E1=Raith_element('circle',0,[0 0],1,[],60,1.3);
E2=Raith_element('circle',0,[3 0],1,0,60,1.3);
E3=Raith_element('circle',0,[6 0],1,0.2,60,1.3);
_images/circle_element.svg

Fig. 3.6 Example 'circle' elements

Element E1: data.w = []; Element E2: data.w = 0; Element E3: data.w = 0.2

3.2.6. Ellipse element

Description:

Ellipse or elliptical disk (Raith curved element)

Constructor:

E=Raith_element('ellipse',layer,uv_c,r,w,angle,N,DF)

Properties:
  • type'ellipse' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv_c – Ellipse centre; 1 × 2 vector [uc vc] (µm)

  • data.r – Semi-axes of ellipse; 1 × 2 vector [a b] (µm); a corresponds to the semi-axis in the data.angle direction

  • data.w – Ellipse linewidth (µm); if empty, ellipse is filled (elliptical disc); if zero, ellipse is a single-pixel line; if non-zero, ellipse has a width; a negative value is considered to be the same as empty by the Raith NanoSuite software (elliptical disc)

  • data.angle – Angle of rotation ϕ between positive u-axis and a semi-axis (degrees)

  • data.N – Number of vertices along ellipse circumference

  • data.DF – Dose factor for ellipse

Example

E1=Raith_element('ellipse',0,[0 6],[2 1],[],10,60,1.3);
E2=Raith_element('ellipse',0,[0 3],[2 1],0,10,60,1.3);
E3=Raith_element('ellipse',0,[0 0],[2 1],0.2,10,60,1.3);
_images/ellipse_element.svg

Fig. 3.7 Example 'ellipse' elements

Element E1: data.w = []; Element E2: data.w = 0; Element E3: data.w = 0.2

3.2.7. Text element

Description:

Text rendered as simple polygons

Constructor:

E=Raith_element('text',layer,uv_0,h,angle,uv_align,textlabel,DF)

Properties:
  • type'text' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv_0 – Text anchor point; 1 × 2 vector [u0 v0] (µm)

  • data.h – Height of capital letters (µm)

  • data.angle – Angle of rotation of text with respect to positive u-axis (degrees)

  • data.uv_align – Alignment of text with respect to anchor point; 1 × 2 vector [ualign valign]; allowed values are 0 (left/top), 1 (centre), and 2 (right/bottom), as follows (the + symbols denote the text anchor points):

    _images/text_uv_align.svg
  • data.textlabel – Text to be written (character array). The allowed characters, shown as rendered, are:

    _images/text_chars.svg

    in addition to the space character ( ). When rendered, text is kerned using a lookup table (text is not fixed width).

    Attention

    Use Unicode character U+00B5 to enter the letter “µ” in data.textlabel. Other similar characters (e.g., U+03BC, U+1D6CD, U+1D707, U+1D741, U+1D77B, U+1D7B5) will result in an error.

  • data.DF – Dose factor for text

Note

A simply connected font is used in Raith_element 'text' elements to avoid the problem of symbol segments being released during a sacrificial layer etch. As an example, consider etching the letter “A” through the device layer of a silicon-on-insulator chip. In the default Raith NanoSuite font, the triangular centre of the letter “A” is not connected to the surrounding plane. If the underlying buried oxide layer was subsequently etched away isotropically for sufficiently long (e.g., in buffered-oxide etch), the central triangle would be released, potentially landing on a critical feature of the chip. A letter “A” rendered as a Raith_element 'text' element does not encounter this problem due to its simply connected nature. The Raith_element 'text' element font is inspired by the Geogrotesque and Geogrotesque Stencil fonts.

_images/A_comparison.svg

Fig. 3.8 Comparison between letter “A” rendered using the Raith NanoSuite default font (left) and Raith_element font (right)

Example

E=Raith_element('text',0,[0 0],1,30,[1 1],'Raith_GDSII',1.3);
_images/text_element.svg

Fig. 3.9 Example 'text' element

3.2.8. FBMS path element

Description:

Path of fixed beam moving stage (FBMS/traxx) line segments or arcs

Constructor:

E=Raith_element('fbmspath',layer,uv,cvtr,w,DF)

Properties:
  • type'fbmspath' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv – 2 × n matrix [u;v] of FBMS path vertices (µm)

  • data.cvtr – Curvature of FBMS path segments (µm); if scalar and zero, the path comprises line segments (no curvature); if a 1 × n vector, data.cvtr(k) yields a circular arc with chord endpoints of data.uv(:,k-1) and data.uv(:,k) such that the radial distance between the arc and the chord centre is data.cvtr(k); a positive (negative) value of data.cvtr(k) corresponds to an arc to the left (right) of the chord; the value of data.cvtr(1) is ignored if data.cvtr(k) is 1 × n

  • data.w – Width of FBMS path (µm); a value of zero yields single-pixel line; a negative value is considered to be the same as zero by the Raith NanoSuite software (single-pixel line)

  • data.DF – Dose factor for FBMS path

Example

E1=Raith_element('fbmspath',0,[0 0 1 1 2;1 0 0 1 1],0,0,1.3);
E2=Raith_element('fbmspath',0,[0 0 1 1 2;1 0 0 1 1],[0 0 0.2 0 -0.5],0,1.3);
_images/fbmspath_element.svg

Fig. 3.10 Example 'fbmspath' elements

Element E1: data.cvtr = 0; Element E2: data.cvtr = [0 0 0.2 0 -0.5]

3.2.9. FBMS circle element

Description:

Fixed beam moving stage (FBMS/traxx) circle

Constructor:

E=Raith_element('fbmscircle',layer,uv_c,r,w,DF)

Properties:
  • type'fbmscircle' (character array)

  • data.layer – GDSII layer (integer); allowed values are 0–63

  • data.uv_cFBMS circle centre; 1 × 2 vector [uc vc] (µm)

  • data.r – Radius of FBMS circle (µm)

  • data.wFBMS circle linewidth (µm); if zero, circle is a single-pixel line; if non-zero, circle has a width

  • data.DF – Dose factor for FBMS circle

Example

E1=Raith_element('fbmscircle',0,[0 0],1,0,1.3);
E2=Raith_element('fbmscircle',0,[3 0],1,0.2,1.3);
_images/fbmscircle_element.svg

Fig. 3.11 Example 'fbmscircle' elements

Element E1: data.w = 0; Element E2: data.w = 0.2

3.2.10. Structure reference element

Description:

Reference to a named structure, with optional transformations

Constructor:

E=Raith_element('sref',name,uv_0[,mag[,angle[,reflect]]])

Properties:
  • type'sref' (character array)

  • data.name – Name of structure being referenced (character array)

  • data.uv_0 – Structure origin; 1 × 2 vector [u0 v0] (µm)

  • data.mag – Magnification (uniform scaling) factor [optional]; default is no magnification (data.mag = 1)

  • data.angle – Angle of rotation with respect to origin, counter-clockwise positive (degrees) [optional]; default is no rotation (data.angle = 0)

  • data.reflect – Boolean flag (0 or 1) for reflecting about u-axis before other transformations [optional]; default is no reflection (data.reflect = 0)

Note

Transformations are applied in the following order: 1. scaling, mirroring; 2. rotation; 3. translation.

_images/sref_transformations.svg

Fig. 3.12 'sref' element transformations. data.uv_0 values for the transformed structures are marked with + signs.

A: Structure being referenced; B: data.mag = 2; C: data.reflect = 1; D: data.angle = 10

Attention

When 'sref' elements are plotted using the Raith_element.plot() method, the origin is marked with a + sign, labelled with data.name: since the structure being referenced is not part of the Raith_element 'sref' object itself, the full hierarchy cannot be plotted. To view the full hierarchy, the structure must be plotted using the Raith_library.plot() method.

Example

E=Raith_element('sref','foo',[10 20],2,30);
_images/sref_element.svg

Fig. 3.13 Example 'sref' element, as plotted using the Raith_element.plot() method

3.2.11. Array reference element

Description:

Rectangular array of named structures, with optional transformations

Constructor:

E=Raith_element('aref',name,uv_0,n_colrow,a_colrow[,mag[,angle[,reflect]]])

Properties:
  • type'aref' (character array)

  • data.name – Name of structure being referenced (character array)

  • data.uv_0 – Structure origin; 1 × 2 vector [u0 v0] (µm)

  • data.n_colrow – Number of columns and rows in array; 1 × 2 vector [ncolumns nrows]

  • data.a_colrow – Pitch of columns and rows; 1 × 2 vector [acolumns arows] (µm)

  • data.mag – Magnification (uniform scaling) factor [optional]; default is no magnification (data.mag = 1)

  • data.angle – Angle of rotation with respect to origin, counter-clockwise positive (degrees) [optional]; default is no rotation (data.angle = 0)

  • data.reflect – Boolean flag (0 or 1) for reflecting about u-axis before other transformations [optional]; default is no reflection (data.reflect = 0)

Note

Transformations are applied in the following order: 1. scaling, mirroring; 2. rotation; 3. translation.

Attention

When 'aref' elements are plotted using the Raith_element.plot() method, the origins of the instances are marked with + signs, labelled with data.name: since the structure being referenced is not part of the Raith_element 'aref' object itself, the full hierarchy cannot be plotted. To view the full hierarchy, the structure must be plotted using the Raith_library.plot() method.

Example

E=Raith_element('aref','foo',[10 20],[4 3],[3 2],[],30);
_images/aref_element.svg

Fig. 3.14 Example 'aref' element, as plotted using the Raith_element.plot() method

Attention

It is important to note that the Raith NanoSuite software interprets GDSII AREF elements differently than the GDSII specification suggests. In particular, NanoSuite applies rotation operations both to the structures being referenced and the lattice vectors defining the rectangular array. In contrast, the GDSII specification applies the rotation only to the structures; the lattice of origins for the referenced structures are fully specified using the number of rows and columns in addition to three anchor points which are calculated after all transformations have been applied. This variation in interpretation can result in identical AREF elements appearing differently when viewed using the Raith NanoSuite software versus other GDSII editors, such as KLayout; the following two figures illustrate this behaviour.

_images/Raith_foo-aref.svg

Fig. 3.15 Raith interpretation of the AREF element in Fig. 3.14, for an L-shaped structure named 'foo'

_images/KLayout_foo-aref.svg

Fig. 3.16 KLayout interpretation of the AREF element in Fig. 3.14, for an L-shaped structure named 'foo'

3.3. Methods

Raith_element.plot([M[, scDF]])

Plot Raith_element object with default Raith dose factor colouring. Elements are displayed as filled polygons, where applicable ('polygon'; 'path' with non-zero data.w; 'arc', 'circle', and 'ellipse' with empty data.w; 'text').

Arguments:
Returns:

None

_images/RaithDF.svg

Fig. 3.17 Default Raith dose factor colourmap

Calling Raith_element.plot() does not change the current axis scaling; issue an axis equal command to ensure that the element is displayed in the figure correctly.

Note

Normally, Raith_element.plot() is called without arguments, to display the Raith_element object as it would appear in the Raith NanoSuite software. The optional arguments M and scDF are used internally, when Raith_element.plot() is called by Raith_structure.plot(), Raith_library.plot(), or Raith_positionlist.plot().

Example

E=Raith_element('text',0,[0 0],1,0,[0 2],'B',1.3);
E.plot;
axis equal;
_images/RE_plot.svg

Fig. 3.18 Text element plotted using the Raith_element.plot() method

Raith_element.plotedges([M[, scDF]])

Plot Raith_element object outlines with default Raith dose factor colouring. Elements are displayed as unfilled polygons, where applicable ('polygon'; 'path' with non-zero data.w; 'arc', 'circle', and 'ellipse' with empty data.w; 'text').

Arguments:
Returns:

None

Calling Raith_element.plotedges() does not change the current axis scaling; issue an axis equal command to ensure that the element is displayed in the figure correctly.

Note

Normally, Raith_element.plotedges() is called without arguments. The optional arguments M and scDF are used internally, when Raith_element.plotedges() is called by Raith_structure.plotedges(), Raith_library.plotedges(), or Raith_positionlist.plotedges().

Example

E=Raith_element('text',0,[0 0],1,0,[0 2],'B',1.3);
E.plotedges;
axis equal;
_images/RE_plotedges.svg

Fig. 3.19 Text element plotted using the Raith_element.plotedges() method