Class overview: :class:`Raith_element`
Properties (public) | |
---|---|
:attr:`Raith_element.type` | Character array specifying type of element |
:attr:`Raith_element.data` | Structure with fields defining element geometry |
Methods | |
---|---|
:meth:`Raith_element.plot` | Plot element as filled polygons |
:meth:`Raith_element.plotedges` | Plot element as unfilled polygons |
|RE| objects define low-level, unnamed patterns, collections of which are bundled together to form named structures in the GDSII library.
.. attribute:: Raith_element.type Character array specifying type of element; allowed values are :matlab:`'polygon'`, :matlab:`'path'`, :matlab:`'dot'`, :matlab:`'arc'`, :matlab:`'circle'`, :matlab:`'ellipse'`, :matlab:`'text'`, :matlab:`'fbmspath'`, :matlab:`'fbmscircle'`, :matlab:`'sref'`, or :matlab:`'aref'`.
.. attribute:: Raith_element.data `Structure <https://www.mathworks.com/help/matlab/ref/struct.html>`_ containing additional record data for element; allowed field names and typing of values are determined by the element type (see :numref:`§%s <Raith_element: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 |RE| objects. The first argument sets the element :attr:`type <Raith_element.type>` property, followed by a list of arguments comprising the fields of the :attr:`data <Raith_element.data>` property (a MATLAB :matlab:`struct` object), which vary depend on the :attr:`type <Raith_element.type>`. Agruments shown in brackets are optional. Alternately, an empty, argumentless |RE| object may be called, with the :attr:`type <Raith_element.type>` and :attr:`data <Raith_element.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 |RE| object is created with a constructor or its properties are amended individually; this behaviour can be disabled if necessary (see :numref:`§%s <exttech:disabling data checking>`).
Descriptions of the eleven |RE| types are given in the following subsections.
Description: | Closed, filled polygon |
---|---|
Constructor: | |
Properties: |
|
Note
If the first and last vertices in :attr:`data.uv <Raith_element.data>` are not the same (i.e., an open polygon), :attr:`data.uv <Raith_element.data>` 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);
Description: | Path of line segments |
---|---|
Constructor: | |
Properties: |
|
Note
The interpretation of a negative value for GDSII path WIDTH records differs between the |RNS| 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 (:matlab:`'sref'` or :matlab:`'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);
Example :matlab:`'path'` elements
Description: | Single-pixel dot(s) |
---|---|
Constructor: | |
Properties: |
|
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]);
Example :matlab:`'dot'` elements
Description: | Segment of circular or elliptical path (Raith curved element) |
---|---|
Constructor: | :matlab:`E=Raith_element('arc',layer,uv_c,r,theta,angle,w,N,DF)` |
Properties: |
|
Note
Arc elements are interpreted by the |RNS| software using the following parametric equations:
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)
with \theta\in[\theta_1,\theta_2] spaced linearly over :attr:`data.N <Raith_element.data>` 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 :attr:`data.theta <Raith_element.data>`, use
\tan\theta=\frac{a}{b}\tan{\phi'}
Note that \theta=\phi' for multiples of 90°.[1]
Angles used in :matlab:`'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);
Example :matlab:`'arc'` elements
Description: | Circle or circular disc (Raith curved element) |
---|---|
Constructor: | |
Properties: |
|
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);
Example :matlab:`'circle'` elements
Description: | Ellipse or elliptical disk (Raith curved element) |
---|---|
Constructor: | :matlab:`E=Raith_element('ellipse',layer,uv_c,r,w,angle,N,DF)` |
Properties: |
|
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);
Example :matlab:`'ellipse'` elements
Description: | Text rendered as simple polygons |
---|---|
Constructor: | :matlab:`E=Raith_element('text',layer,uv_0,h,angle,uv_align,textlabel,DF)` |
Properties: |
|
Note
A simply connected font is used in |RE| :matlab:`'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 |RNS| 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 |RE| :matlab:`'text'` element does not encounter this problem due to its simply connected nature. The |RE| :matlab:`'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);
Description: | Path of fixed beam moving stage (FBMS/traxx) line segments or arcs |
---|---|
Constructor: | |
Properties: |
|
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);
Example :matlab:`'fbmspath'` elements
Description: | Fixed beam moving stage (FBMS/traxx) circle |
---|---|
Constructor: | |
Properties: |
|
Example
E1=Raith_element('fbmscircle',0,[0 0],1,0,1.3);
E2=Raith_element('fbmscircle',0,[3 0],1,0.2,1.3);
Example :matlab:`'fbmscircle'` elements
Description: | Reference to a named structure, with optional transformations |
---|---|
Constructor: | :matlab:`E=Raith_element('sref',name,uv_0[,mag[,angle[,reflect]]])` |
Properties: |
|
Note
Transformations are applied in the following order: 1. scaling, mirroring; 2. rotation; 3. translation.
:matlab:`'sref'` element transformations. :attr:`data.uv_0 <Raith_element.data>` values for the transformed structures are marked with + signs.
Attention!
When :matlab:`'sref'` elements are plotted using the :meth:`Raith_element.plot` method, the origin is marked with a :red:`+` sign, labelled with :attr:`data.name <Raith_element.data>`: since the structure being referenced is not part of the |RE| :matlab:`'sref'` object itself, the full hierarchy cannot be plotted. To view the full hierarchy, the structure must be plotted using the :meth:`Raith_library.plot` method.
Example
E=Raith_element('sref','foo',[10 20],2,30);
Description: | Rectangular array of named structures, with optional transformations |
---|---|
Constructor: | :matlab:`E=Raith_element('aref',name,uv_0,n_colrow,a_colrow[,mag[,angle[,reflect]]])` |
Properties: |
|
Note
Transformations are applied in the following order: 1. scaling, mirroring; 2. rotation; 3. translation.
Attention!
When :matlab:`'aref'` elements are plotted using the :meth:`Raith_element.plot` method, the origins of the instances are marked with :red:`+` signs, labelled with :attr:`data.name <Raith_element.data>`: since the structure being referenced is not part of the |RE| :matlab:`'aref'` object itself, the full hierarchy cannot be plotted. To view the full hierarchy, the structure must be plotted using the :meth:`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 |RNS| 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 |RNS| software versus other GDSII editors, such as KLayout; the following two figures illustrate this behaviour.
Raith interpretation of the AREF element in :numref:`aref_element`, for an L-shaped structure named :matlab:`'foo'`
KLayout interpretation of the AREF element in :numref:`aref_element`, for an L-shaped structure named :matlab:`'foo'`
.. method:: Raith_element.plot([M[,scDF]]) Plot |RE| object with default :ref:`Raith dose factor colouring <RaithDF>`. Elements are displayed as filled polygons, where applicable (:matlab:`'polygon'`; :matlab:`'path'` with non-zero :attr:`data.w <Raith_element.data>`; :matlab:`'arc'`, :matlab:`'circle'`, and :matlab:`'ellipse'` with empty :attr:`data.w <Raith_element.data>`; :matlab:`'text'`). :Arguments: + **M** -- Augmented transformation matrix to be applied to element [optional]; see :meth:`Raith_library.trans`, :meth:`Raith_library.rot`, :meth:`Raith_library.refl`, and :meth:`Raith_library.scale`. + **scDF** -- Overall multiplicative scaling factor for dose factor specified in :attr:`data.DF <Raith_element.data>` [optional] :Returns: None .. _RaithDF: .. figure:: images/RaithDF.svg :align: center :width: 500 Default Raith dose factor colourmap Calling :meth:`Raith_element.plot` does not change the current axis scaling; issue an :matlab:`axis equal` command to ensure that the element is displayed in the figure correctly. .. note:: Normally, :meth:`Raith_element.plot` is called without arguments, to display the |RE| object as it would appear in the |RNS| software. The optional arguments **M** and **scDF** are used internally, when :meth:`Raith_element.plot` is called by :meth:`Raith_structure.plot`, :meth:`Raith_library.plot`, or :meth:`Raith_positionlist.plot`. .. rubric:: Example .. code-block:: matlab E=Raith_element('text',0,[0 0],1,0,[0 2],'B',1.3); E.plot; axis equal; .. _RE_plot: .. figure:: images/RE_plot.svg :align: center :width: 500 Text element plotted using the :meth:`Raith_element.plot` method
.. method:: Raith_element.plotedges([M[,scDF]]) Plot |RE| object outlines with default :ref:`Raith dose factor colouring <RaithDF>`. Elements are displayed as unfilled polygons, where applicable (:matlab:`'polygon'`; :matlab:`'path'` with non-zero :attr:`data.w <Raith_element.data>`; :matlab:`'arc'`, :matlab:`'circle'`, and :matlab:`'ellipse'` with empty :attr:`data.w <Raith_element.data>`; :matlab:`'text'`). :Arguments: + **M** -- Augmented transformation matrix to be applied to element [optional]; see :meth:`Raith_library.trans`, :meth:`Raith_library.rot`, :meth:`Raith_library.refl`, and :meth:`Raith_library.scale`. + **scDF** -- Overall multiplicative scaling factor for dose factor specified in :attr:`data.DF <Raith_element.data>` [optional] :Returns: None Calling :meth:`Raith_element.plotedges` does not change the current axis scaling; issue an :matlab:`axis equal` command to ensure that the element is displayed in the figure correctly. .. note:: Normally, :meth:`Raith_element.plotedges` is called without arguments. The optional arguments **M** and **scDF** are used internally, when :meth:`Raith_element.plotedges` is called by :meth:`Raith_structure.plotedges`, :meth:`Raith_library.plotedges`, or :meth:`Raith_positionlist.plotedges`. .. rubric:: Example .. code-block:: matlab E=Raith_element('text',0,[0 0],1,0,[0 2],'B',1.3); E.plotedges; axis equal; .. _RE_plotedges: .. figure:: images/RE_plotedges.svg :align: center :width: 500 Text element plotted using the :meth:`Raith_element.plotedges` method
[1] | See, e.g., en.wikipedia.org/wiki/Ellipse |