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

Refactoring of the TRAINING stage #171

Open HealthyPear opened 2 years ago

HealthyPear commented 2 years ago

Context

See #91

Description

These are the minimal changes to apply in order to not create breaking changes, any other improvement should be the focus of subsequent pull requests.

Caveats

It is not currently possible to refactor the whole pipeline, so the DL2 script won't be interested in these changes. This means that its configuration will be still done using analysis.yaml. This is not ideal as it could lead to some issues or bugs...

One idea would be to separate the estimation part of the code in order to use ctapipe-process also for DL2.

kosack commented 2 years ago

you could perhaps also consider generating a JSON config file for ctapipe-process from your YAML config, rather than supplying one. That would ensure they are synchronized.

HealthyPear commented 2 years ago

But they don't have the same nomenclature, how would you do this automatically (I am assuming this since you wrote "generating")?

kosack commented 2 years ago

You would have to write a function that translates one to the other. Not pretty, but it would work. write_ctapipe_config(protpipe_config_dict, filename)