Skip to main content

Onsite analysis pipeline for the CTA LST-1

Project description

lstosa

ci Documentation Status coverage quality pypi DOI

Prototype onsite processing pipeline for the Large Size Telescope prototype (LST-1) of CTA (Cherenkov Telescope Array) based on cta-lstchain running on the LST-1 IT onsite center at ORM (La Palma, Spain). It automatically carries out the next-day analysis of observed data using cron jobs, parallelizing the processing using the job scheduler SLURM. It provides data quality monitoring and tracking of analysis products' provenance. Moreover, it also massively reprocesses the entire LST-1 dataset with each cta-lstchain major release:

Install

We recommend using an isolated conda environment.

  • Install miniconda first.

  • Clone the repository, create and activate the conda environment using the environment.yml file:

    git clone https://github.com/cta-observatory/lstosa.git
    cd lstosa
    conda env create -n osa -f environment.yml
    conda activate osa
    

Then install lstosa as a user with: pip install lstosa, or as a developer with: pip install -e ..

In case you want to install the lstchain development version instead of a fixed tag, you can run inside the osa environment:

pip install git+https://github.com/cta-observatory/cta-lstchain

To update the environment (provided dependencies get updated), use:

conda env update -n osa -f environment.yml

Note to developers: to enforce a unique code convention, please install pre-commit (pre-commit install) after cloning the repository and creating the conda environment. This will black the committed files automatically.

Workflow management

lstosa workflow is handled daily by the sequencer script, which identifies which observations are to be processed, generates the analysis workflow, and submits the jobs. A first calibration job produces the daily calibration coefficients. Subsequently, data reconstruction jobs are scheduled on a subrun-wise basis (1 job corresponds to around 10 seconds of observed data, and its processing up to DL2 takes about 30-40 mins).

flowchart LR

    daq --> osa_seq
    osa_seq --> slurm --> osa_closer
    daq[DAQ]


    subgraph osa_seq [sequencer]
        direction TB
    A(Daily observation summary)
    B(Generate workflow)
    C(Submit jobs)
    A --> B --> C
    end

    subgraph slurm [SLURM parallel processing]
        direction TB
    H(Calibration sequence)
    I(Reconstruction sequences)
    H --> I
    end

    subgraph osa_closer [autocloser]
        direction TB
    D(Check job completion)
    E(Move files to final directories)
    F(Merge files)
    G(Parse provenance logs)
    D --> E --> F --> G
    end

Usage

To use lstosa, you will first need to symlink some auxiliary files in a similar directory tree structure to the standard data production and set the paths correctly in your lstosa configuration file. Then to process all the runs from a given date, you can run the following command (use first the --simulate option to dry-run without actually submitting jobs):

sequencer --config your_osa_config.cfg --date YYYY-MM-DD LST1

Once all jobs finish, the autocloser script checks job completion, merges files, moves them to their final directories, and parses provenance logs.

autocloser --config your_osa_config.cfg --date YYYY-MM-DD LST1

Dataflow

graph LR

    subgraph DAQ
    D1[R0]
    D2[DRS4 calib run]
    D3[Pedestal calib run]
    D4[Pointing log]
    end

    D2 --> C1
    D3 --> C2

    subgraph Calibration
    C1[DRS4 baseline correction]
    C2[Calibration charge coeffitiens]
    C1 --> C2
    end

    subgraph lstMCpipe
    M1[gamma DL2 MC]
    M2[RF models]
    end

    subgraph Sky-data reconstruction
    S1[DL1a]
    S2[DL1b]
    S3[muons]
    S4[DL1 check]
    S5[DL2]
    S6[DL3]
    S7[IRF]
    D1 & D4 & C1 & C2 --> S1
    S1 --> S3
    S1 --> S2
    S2 & S3 --> S4
    S2 ---> S5
    S5 --> S6
    S7 --> S6
    M2 --> S5
    M1 --> S7
    end

    subgraph High-level Gammapy
    DL4
    DL5
    S6 --> DL4
    DL4 --> DL5 --> ...
    end

Warning: standard production of DL3 data and higher-level results is still under development.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lstosa-0.10.4.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lstosa-0.10.4-py3-none-any.whl (119.9 kB view details)

Uploaded Python 3

File details

Details for the file lstosa-0.10.4.tar.gz.

File metadata

  • Download URL: lstosa-0.10.4.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lstosa-0.10.4.tar.gz
Algorithm Hash digest
SHA256 610d5be63cefd342fcb2d44f7ca88c570c6832c7b5e6a663e847c83f6efec6e7
MD5 fa81546ccd7dc2b60db05179003ac095
BLAKE2b-256 18b5113b79736c76e086bd6b36cbf1ce57e708d882ed579aa686437bc4ab8b2f

See more details on using hashes here.

File details

Details for the file lstosa-0.10.4-py3-none-any.whl.

File metadata

  • Download URL: lstosa-0.10.4-py3-none-any.whl
  • Upload date:
  • Size: 119.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lstosa-0.10.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8ed06d6ac4d6e8f5e418506e7ce5870a53a0e81eaa68ddfeac82507a5c4f2159
MD5 5af054f5f7441b78d5097443e2ea656d
BLAKE2b-256 d0d80c2bb541b7317aa63c0eff763af1b0efe0408937b4a6a18e6dbae5ee8bbc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page