cta-observatory / protopipe

Prototype data analysis pipeline for the Cherenkov Telescope Array Observatory
https://protopipe.readthedocs.io/en/latest/
Other
5 stars 13 forks source link

[BUG] Notebooks should try to import uproot only if ROOT-based data is required #173

Open HealthyPear opened 2 years ago

HealthyPear commented 2 years ago

Describe the problem

In some notebooks, the uproot library is always imported. If the user doesn't need /want to bother with ROOT-based data for comparisons, there will be no uproot in the virtual environment.

To Reproduce Steps to reproduce the behavior:

  1. Launch the DirectionLUT benchmark with no uproot and no CTAMARS or EventDisplay data.

Expected behavior

After parameter injection, only if any boolean variable is used to load 3rd party ROOT-based data there should be the import. If uproot is not present and e.g. load_CTAMARS is False, the notebook shouldn't crash with an ImportError.