gammasim / simtools

Tools and applications for the Simulation System of the CTA Observatory.
https://gammasim.github.io/simtools
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Look deeper into argparse and Configurator #1005

Closed VictorBarbosaMartins closed 3 months ago

VictorBarbosaMartins commented 3 months ago

Passing a list of floats to an application does not work. The work around we have been using (see e.g. calculate-trigger-rate application) is to require a list of strings and then convert to a list of floats in the application. Although this works, we need to understand why a list of float does not work in the first place.

https://github.com/gammasim/simtools/pull/1000#discussion_r1647715407

GernotMaier commented 3 months ago

This issue is already addressed in the simulation configuration PR (#989) and I will extract it into a separate PR for easier review.

This is the solution I found after spending quite some time:

Not sure if one would prefer --energy_range 50 GeV 10 TeV (without quotes), I think we can start with the above and then continue. Definitely the nice part here is that we do not force the units onto the user.

VictorBarbosaMartins commented 3 months ago

I agree with the solution you found. And agree also that treating this in a dedicated PR is better too.