cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
64 stars 268 forks source link

Adding a Reconstruction Plotter #2539

Open kosack opened 5 months ago

kosack commented 5 months ago

Added a simple HillasRecoPlotter Component for debugging or making nice diagrams.

image So far it only plots the ellipses.

Todo:

  with EventSource(filename, max_events=1000) as source:
        calib = CameraCalibrator(subarray=source.subarray)
        process_images = ImageProcessor(subarray=source.subarray)
        process_shower = ShowerProcessor(subarray=source.subarray)
        display = HillasRecoDisplay(subarray=source.subarray, trace_points=True, figsize=(10,6))

        for event in source:
            calib(event)
            process_images(event)
            process_shower(event)
            display(event)
maxnoe commented 5 months ago

Seems the arrows are in the wrong direction on the ground. What do you use to plot them?

maxnoe commented 5 months ago

I also often though about a general display component that can be run inside the tool.

This could be one tab of it. Others for lower level data.

maxnoe commented 5 months ago

E.g. instead of ctapipe-display-dl1 we could just use ctapipe-process --display

kosack commented 5 months ago

I also often though about a general display component that can be run inside the tool. This could be one tab of it. Others for lower level data.

yes, this was my original idea as well. WOuld need to use Qt or something for the UI, or perhaps just going for bokeh would be nicer, as that is quite a bit faster.

kosack commented 5 months ago

Seems the arrows are in the wrong direction on the ground. What do you use to plot them?

It's using the set_hillas_vector() function, which is a bit nicer than the line method added later as it can be updated simply by calling a second time. I may just have the wrong sign for the asymmetry, I didn't check: though it seems a bit random. I also don't really lke how it looks, and will probably modify ArrayDisplay to have the vectors in extend in both directions, with an arrow pointing along the gradient. That way it works even when the assymmetry is incorrect.

kosack commented 5 months ago

This is very much a work in progress, or more of a proof-of-concept that I was using to check some algorithms