Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Reconstruction Plotter #2539

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

kosack
Copy link
Contributor

@kosack kosack commented Apr 23, 2024

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

image
So far it only plots the ellipses.

Todo:

  • optionally retain previous points
  • display true points of origin and impact
  • display reco points of origin and impact
  • mark which telescopes were actually used in reconstruction (gray out others)
  • overplot image axes on sky plot
  • optionally display images on one or both plots (only really works well with small subarrays)
  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
Copy link
Member

maxnoe commented Apr 23, 2024

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

@maxnoe
Copy link
Member

maxnoe commented Apr 23, 2024

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
Copy link
Member

maxnoe commented Apr 23, 2024

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

@maxnoe maxnoe mentioned this pull request Apr 23, 2024
2 tasks
true_core_pos.y.to_value("m"),
marker="+",
s=50,
color="red",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these stylings and colors should be configurable

@kosack
Copy link
Contributor Author

kosack commented Apr 23, 2024

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
Copy link
Contributor Author

kosack commented Apr 23, 2024

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
Copy link
Contributor Author

kosack commented Apr 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants