semvec/pypi-packages huggingface dataset:
ecfxa 1.0
Energy Conversion Factors for X-ray Astronomy
Requires Python: >=3.10

# Energy Conversion Factors for X-ray Astronomy

`ecfxa` is a Python package providing tools for the estimation
of ECFs for different astronomical X-ray missions. Currently 
we include XMM-Newton/EPIC, Swift/XRT and eROSITA. ECFs where
calculated consistently for the different missions using the most
updated calibration files at the date of the package release.

X-ray sources detected through photon counter cameras are characterized 
by count-rates at a given energy band. These count-rates (CR) can be 
converted into physical fluxes using the calibrated response of the
detector and assuming an specific spectral model via:

```math
FLUX = CR / ECF
```
where the ECF (Energy Conversion Factor) encapsulate the information
about the response and spectral model for the given energy band. 
For an in-depth explanation of ECF and how they are calculated see
[Mateos et al. 2009](https://doi.org/10.1051/0004-6361/200811409) 
or the [eROSITA ECF tutorial](https://erosita.mpe.mpg.de/dr1/eSASS4DR1/eSASS4DR1_arfrmf/eROSITA_ECF_tutorial.pdf).

Details about our ECF calculations for the different missions can 
be found in the [corresponding Jupyter notebooks](https://github.com/ruizca/ecfxa/tree/main/calc) included 
in the `ecfxa` GitHub repository.


Installation
------------

    > pip install ecfxa


Examples
--------

    >>> import ecfxa
    >>> ero_ecfs = ecfxa.eROSITA(eband="SOFT")
    >>> ero_ecfs(nh=3e20, gamma=2.0)
    <Quantity 1.18592291e+12 cm2 / erg>

We provide a [Jupyter notebook with examples](https://github.com/ruizca/ecfxa/tree/main/docs/examples.ipynb) 
on how to use `ecfxa` for different X-ray missions. Check the full 
documentation [here](https://ruizca.github.io/ecfxa/ecfxa/ecfs.html).
anitya-telegram 0.0.5
Telegram gateway for Anitya release monitoring system
Requires Python: >=3.8

# anitya-telegram

Telegram gateway for Anitya release monitoring system

![Telegram notifications from Anitya](doc/example.png)

# Getting started

Before running application, install dependencies:
```
pip install -r requirements.txt
```

Then make `config.toml` configuration file from `config.toml.example`. Gateway sets up via `consumer_config` sections.

Top level parameters are `api_key` and `chat_ids`:
  * `api_key` is a Telegram's Bot API key, can be configured via `ANITYA_TG_BOT_KEY` environment variable;
  * `chat_ids` is the chats identifiers which notifications send to.

Projects section `consumer_config.projects` consists of:
  * `id` is a project ID from [Anitya](https://release-monitoring.org);
  * `versions` is a versions filter, which filters versions by start of string;
  * `allow_nonstable` - set `true` if you want receive notifications about non-stable releases too.

To run gateway execute the command below:
```
fedora-messaging --conf config.toml consume --callback-file anitya_tg_gw.py:TelegramForwardConsumer
```
Configuration file can be also set up via `FEDORA_MESSAGING_CONF` environment variable.

# Docker

You can use docker images also:
```
docker pull harbor.smthd.com/anitya-telegram/anitya-telegram:latest
```

# Development

Create virtual environment:
```
python -m venv .venv
```

Venv activation / deactivation on Windows:
```
.venv\Scripts\Activate.ps1
deactivate
```

To run tests execute the command below:
```
python -m unittest discover -v anitya_telegram\tests\
```

# Links

* [Release monitoring](https://release-monitoring.org)
* [Integrating with Anitya](https://release-monitoring.org/static/docs/integrating-with-anitya.html)
* [Quick Start](https://fedora-messaging.readthedocs.io/en/latest/user-guide/quick-start.html)
* [Consumers](https://fedora-messaging.readthedocs.io/en/latest/user-guide/consuming.html)
* [Using the API](https://fedora-messaging.readthedocs.io/en/latest/tutorial/usage.html)
* [fedora-messaging](https://fedora-messaging.readthedocs.io/en/latest/user-guide/cli/fedora-messaging.html)
* [Datagrepper  - anitya.project.version.update.v2](https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.release-monitoring.prod.anitya.project.version.update.v2)