This repository contains a simple python module for creating hexagonal arrays of circles with a specified diameter and pitch in CleWin's .cif-file format. See Example.py
and read the docstrings for documentation.
from CleHexArr import CleHexArr, Filters
# Filter functions are used to further specify where circles are allowed in the hexagonal array.
circle_filter = Filters.is_in_circle(0, 0, 100)
circle_array = CleHexArr.generate_hexagonal_array(
diameter = 5,
pitch = 10,
x0 = -100, x1 = 100,
y0 = -100, y1 = 100,
filter_functions = [circle_filter]
)
CleHexArr.write_array(
circle_array,
writepath = 'quick_example.cif',
readpath = 'blank.cif',
layer = 'L0'
)