Python Micro Pattern Stream Generator (pyMPSG) library 
Generate streamfiles (.str) for patterning on e.g. FEI dualbeam focussed ion beam (FIB) milling machines, such as Helios G4Cx or Helios 650. This allows for generating arbitrary¹ 2.5D shapes, such as domes, cones, markers, etc, as well as combinations thereof. Allowing for a wide range of complex patterns.
This should also be usable for electron- or ion-beam induced deposition (EBID/IBID). Extension to patterning text and bitmaps should be fairly easy (please open an issue if you are interested in details).
I developed this at the quantum technologies department at TNO and now publish it with their consent. If you are interested to have this technique applied to you chip², please reach out to diamond-devices@tno.nl
¹ within the limits of the machine
² e.g. for solid-immersion lenses around single color centers
Installation
pip install pyMPSG
Minimal usage example
from pyMPSG import pointscanner, depthmapper, StreamGenerator, Setup, Streamfile
# Prepare "Setup" - ie. the settings for the machine and substrate
machine = Setup(mu=7.5e-6, I_B=9.4, ds=0.1, zoom=3500)
# Specify the object to pattern and the rastering method
dm = depthmapper.Circle(r=5, depth=1, setup=machine)
ps = pointscanner.Spiral(radius=dm.r_o, inside_out=True, setup=machine)
# Generate the streamfile
sg = StreamGenerator(pointscanner=ps, depthmapper=dm, setup=machine, layer_thickness=0.05)
sf = Streamfile(sg)
sf.write_file('instructions')
More usage examples and explanation can be found in the examples folder.
Reference and Citing
Based on the python2 script provided in:
Mohammad Jamali, Ilja Gerhardt, Mohammad Rezai, Karsten Frenner, Helmut Fedder, Jörg Wrachtrup; Microscopic diamond solid-immersion-lenses fabricated around single defect centers by focused ion beam milling. Rev. Sci. Instrum. 1 December 2014; 85 (12): 123703.
If you use this code in your work, please cite it with its DOI: 10.5281/zenodo.17148127.
Disclaimer
All mentioned names (such as NanoBuilder, FEI, Helios, ...) are brands and/or registered trademarks of their respective owners (e.g. ThermoFisher). There is no affiliation with any of these brands or companies. For further disclaimers, please read the license file.
Copyright 2025 René Vollmer
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Metadata
Release files for pyMPSG 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pympsg-1.0.2.tar.gz | 21.0 kB | With provenance | Details for pympsg-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pympsg-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for pympsg-1.0.2-py3-none-any.whl |
Total release size: 42.8 kB
Release files / pympsg-1.0.2.tar.gz
| Download URL | pympsg-1.0.2.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e63b3265d828cd8cc0e2617ecb5b6378687ad0d348fa05344ddb8ac6b3a3171
|
|
BLAKE2b-256 checksum How to use checksums |
1545612ad5a149d5189ef83abe7feafd8f76dd979d0b41ddfe21c44f4edf0e51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2025.
Transparency logRelease files / pympsg-1.0.2-py3-none-any.whl
| Download URL | pympsg-1.0.2-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8af06ae9da7e5fb525981b0c2e7bd894259eb55d7ab56ba8551a0c831dac457a
|
|
BLAKE2b-256 checksum How to use checksums |
3b571bbc2aef5a9ba9ae3859a5eba92301de3a0f3471deef58bfd0a43a06833e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2025.
Transparency logSecurity for pyMPSG 1.0.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pympsg-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2025.
Transparency logA 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.