Package: wafermap
WafermapA python package to plot maps of semiconductor wafers.Free software: MIT licenseFeaturesCircular 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.Export PNG images (needs Chromium)ExamplesSee the full dynamic mapshere!Static png image, just to get a taste:InstallationTo install Wafermap, run this command in your
terminal:$pipinstallwafermapThis is the preferred method to install Wafermap, as it will always install the most recent stable release.If you don't havepipinstalled, thisPython installation guidecan guide you through the process.From sourceThe source for Wafermap can be downloaded from
theGithub repo.You can clone the public repository:$gitclonegit://github.com/cap1tan/wafermapUsageTo use Wafermap in a projectimportwafermapFirst let's define a Wafermap:wm=wafermap.WaferMap(wafer_radius=100,# all length dimensions in mmcell_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 drawncoverage='full',# 'full': will cover wafer with cells, partial cells allowed# 'inner': only full cells allowednotch_orientation=270)# angle of notch in degrees. 270 corresponds to a notch at the bottomTo 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 cellAdding 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']forcolor,(cell,vector)inzip(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 distributionimportrandomasrndcell_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_inrange(50)])forcellinwm.cell_map.keys()]forcell,cell_points_incell_points:forcell_pointincell_points_:wm.add_point(cell=cell,offset=cell_point)Finally, nothing would matter if we couldn't see the result:# save to htmlwm.save_html(f"wafermap.html")# save to png (Chromium must be installed)wm.save_png(f"wafermap.png")DependenciesFolium&branca-> to make dynamic, zoom-able and pan-able HTML based mapsPillow-> to support embedded images and format the optional image outputChromium-> exporting to .png imagesContributingContributions 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 ContributionsReport BugsReport bugs athttps://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 BugsLook through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.Implement FeaturesLook through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.Write DocumentationWafermap 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 FeedbackThe best way to send feedback is to file an issue athttps://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 upwafermapfor local development.Fork thewafermaprepo on GitHub.Clone your fork locally$ git clone git@github.com:your_name_here/wafermap.gitEnsurepoetryis installed.Install dependencies and start your virtualenv:$ poetry install -E test -E doc -E devCreate a branch for local development:$ git checkout -b name-of-your-bugfix-or-featureNow you can make your changes locally.When you're done making changes, check that your changes pass the
tests, including testing other Python versions, with tox:$ toxCommit 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-featureSubmit a pull request through the GitHub website.Pull Request GuidelinesBefore you submit a pull request, check that it meets these guidelines:The pull request should include tests.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.The pull request should work for Python 3.6, 3.7, 3.8, 3.9 and for PyPy. Checkhttps://github.com/cap1tan/wafermap/actionsand make sure that the tests pass for all supported Python versions.Tips$ python -m unittest tests.test_wafermapTo run a subset of tests.DeployingA 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 --tagsGithub Actions will then deploy to PyPI if tests pass.