Metadata-Version: 2.4
Name: ebeamtime
Version: 0.1.0
Summary: Analytical electron-beam lithography write-time estimation from GDSII layouts
Author-email: Sandbo Chang <sandbochang@outlook.com>
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://github.com/SandboChang/ebeamtime
Project-URL: Issues, https://github.com/SandboChang/ebeamtime/issues
Project-URL: Repository, https://github.com/SandboChang/ebeamtime
Keywords: GDSII,electron beam lithography,EDA,write time
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gdsdiff<0.2,>=0.1.0
Requires-Dist: numpy>=1.26
Provides-Extra: test
Requires-Dist: gdstk>=1.0.0; extra == "test"
Requires-Dist: jsonschema>=4.23; extra == "test"
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: gdstk>=1.0.0; extra == "dev"
Requires-Dist: jsonschema>=4.23; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Dynamic: license-file

# ebeamtime

`ebeamtime` estimates analytical electron-beam lithography write time from GDSII
polygon area, exposure dose, beam current, and optional stage/write-field
metadata. It preserves raw polygon-instance area semantics: overlapping source
polygons are counted separately because each is written separately.

```bash
python -m pip install ebeamtime
ebeamtime layout.gds --exposure 1:0:100:1 --backend cpu
```

For reproducible local development on WSL, synchronize the committed
production-index lock into the platform-specific environment:

```bash
UV_PROJECT_ENVIRONMENT=.venv_wsl UV_LINK_MODE=copy uv sync --locked --extra test
TMPDIR=/tmp .venv_wsl/bin/python -m pytest
```

When qualifying coordinated unpublished changes, a sibling `gdsdiff` checkout
may be installed editable for that local test, but it must not be recorded in
package metadata or `uv.lock`.

Python usage:

```python
from ebeamtime import EbeamLayerExposure, EstimateConfig, LayerSpec
from ebeamtime import estimate_gds_write_time

config = EstimateConfig(
    "layout.gds",
    (EbeamLayerExposure("metal", LayerSpec(1, 0), 100, 1),),
    backend="cpu",
)
report = estimate_gds_write_time(config).report
print(report.total_s)
```

CUDA and Apple Metal are runtime options. They require compatible hardware and
the platform toolchain (`nvcc` or Xcode command-line tools); CPU requires
neither. See `ebeamtime-diagnostics` and `docs/semantics.md`.
On-demand builds default to NVIDIA's `-arch=native`, which detects visible GPUs
and emits native SASS without PTX. For cross-machine builds, set
`EBEAMTIME_CUDA_ARCHITECTURES` to comma-separated compute capabilities without
decimals (for example, `89,120`); targets and standard `NVCC_*_FLAGS` become
part of the content-addressed cache key.

Installation and import never compile GPU code. Inspect the shared CUDA
toolchain through `ebeamtime.inspect_cuda_toolchain()`, then build and verify
only the estimator kernel with `ebeamtime.prepare_cuda()` or
`ebeamtime-prepare-cuda --json`. Explicit `backend="cuda"` use retains lazy
preparation. `backend="auto"` does not probe or compile a GPU backend for
workloads below `gpu_min_polygons`. Metal is experimental until validated on
Apple Silicon hardware.

`--project-config` loads and executes Python. Use it only with trusted project
configuration files.

The project is early-stage software and is licensed under GPL-3.0-only.
