Skip to content
@AmpelProject

AmpelProject

Alice in Modular Provenance-Enabled Land

AMPEL is a modular and scalable platform with explicit provenance tracking, suited for systematically processing large - possibly complex and heterogeneous - datasets in real-time or not. This includes selecting, analyzing, updating, combining, enriching and reacting to data.

The framework requires analysis and reaction logic to be broken down in adequate indepentent units. AMPEL is general enough to be usable in various fields, it was originaly developped to solve challenges in the context of observational astrophysics.

AMPEL requires Python 3.10+ and its codebase is fully typed.

Architecture

Tiers

AMPEL is made of four execution layers (tiers) that replace a traditional pipeline architecture.

The tiers are independently scheduled and the information exchange between tiers occurs via a dedicated database. The execution layer architecture along with the database structure allows for simple parallelization.

Units

Each tier is modular and executes so-called "units".

Ampel logical units have standardized inputs and ouputs, enforced through abstract classes which units inherit.

Processes

Every change in AMPEL is triggered by a process. A process executes, at a given date and time, a processor unit that itself runs one or multiple logical units with specific configurations. Information about process executions are registred into the database. The majority of processes are associated with a specific tier but general processes are possible.

A working AMPEL system will spawn multiple processes, posssibly concurently, accross the four AMPEL tiers. This will result in the ingestion and analysis of data and the triggering of automated reactions when given data states are detected.

Channels

Channels are convenient for multi-user or multi-prupose AMPEL systems. They allow to define and enforce access rights and to privatize processes, meaning that the output generated by the processes will be only accessible to processes belonging to the same channel.

Internally, channels are just tags in database documents and ampel configuration files.
From a user perspective, a channel can be seen as a collection of private processes.


Processes associated with a given channel

Note that within AMPEL, different channels requiring the same computation will not result in the required computation being performed twice.

Repositories

The AMPEL code is partitioned in different repositories.
The only mandatory repository in this list is ampel-interface

Public abstract class definitions:
https://github.com/AmpelProject/Ampel-interface

Specialized classes for Tier 0, capable of handling alerts:
https://github.com/AmpelProject/Ampel-alerts

An add-on that introduces two generic classes of datapoints:
https://github.com/AmpelProject/Ampel-photometry

Example of an instrument specific implementation:
https://github.com/AmpelAstro/Ampel-ztf

Numerous ampel units, the majority being specific to astronomy:
https://github.com/AmpelAstro/Ampel-HU-astro/

Database

MongoDB is used to store data. The collections have been designed and indexed for fast insertion and query. Users do not interact with the database directly. Information exchange is instead regulated through (python) abstract base classes from which units are constructed. A specific set of internal classes handle database input and output.

Containers

All AMPEL software, can be combined into one container that defines an instance. These containers can be used both to process real-time data as well as to reprocess archived data. The containers themselves should be archived as well.

Installing Ampel

The latest release of ampel-core can be installed from PyPI with pip, e.g.:

pip install ampel-core

Other projects like ampel-alerts, ampel-ztf, etc. can also be installed with pip.

Development

ampel-core uses poetry for dependency management and packaging. To work with an editable install it's recommended that you set up poetry and install ampel-core in a virtual environment by doing

poetry install

Alternatively, may also use a setuptools-style editable install from setup.py:

pip install -e .

Note that setup.py and requirements.txt are auto-generated; any changes you commit will be overwritten the next time pyproject.toml is updated.

Contribution guidelines (python)

Structure

  • One class per file (PEP 20: Explicit is better than implicit)

Content

  • Please try to type hint code and fix potential issues using mypy
  • Keep indentation preferences of existing files
  • Files should contain a header. Example:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File              : ampel/pipeline/t2/T2Controller.py
# License           : BSD-3-Clause
# Author            : Your Name <Optional email>
# Date              : 25.01.2018
# Last Modified Date: 22.08.2018
# Last Modified By  : Your Name <Optional email>

Docstring

  • Classes and methods should include docstrings, preferably using reST style:
"""
:param param1: this is a first param
:param param2: this is a second param
:returns: description
:raises keyError: raises an exception
"""

Naming convention

  • Classes: CamelCase
  • Methods: snake_case
  • Instance variables: snake_case
  • Dict keys: lowercase

Commits

  • Commit often
  • Please write good commit messages (see jvs commits for examples of high quality messages)

Citation

J. Nordin, V. Brinnel, J. van Santen, M. Bulla, U. Feindt et al. Transient processing and analysis using AMPEL. Astronomy and Astrophysics 631 (2019) A147. doi:10.1051/0004-6361/201935634

Pinned Loading

  1. Ampel-interface Ampel-interface Public

    Abstract base classes and type hints for the Ampel system

    Python 2

  2. Ampel-core Ampel-core Public

    Alice in Modular Provenance-Enabled Land

    Python 10 3

Repositories

Showing 10 of 16 repositories
  • Ampel-core Public

    Alice in Modular Provenance-Enabled Land

    AmpelProject/Ampel-core’s past year of commit activity
    Python 10 BSD-3-Clause 3 1 1 Updated Nov 11, 2024
  • Ampel-interface Public

    Abstract base classes and type hints for the Ampel system

    AmpelProject/Ampel-interface’s past year of commit activity
    Python 2 BSD-3-Clause 0 2 3 Updated Nov 11, 2024
  • renovate-config Public

    Shared configurations for Renovate bot

    AmpelProject/renovate-config’s past year of commit activity
    0 0 0 1 Updated Nov 11, 2024
  • Ampel-alerts Public

    Alert support for Ampel

    AmpelProject/Ampel-alerts’s past year of commit activity
    Python 0 BSD-3-Clause 4 1 2 Updated Nov 8, 2024
  • AmpelProject/ampel-live-dashboard’s past year of commit activity
    Vue 0 0 1 1 Updated Nov 8, 2024
  • ampelastro Public

    Public webpage for AmpleAstro

    AmpelProject/ampelastro’s past year of commit activity
    HTML 0 0 0 1 Updated Mar 2, 2024
  • ampelproject.github.io Public

    Alice in Modular Provenance-Enabled Land

    AmpelProject/ampelproject.github.io’s past year of commit activity
    0 1 0 1 Updated Jan 21, 2024
  • .github Public
    AmpelProject/.github’s past year of commit activity
    0 0 0 1 Updated Dec 1, 2023
  • Ampel-argo Public

    Argo Workflows translation layer

    AmpelProject/Ampel-argo’s past year of commit activity
    Python 0 0 0 1 Updated Oct 24, 2023
  • Ampel-argo-job Public

    Argo workflows enabled ampel job schema

    AmpelProject/Ampel-argo-job’s past year of commit activity
    Python 0 0 0 1 Updated Apr 17, 2023

Top languages

Loading…

Most used topics

Loading…