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

Allow hist file into trigger rate application #1000

Closed VictorBarbosaMartins closed 3 months ago

VictorBarbosaMartins commented 3 months ago

In this PR, I implemented some improvements to the trigger rate tool that allows it to calculate the trigger rate for a given an input .hdata.zst file (and not only an .simtel.zst file as it is in main now). However, the configuration used for the simulation is not propagated to the .hdata.zst as it is to the .simtel.zst, which means we do not have the view cone and the energy range used, which are both necessary for the operation of this tool. Therefore, if passing a .hdata to the tool, --energy_range and --view_cone also have to be passed. One can test this with the new integration test simtools-calculate-trigger-rate --config tests/integration_tests/config/calculate_trigger_rate_one_file_hdata.yml. Not passing --energy_range or --view_cone for an input .hdata file will lead to error, which is tested in the unit tests.

I believe the low coverage by sonarqube is due to the changes in the application itself, which we do not test with unit tests at the moment, so I suggest to ignore it.

Closes #934.

ctao-dpps-sonarqube[bot] commented 3 months ago

Failed

Analysis Details

0 Issues

Coverage and Duplications

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube

ctao-dpps-sonarqube[bot] commented 3 months ago

Failed

Analysis Details

0 Issues

Coverage and Duplications

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube

VictorBarbosaMartins commented 3 months ago

Hi @GernotMaier, thanks for the comments. I think I addressed all of them. Please let me know what to do in regard to the type=str or type=float. Also please have a look again once tests pass. If they fail, I will deal with them later.

ctao-dpps-sonarqube[bot] commented 3 months ago

Failed

Analysis Details

0 Issues

Coverage and Duplications

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube

VictorBarbosaMartins commented 3 months ago

Thanks again @GernotMaier. Will wait until the tests pass again to merge.

ctao-dpps-sonarqube[bot] commented 3 months ago

Failed

Analysis Details

0 Issues

Coverage and Duplications

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube