Skip to main content

Wafermap

pypi pypi pypi GitHub GitHub

A python package to plot maps of semiconductor wafers.

Free software: MIT license

Features

  • Circular wafers with arbitrary notch orientations and full or inner layouts.
  • Grid with adjustable offset and origin, cells with adjustable size and margin.
  • Edge-exclusion.
  • Hover-able points, vectors and images.
  • Tooltips with embeddable images.
  • Individual labels and colors for each die.
  • Toggle layers on/off individually.
  • Export zoom-able maps to HTML.
  • Heatmaps of measurement data.
  • Export PNG images (needs the png extra and Chrome or Edge)

Examples

  • See the full dynamic maps here!

  • Static png image, just to get a taste:

Example_wafermap

Installation

To install Wafermap, run this command in your terminal:

$ pip install wafermap

This is the preferred method to install Wafermap, as it will always install the most recent stable release.

To also export PNG images, install the png extra (Chrome or Edge must be installed too):

$ pip install wafermap[png]

If you don't have pip installed, this Python installation guide can guide you through the process.

From source

The source for Wafermap can be downloaded from the Github repo.

You can clone the public repository:

$ git clone git://github.com/cap1tan/wafermap

Usage

To use Wafermap in a project

    import wafermap

First let's define a Wafermap:

wm = wafermap.WaferMap(wafer_radius=100,                # all length dimensions in mm
                       cell_size=(10, 20),              # (sizeX, sizeY)
                       cell_margin=(8, 15),             # distance between cell borders (x, y)
                       cell_origin=(0, 0),              # which cell to select as origin (0, 0), in (x, y)
                       grid_offset=(-2.05, -4.1),       # grid offset in (x, y)
                       edge_exclusion=2.2,              # margin from the wafer edge where a red edge exclusion ring is drawn
                       coverage='full',                 # 'full': will cover wafer with cells, partial cells allowed
                                                        # 'inner': only full cells allowed
                       notch_orientation=270)           # angle of notch in degrees. 270 corresponds to a notch at the bottom

To add an image at a specific cell/relative cell coordinates simply:

wm.add_image(image_source_file="inspection1.jpg",
             cell=(1, 0),                               # (cell_index_x, cell_index_y)
             offset=(2.0, 2.0))                         # relative coordinate of the image within the cell

Adding vectors is just as easy. Just define cell and [(start_rel_coordinates), (end_rel_coordinates)]:

vectors = [
            ((3, 0), [(0, 0), (1, 1)]),
            ((3, 0), [(1, 0), (-5, 5)]),
            ((3, 0), [(0, 1), (10, -10)]),
            ((3, 0), [(1, 1), (-20, -20)]),
            ]
colors = ['green', 'red', 'blue', 'black']
for color, (cell, vector) in zip(colors, vectors):
    wm.add_vector(vector_points=vector, cell=cell, vector_style={'color': color}, root_style={'radius': 1, 'color': color})

Let's throw in some points in a normal distribution for good measure too:

# add 50 points per cell, in a random distribution
import random as rnd

cell_size = (10, 20)
cell_points = [(cell, [(rnd.gauss(cell_size[0] / 2, cell_size[0] / 6),
                        rnd.gauss(cell_size[1] / 2, cell_size[1] / 6)) for _ in
                       range(50)]) for cell in wm]
for cell, cell_points_ in cell_points:
    for cell_point in cell_points_:
        wm.add_point(cell=cell, offset=cell_point)

Labels, cell colors and heatmaps work the same way:

wm.add_label(cell=(2, 0), offset=(5, 10), label_text="PASS")
wm.style_cell(cell=(2, 0), cell_style={"fill": True, "fillColor": "green", "fillOpacity": 0.5})

# list of (wafer_x, wafer_y, value), or a dict {(cell_x, cell_y, offset_x, offset_y): value}
wm.add_heatmap([(rnd.gauss(0, 25), rnd.gauss(0, 25), 1.0) for _ in range(500)])

Instead of a regular grid, the cells can also be given explicitly, as (wafer_x, wafer_y, cell_x, cell_y) with (wafer_x, wafer_y) the lower left corner of each cell:

wm = wafermap.WaferMap(wafer_radius=150, cell_size=(5, 10),
                       cells=[(-5, -10, 0, 0), (0, -10, 1, 0), (-5, 0, 0, 1)])

Finally, nothing would matter if we couldn't see the result:

# save to html
wm.save_html(f"wafermap.html")

# save to png (needs `pip install wafermap[png]` and Chrome or Edge)
wm.save_png(f"wafermap.png")

Dependencies

  • Folium -> to make dynamic, zoom-able and pan-able HTML based maps
  • Pillow -> to support embedded images and format the optional image output
  • html2image (optional, png extra) & Chrome or Edge -> exporting to .png images

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/cap1tan/wafermap/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.

Write Documentation

Wafermap could always use more documentation, whether as part of the official Wafermap docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/cap1tan/wafermap/issues.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here's how to set up wafermap for local development.

  1. Fork the wafermap repo on GitHub.
  2. Clone your fork locally
    $ git clone git@github.com:your_name_here/wafermap.git
  1. Ensure poetry is installed.
  2. Install dependencies and start your virtualenv:
    $ poetry install -E test
  1. Create a branch for local development:
    $ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

  1. When you're done making changes, check that your changes pass the tests, including testing other Python versions, with tox:
    $ tox
  1. Commit your changes and push your branch to GitHub:
    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
  1. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
  3. The pull request should work for Python 3.11 - 3.14. Check https://github.com/cap1tan/wafermap/actions and make sure that the tests pass for all supported Python versions.

Tips

    $ python -m unittest tests.test_wafermap

To run a subset of tests.

Deploying

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.md). Then run:

$ poetry patch # possible: major / minor / patch
$ git push
$ git push --tags

Github Actions will then deploy to PyPI if tests pass.

Metadata

Release files for wafermap 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wafermap 0.4.0
File Size Uploaded Provenance Actions
wafermap-0.4.0.tar.gz 18.6 kB Without provenance Details for wafermap-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wafermap 0.4.0
File Interpreter ABI Platform Actions
wafermap-0.4.0-py3-none-any.whl Python 3 none any Details for wafermap-0.4.0-py3-none-any.whl

Total release size: 35.0 kB

Release files / wafermap-0.4.0.tar.gz

Download URL wafermap-0.4.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8ffc475a31b3bd77533ff1b3a65e58f4a6d5518fc0b360a56bfe81b0eba6e99f
BLAKE2b-256 checksum
How to use checksums
c923fc58d48aa4d6d77c3370ae976f4decf74b962cb6112dc747e3e45dc2332f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.10 Windows/11

Release files / wafermap-0.4.0-py3-none-any.whl

Download URL wafermap-0.4.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18d969e90c980a7f8dfa3d27ed388a6d46f012e9a7897af1a965f45db554ae6c
BLAKE2b-256 checksum
How to use checksums
433772796f5f27b05ad5f3391765548dc0e287998fe439fa96f9ea5156f1c9d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.10 Windows/11

Security for wafermap 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page