semvec/pypi-packages huggingface dataset:
xpol 1.7.0
XPOL cross power-spectrum estimator

====
Xpol
====

A code to compute angular power spectra based on cross-correlation between maps and covariance matrices.

This is the generalisation to polarisation of `Tristram M. et al., 2005 MNRAS 358 833 <https://arxiv.org/abs/astro-ph/0405575>`_

.. .. contents:: **Table of Contents** */


Install Python
==============

The easiest way to install ``Xpol`` is via ``pip``

.. code:: shell

 pip install xpol [--user]


If you plan to develop the code, it is better to clone the repository

.. code:: shell

 git clone https://gitlab.in2p3.fr/tristram/Xpol.git /where/to/clone


and install the python library

.. code:: shell

  pip install -e /where/to/clone

The -e option allow the developer to make changes within the Xpol directory without having
to reinstall at every changes. If you plan to just use the code and do not develop it, you can
remove the -e option.

You can find a example of the module usage in test/script_xpol.py


Install C
=========

The code is in C, fully MPI parallelized in CPU and memory (using spherical transform by s2hat).

Librairies needed are :

* HEALPix (http://healpix.jpl.nasa.gov/)
* cfitsio (http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html)
* s2hat (http://www.apc.univ-paris7.fr/APC_CS/Recherche/Adamis/MIDAS09/software/s2hat/s2hat.html)

In addition you will need some BLAS/LAPACK optimized routines (MKL, NAG, ...)


Equations
=========

`wiki is here <https://gitlab.in2p3.fr/tristram/Xpol/wikis/home>`_


Usage
=====

You can use the python class (Xpol) to compute spectra based on a data.

.. code:: shell

 import xpol
 binning = xpol.Bins( lmins, lmaxs)
 xp = xpol.Xpol( mask, bins=binning)
 pcl,cl = xp.get_spectra( dT)

see the file `examples/script_xpol.py <https://gitlab.in2p3.fr/tristram/Xpol/-/blob/master/examples/script_xpol.py>`_ for more detailed usage.

For intensive computation and simulation you can alternatively use the MPI C version with a parameter file detailed `here <https://gitlab.in2p3.fr/tristram/Xpol/wikis/ParameterFile>`_


References
==========

``Xpol`` have been used to derive power spectra for:

* Archeops

  - CMB power spectra [Tristram+2005, A&A 436 785]
  - Dust power spectra [Ponthieu+2005, A&A 444 327]

* Planck: 

  - CMB power spectra [Planck 2015 results. XI, Couchot+2015]
  - Dust power spectra [Planck Intermediate Paper XXX]
  - CIB power spectra [Planck 2013 results. XXX]
  - SZ power spectra [Planck 2013 results. XXI, Planck 2015 results XXII]
  - SZ-CIB cross-power spectra [Planck 2015 results. XXIII]

And many others !
subtitles-translator 0.0.3
Automatic subtitles translation with a local neural machine translation model. No third-party service required: the translation is done locally with small but efficient neural network models.
Requires Python: >=3.8,<3.11

# Neural Subtitles Translator

[![Release](https://img.shields.io/github/v/release/tdhm/subtitles-translator)](https://img.shields.io/github/v/release/tdhm/subtitles-translator)
[![Build status](https://img.shields.io/github/actions/workflow/status/tdhm/subtitles-translator/main.yml?branch=main)](https://github.com/tdhm/subtitles-translator/actions/workflows/main.yml?query=branch%3Amain)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/subtitles-translator.svg)](https://pypi.python.org/pypi/subtitles-translator/)
[![codecov](https://codecov.io/gh/tdhm/subtitles-translator/branch/main/graph/badge.svg)](https://codecov.io/gh/tdhm/subtitles-translator)
[![Commit activity](https://img.shields.io/github/commit-activity/m/tdhm/subtitles-translator)](https://img.shields.io/github/commit-activity/m/tdhm/subtitles-translator)
[![License](https://img.shields.io/github/license/tdhm/subtitles-translator)](https://img.shields.io/github/license/tdhm/subtitles-translator)

Automatic subtitles translation with a local neural machine translation model. No third-party service required: the translation is done locally with small but efficient neural network models.

> **Github repository**: <https://github.com/tdhm/subtitles-translator/>

> **Documentation** <https://tdhm.github.io/Subtitles-Translator/>

Original movie in French            |  Output of automatic translation
:-------------------------:|:-------------------------:
![](./docs/img/bon_voyage_fr.png)  |  ![](./docs/img/bon_voyage_en.png)

> **Note**
> Screenshots are taken from *Bon voyage*, a short French language propaganda film made by Alfred Hitchcock for the British Ministry of Information.
> This film is now in the Public Domain.

### Installation

Subtitles Translator is available as [`subtitles_translator`](https://pypi.org/project/subtitles-translator/) on PyPI:

```shell
pip install subtitles_translator
```

You'll also need to install [`ffmpeg`](https://ffmpeg.org/), which is available from most package managers:

```shell
# on macOS using Homebrew (https://brew.sh/)
brew install ffmpeg

# on Windows using Chocolatey (https://chocolatey.org/)
choco install ffmpeg

# on Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg
```

### Usage

> **Note**
> Please note that the current version only supports MP4 video files (MKV support coming soon).
> Your MP4 must contain only one subtitles track, which will be translated and replaced in a new MP4 file.
> You can also translates SRT subtitles files, or extract and translate SRT files from a MP4 ([look at the doc!](https://tdhm.github.io/subtitles-translator/)).

With the following command, subtitles from 'video.mp4' will be extracted and translated from 'french' to 'english'. The video containing translated subtitles will be saved as 'translated_video.mp4':

```shell
subtitles_translator -i video.mp4 -o translated_video.mp4 -s fr -t en
```