/jayct

Java library to treat images recorded by Imaging Atmospheric Cherenkov Telescopes.

Primary LanguageJavaMIT LicenseMIT

jayct Build Status

Java library for getting feature representations from images recorded by Imaging Atmospheric Cherenkov Telescopes.

Overview

Usage

We tried to keep it simple. Heres an example of how to reconstruct event directions.

        ImageReader events = ImageReader.fromURL(url);

        for (ImageReader.Event event : events) {
            List<ShowerImage> showerImages = TailCut.onImagesInEvent(event);
            List<Moments> moments = HillasParametrization.fromShowerImages(showerImages);

            ReconstrucedEvent reconstrucedEvent = DirectionReconstruction.fromMoments(moments, event.mc.alt, event.mc.az);

            if (reconstrucedEvent.direction.isNaN()){
                continue;
            }
            
            // continue doing whatever you do
        }

Same goes for the interfaces of the containers holding some data. Here is what the tailcut implementation looks like.

    // dilate the shower
    for (int l = 1; l < levels.length; l++) {
        showerImage.dilate(image, levels[l]);
    }

Execution on Apache Flink

There are two ways to distribute the calculations

  1. Naively one can process each event in parallel using independent pipelines.

  2. Each image within an event can be handled in parallel and then merged back into on single data stream using a timed window operation.

both approaches are implemented within the jayct.flink package.

Input (subject to change)

Images recorded by the Cherenkov Telescope Array (CTA) are collected within events. Each event has an ID and some Monte Carlo Information associated with it. For now we store the images in JSON files having a similar structure as the event containers in ctapipe (their structure has changed since this program was written)