semvec/pypi-packages huggingface dataset:
fits-align 0.4.4
Align a sequence of astronomical FITS files based on sources extracted in each image. The aligned files will be geometrically reprojected so all the images are the same size and shape.

# FITS Align

Align a sequence of astronomical FITS files based on sources extracted in each image. The aligned files will be geometrically reprojected so all the images are the same size and shape.

It is designed to work exclusively with reduced data from [Las Cumbres Observatory](https://lco.global). FITS data from LCO is [Rice compressed](https://heasarc.gsfc.nasa.gov/fitsio/fpack/) and contains sources extracted using [SEP](https://sep.readthedocs.io/en/v1.0.x/) during our data pipeline processing in a catalogue (`CAT`) FITS Header Data Unit (HDU).

## Installation

Download this repository :
`python setup.py install`

## Example usage

```python
from fits_align.ident import make_transforms
from fits_align.align import affineremap
from glob import glob
from numpy import shape

tmp_dir = "<FULL PATH TO INPUT FILES>"

img_list = sorted(glob(os.path.join(tmp_dir,"*.fz")))
ref_image = img_list[0]
images_to_align = img_list[1:]

identifications = make_transforms(ref_image, images_to_align)
```
If you have FITS files with image data you could use the following to reproject them.

```python
aligned_images = [ref_image]
for id in identifications:
    if id.ok:
        alignedimg = affineremap(id.ukn.filepath, id.trans, outdir=tmpdir)
        aligned_images.append(alignedimg)
```

If you just have FITS files which contain on photometry catalogues, which have pixel coordinate values (e.g. x, y) that you want to align (ie. no image data):

```python
import pandas as pd

identifications = make_transforms(img_list[0], img_list[1:], hdu='CAT')
catalogues = []
for i, catfile in enumerate(img_list):
    with fits.open(catfile) as hdul:
        data = pd.DataFrame.from_records(hdul['CAT'].data)
        if i != 0:
            (matrix, offset) = identifications[i-1].trans.matrixform()
            newcoords = np.dot(data[['x','y']], matrix) + offset
            (x,y) = np.transpose(newcoords)
            data.update({'x':x, 'y':y})
        catalogues.append(data)
```

## HDU containing catalogues

If you are using a none standard place for your catalogue HDU, that can be passed in a parameter to the `make_transforms()` function i.e.

```
identifications = make_transforms(ref_image, images_to_align, hdu=0)
```

## About

This is a customised fork of [AliPy by Malte Tewes](http://obswww.unige.ch/~tewes/alipy/). I have removed the dependency on SciPy in favour of pure NumPy (for linear algebra) and Pillow (for image array transforms).
qingpi-python 0.1.10
Python library for Qingpi.
Requires Python: >=3.10,<4.0

# qingpi-python

Python library for Qingpi.

```shell-session
$ pip install qingpi-python
```

## qingpictl

GUI application to control Qingpi with transparent Window and Citra compatible keyboard operation.

Currently, only Windows version is available.

![](screenshot.jpg)

### Run

```shell-session
$ qingpictl [port]
```

or

```shell-session
$ python -m qingpi [port]
```

or using pre-built binary

```shell-session
> qingpictl.exe [port]
```

You may create batch file like this if you don't want to specify the port from the command line every time.

```bat
START qingpictl.exe COM6
```

### Input mapping

<dl>
<dt>

Button

</dt>
<dd>

| Control  | Input |
| -------- | :---: |
| A        |  `A`  |
| B        |  `S`  |
| X        |  `Z`  |
| Y        |  `X`  |
| L        |  `Q`  |
| R        |  `W`  |
| ~~ZL~~   |  `1`  |
| ~~ZR~~   |  `2`  |
| START    |  `M`  |
| SELECT   |  `N`  |
| HOME     |  `B`  |
| POWER    |  `V`  |
| WIRELESS |  `P`  |

</dd>
<dt>

Hat

</dt>
<dd>

| Control | Input |
| ------- | :---: |
| UP      |  `T`  |
| RIGHT   |  `H`  |
| DOWN    |  `G`  |
| LEFT    |  `F`  |

</dd>
<dt>

SlidePad

</dt>
<dd>

| Control |   Input   |
| ------- | :-------: |
| UP      |  `<Up>`   |
| RIGHT   | `<Right>` |
| DOWN    | `<Down>`  |
| LEFT    | `<Left>`  |

</dd>
<dt>

~~Circle Pad Pro~~ (not implemented)

</dt>
<dd>

| Control   | Input |
| --------- | :---: |
| ~~UP~~    |  `I`  |
| ~~RIGHT~~ |  `L`  |
| ~~DOWN~~  |  `K`  |
| ~~LEFT~~  |  `J`  |

</dd>
<dt>

Hotkeys

</dt>
<dd>

| Control       | Input |
| ------------- | :---: |
| Expand window |  `+`  |
| Shrink window |  `-`  |

</dd>
</dl>

## Developer note

```shell-session
$ poetry run python -m qingpi [port] --debug
```

The build script requires PyInstaller and ImageMagick.

```shell-session
$ poetry run python -m pip install pyinstaller
$ make
```

PyInstaller is not included in the dev group because PyInstaller has a narrower Python version specification than necessary (e.g. v6.3.0 requires "<3.13,>=3.8"), which affects version reqirements of qingpi-python.

To avoid security issues,

```shell-session
$ poetry run python -m pip uninstall pyinstaller
$ git clone https://github.com/pyinstaller/pyinstaller --depth 1
$ cd .\pyinstaller\bootloader\
$ py .\waf distclean all
$ cd ..\..\
$ poetry run python -m pip install .\pyinstaller\
```
sparv-bert-neighbour-plugin 0.2.1
A sparv plugin for computing word neighbours using a BERT model.
Requires Python: >=3.8

# sparv-bert-neighbour-plugin

[![CI](https://github.com/spraakbanken/sparv-bert-neighbour-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/spraakbanken/sparv-bert-neighbour-plugin/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/sparv-bert-neighbour-plugin.svg)](https://pypi.org/project/sparv-bert-neighbour-plugin)

Plugin for applying bert masking as a [Sparv](https://github.com/spraakbanken/sparv-pipeline) annotation.

## Install

First, install Sparv, as suggested:

```bash
pipx install sparv-pipeline
```

Then install install `sparv-bert-neighbour-plugin` with

```bash
pipx inject sparv-pipeline sparv-bert-neighbour-plugin
```

## Usage

To use this annotation you need to specify that you want to use it:

```yaml
xml_export:
    annotations:
        - <token>:sparv_bert_neighbour.transformer-neighbour
```

### Configuration

You can configure this plugin by choosing a huggingface model, huggingface transformer and the number of neighbours to generate.

#### Model

The model defaults to [`KBLab/bert-base-swedish-cased`](https://huggingface.co/KBLab/bert-base-swedish-cased) but can be configured in `config.yaml`:

```yaml
sparv_bert_neighbour:
    model: "KBLab/bert-base-swedish-cased"
```

#### Tokenizer

The tokenizer defaults to [`KBLab/bert-base-swedish-cased`](https://huggingface.co/KBLab/bert-base-swedish-cased) but can be configured in `config.yaml`:

```yaml
sparv_bert_neighbour:
    tokenizer: "KBLab/bert-base-swedish-cased"
```

#### Number of Neighbours

The number of neighbousr defaults to `5` but can be configured in `config.yaml`:

```yaml
sparv_bert_neighbour:
    num_neighbours: 5
```