3. The Raith_element class
Class overview: Raith_element
Properties (public) |
|
---|---|
Character array specifying type of element |
|
Structure with fields defining element geometry |
Methods |
|
---|---|
Plot element as filled polygons |
|
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'
.
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);
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);
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 asdata.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]);
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
directiondata.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:
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
Note that \(\theta=\phi'\) for multiples of 90°.[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);
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);
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
directiondata.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);
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):
data.textlabel – Text to be written (character array). The allowed characters, shown as rendered, are:
in addition to the space character ( ). When rendered, text is kerned using a lookup table (text is not fixed width).
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.
Example
E=Raith_element('text',0,[0 0],1,30,[1 1],'Raith_GDSII',1.3);
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 ofdata.uv(:,k-1)
anddata.uv(:,k)
such that the radial distance between the arc and the chord centre isdata.cvtr(k)
; a positive (negative) value ofdata.cvtr(k)
corresponds to an arc to the left (right) of the chord; the value ofdata.cvtr(1)
is ignored ifdata.cvtr(k)
is 1 × ndata.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);
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_c – FBMS circle centre; 1 × 2 vector [uc vc] (µm)
data.r – Radius of FBMS circle (µm)
data.w – FBMS 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);
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.
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);
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);
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.
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-zerodata.w
;'arc'
,'circle'
, and'ellipse'
with emptydata.w
;'text'
).- Arguments:
M – Augmented transformation matrix to be applied to element [optional]; see
Raith_library.trans()
,Raith_library.rot()
,Raith_library.refl()
, andRaith_library.scale()
.scDF – Overall multiplicative scaling factor for dose factor specified in
data.DF
[optional]
- Returns:
None
Calling
Raith_element.plot()
does not change the current axis scaling; issue anaxis equal
command to ensure that the element is displayed in the figure correctly.Note
Normally,
Raith_element.plot()
is called without arguments, to display theRaith_element
object as it would appear in the Raith NanoSuite software. The optional arguments M and scDF are used internally, whenRaith_element.plot()
is called byRaith_structure.plot()
,Raith_library.plot()
, orRaith_positionlist.plot()
.Example
E=Raith_element('text',0,[0 0],1,0,[0 2],'B',1.3); E.plot; axis equal;
- 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-zerodata.w
;'arc'
,'circle'
, and'ellipse'
with emptydata.w
;'text'
).- Arguments:
M – Augmented transformation matrix to be applied to element [optional]; see
Raith_library.trans()
,Raith_library.rot()
,Raith_library.refl()
, andRaith_library.scale()
.scDF – Overall multiplicative scaling factor for dose factor specified in
data.DF
[optional]
- Returns:
None
Calling
Raith_element.plotedges()
does not change the current axis scaling; issue anaxis 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, whenRaith_element.plotedges()
is called byRaith_structure.plotedges()
,Raith_library.plotedges()
, orRaith_positionlist.plotedges()
.Example
E=Raith_element('text',0,[0 0],1,0,[0 2],'B',1.3); E.plotedges; axis equal;