semvec/pypi-packages huggingface dataset:
bit-field 1.0.1
A bitfield diagram renderer
License: MIT
Keywords: bitfield,bytefield,diagram,renderer,svg

A Python3 port of the javascript [bit-field library](https://github.com/drom/bitfield/) by [Aliaksei Chapyzhenka](https://github.com/drom).

This package is also available as an extension for Sphinx: [sphinxcontrib-bitfield](https://github.com/Arth-ur/sphinxcontrib-bitfield).

## Install

```sh
pip install bit_field
```

To install this package with JSON5 support:

```sh
pip install bit_field[JSON5]
```

## Library usage

```python
from bit_field import render, jsonml_stringify

reg = [
  {'bits': 8, 'name': 'data'}
]

jsonml = render(reg, hspace=888)
html = jsonml_stringify(jsonml)
# <svg...>
```

## CLI Usage

```sh
bit_field [options] input > alpha.svg
```

### options

```
input        : input JSON filename - must be specified always
--input      : input JSON filename (kept for compatibility)
--compact    : compact rendering mode
--vspace     : vertical space - default 80
--hspace     : horizontal space - default 640
--lanes      : rectangle lanes - default 2
--bits       : overall bitwidth - default 32
--fontfamily : - default sans-serif
--fontweight : - default normal
--fontsize   : - default 14
--strokewidth: - default 1
--hflip      : horizontal flip
--vflip      : vertical flip
--trim       : horizontal space available for a single character
--uneven:    : uneven lanes

--beautify   : use xml beautifier

--json5      : force json5 input format (need json5 python module)
--no-json5   : never use json5 input format
```

### alpha.json

```json
[
    { "name": "IPO",   "bits": 8, "attr": "RO" },
    {                  "bits": 7 },
    { "name": "BRK",   "bits": 5, "attr": "RW", "type": 4 },
    { "name": "CPK",   "bits": 1 },
    { "name": "Clear", "bits": 3 },
    { "bits": 8 }
]
```
### alpha.svg

![Heat Sink](https://raw.githubusercontent.com/Arth-ur/bitfield/master/bit_field/test/alpha.svg?sanitize=true)

### Licensing
This work is based on original work by [Aliaksei Chapyzhenka](https://github.com/drom) under the MIT license (see LICENSE-ORIGINAL).
vis-cpu 1.1.0
Fast visibility simulator with interface to CPU and GPU
License: MIT
Requires Python: >=3.9

=======
vis_cpu
=======
.. image:: https://github.com/hera-team/vis_cpu/workflows/Tests/badge.svg
    :target: https://github.com/hera-team/vis_cpu
.. image:: https://badge.fury.io/py/vis-cpu.svg
    :target: https://badge.fury.io/py/vis-cpu
.. image:: https://codecov.io/gh/hera-team/vis_cpu/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/hera-team/vis_cpu
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black


Fast visibility simulator capable of running on CPU and GPU.


Description
===========

``vis_cpu`` is a Python/numpy-based simulator for interferometer visibilities.
It models the sky as an ensemble of point sources, each with their own frequency
spectrum. Diffuse emission can be modelled by treating (e.g.) each pixel of a Healpix
map as a separate source. The code is capable of modelling polarized visibilities
and primary beams, but currently only a Stokes I sky model.

``vis_cpu`` includes a separate ``pycuda``-based implementation called ``vis_gpu``.
This is intended to keep feature parity with the ``vis_cpu`` code to the greatest
extent possible.

An example wrapper for the main ``vis_cpu`` simulator function is provided in this
package (``vis_cpu.wrapper.simulate_vis()``).

Installation
============
Merely do ``pip install vis_cpu``. If you want to use the GPU functions, install
with ``pip install vis_cpu[gpu]``.

Developers
==========
Run ``pre-commit install`` before working on this code.

Read the Docs
=============
https://vis-cpu.readthedocs.io/en/latest/