import 0.2.1
This commit is contained in:
commit
5a4c7db6b4
35 changed files with 3888 additions and 0 deletions
89
doc/Makefile
Normal file
89
doc/Makefile
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pygdsii.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pygdsii.qhc"
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
|
||||
"run these through (pdf)latex."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
194
doc/conf.py
Normal file
194
doc/conf.py
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# pygdsii documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Aug 15 02:07:50 2010.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.append(os.path.abspath('..'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
source_encoding = 'utf-8'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'python-gdsii'
|
||||
copyright = u'2010–2011, Eugeniy Meshcheryakov'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.2'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of documents that shouldn't be included in the build.
|
||||
#unused_docs = []
|
||||
|
||||
# List of directories, relative to source directory, that shouldn't be searched
|
||||
# for source files.
|
||||
exclude_trees = ['_build']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'default'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||
html_theme = 'sphinxdoc'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_use_modindex = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = ''
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
#htmlhelp_basename = 'pygdsiidoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
#latex_paper_size = 'letter'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#latex_font_size = '10pt'
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'pygdsii.tex', u'python-gdsii Documentation',
|
||||
u'Eugeniy Meshcheryakov', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_use_modindex = True
|
||||
111
doc/gdsii/elements.rst
Normal file
111
doc/gdsii/elements.rst
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
.. automodule:: gdsii.elements
|
||||
:synopsis: module containing classes for GDSII elements.
|
||||
|
||||
Possible instance attributes:
|
||||
|
||||
:attr:`elflags`
|
||||
Element flags (:class:`int`, optional).
|
||||
Bit 15 specifies template data.
|
||||
Bit 14 specifies external data.
|
||||
:attr:`plex`
|
||||
Plex number (:class:`int`, optional).
|
||||
:attr:`layer`
|
||||
Element layer (:class:`int`)
|
||||
:attr:`data_type`
|
||||
Element data type (:class:`int`)
|
||||
:attr:`path_type`
|
||||
Type of path endpoints (:class:`int`, optional).
|
||||
The values have the following meaning:
|
||||
|
||||
* 0 -- square ends, flush with endpoints
|
||||
* 1 -- round ends, centered on endpoints
|
||||
* 2 -- square ends, centered on endpoints
|
||||
* 4 -- custom square ends
|
||||
:attr:`width`
|
||||
Width of the path (:class:`int`, optional). If the value is negative,
|
||||
then the width is absolute and not affected by magnification factor.
|
||||
:attr:`bgn_extn`, :attr:`end_extn`
|
||||
Start end end extensions for :attr:`path_type` 4 (:class:`int`, optional).
|
||||
:attr:`xy`
|
||||
List of points (:class:`list` of tuples ``(x, y)``).
|
||||
:attr:`struct_name`
|
||||
Name of the referenced structure (:class:`bytes`).
|
||||
:attr:`strans`
|
||||
Transformation flags (:class:`int`, optional). Bits have the following meaning:
|
||||
|
||||
* 0 -- reclection about X axis
|
||||
* 13 -- absolute magnification
|
||||
* 14 -- absolute angle
|
||||
:attr:`mag`
|
||||
Magnification factor (:class:`float`, optional).
|
||||
:attr:`angle`
|
||||
Rotation factor in degrees (:class:`float`, optional). Rotation is counterclockwise.
|
||||
:attr:`cols`
|
||||
Number of columns (:class:`int`).
|
||||
:attr:`rows`
|
||||
Number of rows (:class:`int`).
|
||||
:attr:`text_type`
|
||||
Text type (:class:`int`).
|
||||
:attr:`presentation`
|
||||
Bit array that specifies how the text is presented (:class:`int`, optional).
|
||||
Meaning of bits:
|
||||
|
||||
* Bits 10 and 11 specify font number (0-3).
|
||||
* Bits 12 and 13 specify vertical justification (0 -- top, 1 -- middle, 2 -- bottom).
|
||||
* Bits 14 and 15 specify horizontal justification (0 -- left, 1 -- center, 2 -- rigth).
|
||||
:attr:`string`
|
||||
String for :const:`TEXT` element (:class:`bytes`).
|
||||
:attr:`node_type`
|
||||
Node type (:class:`int`).
|
||||
:attr:`box_type`
|
||||
Box type (:class:`int`).
|
||||
:attr:`properties`
|
||||
Element properties, represented as a list of tupes (`propattr`, `propvalue`).
|
||||
`propattr` is an :class:`int`, `propvalue` is :class:`bytes`.
|
||||
This attribute is optional.
|
||||
|
||||
.. autoclass:: ARef
|
||||
|
||||
Required attributes: :attr:`struct_name`, :attr:`cols`, :attr:`rows`, :attr:`xy`.
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`strans`, :attr:`mag`,
|
||||
:attr:`angle`, :attr:`properties`.
|
||||
|
||||
.. autoclass:: Boundary
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`data_type`, :attr:`xy`.
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`properties`.
|
||||
|
||||
.. autoclass:: Box
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`box_type`, :attr:`xy`.
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`properties`.
|
||||
|
||||
.. autoclass:: Node
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`node_type`, :attr:`xy`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`properties`
|
||||
|
||||
.. autoclass:: Path
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`data_type`, :attr:`xy`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`path_type`,
|
||||
:attr:`width`, :attr:`bgn_extn`, :attr:`end_extn`, :attr:`properties`
|
||||
|
||||
.. autoclass:: SRef
|
||||
|
||||
Required attributes: :attr:`struct_name`, :attr:`xy`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`strans`, :attr:`mag`,
|
||||
:attr:`angle`, :attr:`properties`
|
||||
|
||||
.. autoclass:: Text
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`text_type`, :attr:`xy`, :attr:`string`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`presentation`,
|
||||
:attr:`path_type`, :attr:`width`, :attr:`strans`, :attr:`mag`, :attr:`angle`, :attr:`properties`
|
||||
3
doc/gdsii/exceptions.rst
Normal file
3
doc/gdsii/exceptions.rst
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.. automodule:: gdsii.exceptions
|
||||
:members:
|
||||
:show-inheritance:
|
||||
13
doc/gdsii/index.rst
Normal file
13
doc/gdsii/index.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
:mod:`gdsii` --- GDSII manipulation library
|
||||
===========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
library
|
||||
structure
|
||||
elements
|
||||
tags
|
||||
types
|
||||
record
|
||||
exceptions
|
||||
81
doc/gdsii/library.rst
Normal file
81
doc/gdsii/library.rst
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
.. automodule:: gdsii.library
|
||||
:synopsis: module containing GDSII library class.
|
||||
|
||||
.. autoclass:: Library
|
||||
:show-inheritance:
|
||||
|
||||
.. automethod:: __init__
|
||||
|
||||
Instance attributes:
|
||||
.. attribute:: version
|
||||
|
||||
GDSII file verion (:class:`int`).
|
||||
Number as found in a GDSII file.
|
||||
For example value is 5 for GDSII v5 and 0x600 for GDSII v6.
|
||||
|
||||
.. attribute:: name
|
||||
|
||||
Library name (:class:`bytes`).
|
||||
|
||||
.. attribute:: physical_unit
|
||||
|
||||
Size of database unit in meters (:class:`float`).
|
||||
|
||||
.. attribute:: logical_unit
|
||||
|
||||
Size of user unit in database units (:class:`float`).
|
||||
|
||||
.. attribute:: mod_time
|
||||
|
||||
Last modification time (:class:`datetime`).
|
||||
|
||||
.. attribute:: acc_time
|
||||
|
||||
Last access time (:class:`datetime`).
|
||||
|
||||
.. attribute:: libdirsize
|
||||
|
||||
Number of pages in the library directory (:class:`int`, optional).
|
||||
|
||||
.. attribute:: srfname
|
||||
|
||||
Name of spacing rules file (:class:`bytes`, optional).
|
||||
|
||||
.. attribute:: acls
|
||||
|
||||
ACL data (:class:`list` of tuples ``(GID, UID, ACCESS)``, optional).
|
||||
|
||||
.. attribute:: reflibs
|
||||
|
||||
Names of reference libraries (:class:`bytes`, optional).
|
||||
See GDSII stream format documentation for format.
|
||||
|
||||
.. attribute:: fonts
|
||||
|
||||
Names of font definition files (:class:`bytes`, optional).
|
||||
The content is not parsed, see GDSII stream format documentation
|
||||
for format.
|
||||
|
||||
.. attribute:: attrtable
|
||||
|
||||
Name of attribute definition file (:class:`bytes`, optional).
|
||||
|
||||
.. attribute:: generations
|
||||
|
||||
Number of copies for deleted structures (:class:`int`, optional)
|
||||
|
||||
.. attribute:: format
|
||||
|
||||
Library format (:class:`int`, optional). Possible values:
|
||||
* 0 -- GDSII archive format
|
||||
* 1 -- GDSII filtered format
|
||||
* 2 -- EDSIII archive format
|
||||
* 3 -- EDSIII filtered format
|
||||
|
||||
.. attribute:: masks
|
||||
|
||||
Masks for filtered format (:class:`list` of :class:`bytes`, optional).
|
||||
|
||||
.. automethod:: load
|
||||
|
||||
.. automethod:: save
|
||||
19
doc/gdsii/record.rst
Normal file
19
doc/gdsii/record.rst
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.. automodule:: gdsii.record
|
||||
|
||||
.. autoclass:: Record
|
||||
:members:
|
||||
|
||||
.. attribute:: data
|
||||
|
||||
Element data.
|
||||
|
||||
.. attribute:: tag
|
||||
|
||||
Element tag (:class:`int`).
|
||||
|
||||
.. autoclass:: Reader
|
||||
:members:
|
||||
|
||||
.. attribute:: current
|
||||
|
||||
Last record read from stream.
|
||||
24
doc/gdsii/structure.rst
Normal file
24
doc/gdsii/structure.rst
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
.. automodule:: gdsii.structure
|
||||
:synopsis: module containing GDSII structure class.
|
||||
|
||||
.. autoclass:: Structure
|
||||
:show-inheritance:
|
||||
|
||||
.. automethod:: __init__
|
||||
|
||||
Instance attributes:
|
||||
.. attribute:: name
|
||||
|
||||
Structure name (:class:`bytes`).
|
||||
|
||||
.. attribute:: mod_time
|
||||
|
||||
Last modification time (:class:`datetime`).
|
||||
|
||||
.. attribute:: acc_time
|
||||
|
||||
Last access time (:class:`datetime`).
|
||||
|
||||
.. attribute:: strclass
|
||||
|
||||
Structure class (:class:`int`, optional).
|
||||
83
doc/gdsii/tags.rst
Normal file
83
doc/gdsii/tags.rst
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
.. automodule:: gdsii.tags
|
||||
|
||||
The following vaues are defined::
|
||||
|
||||
HEADER = 0x0002
|
||||
BGNLIB = 0x0102
|
||||
LIBNAME = 0x0206
|
||||
UNITS = 0x0305
|
||||
ENDLIB = 0x0400
|
||||
BGNSTR = 0x0502
|
||||
STRNAME = 0x0606
|
||||
ENDSTR = 0x0700
|
||||
BOUNDARY = 0x0800
|
||||
PATH = 0x0900
|
||||
SREF = 0x0A00
|
||||
AREF = 0x0B00
|
||||
TEXT = 0x0C00
|
||||
LAYER = 0x0D02
|
||||
DATATYPE = 0x0E02
|
||||
WIDTH = 0x0F03
|
||||
XY = 0x1003
|
||||
ENDEL = 0x1100
|
||||
SNAME = 0x1206
|
||||
COLROW = 0x1302
|
||||
TEXTNODE = 0x1400
|
||||
NODE = 0x1500
|
||||
TEXTTYPE = 0x1602
|
||||
PRESENTATION = 0x1701
|
||||
STRING = 0x1906
|
||||
STRANS = 0x1A01
|
||||
MAG = 0x1B05
|
||||
ANGLE = 0x1C05
|
||||
REFLIBS = 0x1F06
|
||||
FONTS = 0x2006
|
||||
PATHTYPE = 0x2102
|
||||
GENERATIONS = 0x2202
|
||||
ATTRTABLE = 0x2306
|
||||
STYPTABLE = 0x2406
|
||||
STRTYPE = 0x2502
|
||||
ELFLAGS = 0x2601
|
||||
ELKEY = 0x2703
|
||||
NODETYPE = 0x2A02
|
||||
PROPATTR = 0x2B02
|
||||
PROPVALUE = 0x2C06
|
||||
BOX = 0x2D00
|
||||
BOXTYPE = 0x2E02
|
||||
PLEX = 0x2F03
|
||||
BGNEXTN = 0x3003
|
||||
ENDEXTN = 0x3103
|
||||
TAPENUM = 0x3202
|
||||
TAPECODE = 0x3302
|
||||
STRCLASS = 0x3401
|
||||
FORMAT = 0x3602
|
||||
MASK = 0x3706
|
||||
ENDMASKS = 0x3800
|
||||
LIBDIRSIZE = 0x3902
|
||||
SRFNAME = 0x3A06
|
||||
LIBSECUR = 0x3B02
|
||||
|
||||
Types used only with Custom Plus (not handled by pygdsii)::
|
||||
|
||||
BORDER = 0x3C00
|
||||
SOFTFENCE = 0x3D00
|
||||
HARDFENCE = 0x3E00
|
||||
SOFTWIRE = 0x3F00
|
||||
HARDWIRE = 0x4000
|
||||
PATHPORT = 0x4100
|
||||
NODEPORT = 0x4200
|
||||
USERCONSTRAINT = 0x4300
|
||||
SPACERERROR = 0x4400
|
||||
CONTACT = 0x4500
|
||||
|
||||
Additionaly this module contains the following members:
|
||||
|
||||
.. autofunction:: type_of_tag
|
||||
|
||||
.. data:: DICT
|
||||
|
||||
A dictionary that maps tag names to tag IDs.
|
||||
|
||||
.. data:: REV_DICT
|
||||
|
||||
A dictionary that maps tag IDs to tag names.
|
||||
23
doc/gdsii/types.rst
Normal file
23
doc/gdsii/types.rst
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.. automodule:: gdsii.types
|
||||
|
||||
Defined members::
|
||||
|
||||
NODATA = 0
|
||||
BITARRAY = 1
|
||||
INT2 = 2
|
||||
INT4 = 3
|
||||
REAL4 = 4
|
||||
REAL8 = 5
|
||||
ASCII = 6
|
||||
|
||||
Type :const:`REAL4` is not used in GDSII and not handled by `python-gdsii`.
|
||||
|
||||
Additionaly this module contains the following members:
|
||||
|
||||
.. data:: DICT
|
||||
|
||||
A dictionary that maps type names to type IDs.
|
||||
|
||||
.. data:: REV_DICT
|
||||
|
||||
A dictionary that maps type IDs to type names.
|
||||
60
doc/index.rst
Normal file
60
doc/index.rst
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
Welcome to python-gdsii's documentation!
|
||||
========================================
|
||||
|
||||
`python-gdsii` is a library that can be used to read, create, modify and save
|
||||
GDSII files. It supports both low-level record I/O and high level interface to
|
||||
GDSII libraries (databases), structures, and elements.
|
||||
|
||||
This package also includes scripts that can be used to convert binary GDS file
|
||||
to a simple text format (`gds2txt`), YAML (`gds2yaml`), and from text format
|
||||
back to GDSII (`txt2gds`).
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
gdsii/index
|
||||
|
||||
Download
|
||||
--------
|
||||
|
||||
`python-gdsii` can be downloaded from its Python Package Index `page <http://pypi.python.org/pypi/python-gdsii/>`_.
|
||||
The source code repository is available on `gitorious.org <http://gitorious.org/python-gdsii>`_.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
For most cases interface provided by Library class from gdsii.library should be
|
||||
enough. Here is a small example::
|
||||
|
||||
from gdsii.library import Library
|
||||
from gdsii.elements import *
|
||||
|
||||
# read a library from a file
|
||||
with open('file.gds', 'rb') as stream:
|
||||
lib = Library.load(stream)
|
||||
|
||||
# let's move the first structure to a new library
|
||||
new_lib = Library(5, b'NEWLIB.DB', 1e-9, 0.001)
|
||||
struc = lib.pop(0) # libraries and structures are derived from list class
|
||||
new_lib.append(struc)
|
||||
|
||||
# let's also add some elements...
|
||||
# Note: first and last points in the boundary should be the same
|
||||
# this is required by GDSII spec.
|
||||
struc.append(Boundary(45, 0, [(-100000, -100000), (-100000, 0), (0,0), (0, -100000), (-100000, -100000)]))
|
||||
|
||||
# Save both files with different names...
|
||||
with open('newfile1.gds', 'wb') as stream:
|
||||
lib.save(stream)
|
||||
|
||||
with open('newfile2.gds', 'wb') as stream:
|
||||
new_lib.save(stream)
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
113
doc/make.bat
Normal file
113
doc/make.bat
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
@ECHO OFF
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
set SPHINXBUILD=sphinx-build
|
||||
set BUILDDIR=_build
|
||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
||||
if NOT "%PAPER%" == "" (
|
||||
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
||||
)
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
if "%1" == "help" (
|
||||
:help
|
||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
||||
echo. html to make standalone HTML files
|
||||
echo. dirhtml to make HTML files named index.html in directories
|
||||
echo. pickle to make pickle files
|
||||
echo. json to make JSON files
|
||||
echo. htmlhelp to make HTML files and a HTML help project
|
||||
echo. qthelp to make HTML files and a qthelp project
|
||||
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
||||
echo. changes to make an overview over all changed/added/deprecated items
|
||||
echo. linkcheck to check all external links for integrity
|
||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "clean" (
|
||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
||||
del /q /s %BUILDDIR%\*
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "html" (
|
||||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "dirhtml" (
|
||||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pickle" (
|
||||
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
||||
echo.
|
||||
echo.Build finished; now you can process the pickle files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "json" (
|
||||
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
||||
echo.
|
||||
echo.Build finished; now you can process the JSON files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "htmlhelp" (
|
||||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
||||
echo.
|
||||
echo.Build finished; now you can run HTML Help Workshop with the ^
|
||||
.hhp project file in %BUILDDIR%/htmlhelp.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "qthelp" (
|
||||
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
||||
echo.
|
||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pygdsii.qhcp
|
||||
echo.To view the help file:
|
||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pygdsii.ghc
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latex" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
echo.
|
||||
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "changes" (
|
||||
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
||||
echo.
|
||||
echo.The overview file is in %BUILDDIR%/changes.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "linkcheck" (
|
||||
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
||||
echo.
|
||||
echo.Link check complete; look for any errors in the above output ^
|
||||
or in %BUILDDIR%/linkcheck/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "doctest" (
|
||||
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
||||
echo.
|
||||
echo.Testing of doctests in the sources finished, look at the ^
|
||||
results in %BUILDDIR%/doctest/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
:end
|
||||
Loading…
Add table
Add a link
Reference in a new issue