2020-04-17 13:51:43 -07:00
|
|
|
# fatamorgana
|
2017-09-18 03:01:48 -07:00
|
|
|
|
|
|
|
**fatamorgana** is a Python package for reading and writing OASIS format layout files.
|
|
|
|
|
2018-01-15 22:30:58 -08:00
|
|
|
**Homepage:** https://mpxd.net/code/jan/fatamorgana
|
2017-09-18 03:01:48 -07:00
|
|
|
|
|
|
|
**Capabilities:**
|
|
|
|
* This package is a work-in-progress and is largely untested -- it works for
|
2020-04-17 13:51:43 -07:00
|
|
|
the tasks I usually use it for, but I can't guarantee I've even
|
2017-09-18 03:01:48 -07:00
|
|
|
tried the features you happen to use! Use at your own risk!
|
|
|
|
* Interfaces and datastructures are subject to change!
|
|
|
|
* That said the following work for me:
|
|
|
|
- polygons
|
|
|
|
- layer info
|
|
|
|
- cell names
|
|
|
|
- compressed blocks
|
|
|
|
- basic property I/O
|
|
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
**Dependencies:**
|
|
|
|
* python 3.5 or newer
|
|
|
|
* (optional) numpy
|
|
|
|
|
|
|
|
|
2017-09-18 03:08:18 -07:00
|
|
|
Install with pip from PyPi (preferred):
|
2017-09-18 03:01:48 -07:00
|
|
|
```bash
|
2020-04-17 13:51:43 -07:00
|
|
|
pip3 install fatamorgana
|
2017-09-18 03:01:48 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
Install directly from git repository:
|
|
|
|
```bash
|
2020-04-17 13:51:43 -07:00
|
|
|
pip3 install git+https://mpxd.net/code/jan/fatamorgana.git@release
|
2017-09-18 03:01:48 -07:00
|
|
|
```
|
|
|
|
|
2017-09-18 03:08:18 -07:00
|
|
|
## Documentation
|
|
|
|
Most functions and classes are documented inline.
|
2017-09-18 03:01:48 -07:00
|
|
|
|
2017-09-18 03:08:18 -07:00
|
|
|
To read the inline help,
|
|
|
|
```python3
|
|
|
|
import fatamorgana
|
|
|
|
help(fatamorgana.OasisLayout)
|
|
|
|
```
|
|
|
|
The documentation is currently very sparse and I expect to improve it whenever possible!
|
|
|
|
|
|
|
|
|
|
|
|
## Examples
|
2017-09-18 03:01:48 -07:00
|
|
|
|
2017-09-18 03:08:18 -07:00
|
|
|
Read an OASIS file and write it back out:
|
|
|
|
```python3
|
|
|
|
import fatamorgana
|
|
|
|
|
|
|
|
with open('test.oas', 'rb') as f:
|
|
|
|
layout = fatamorgana.OasisLayout.read(f)
|
2020-04-17 13:51:43 -07:00
|
|
|
|
2017-09-18 03:08:18 -07:00
|
|
|
with open('test_write.oas', 'wb') as f:
|
|
|
|
layout.write(f)
|
|
|
|
```
|