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

test_applications_from_config[simtools-derive-psf-parameters_run] fails occasionally #1157

Closed GernotMaier closed 1 week ago

GernotMaier commented 1 week ago

test_applications_from_config[simtools-derive-psf-parameters_run] fails occasionally with

NFO::ray_tracing(l181)::simulate::Simulating RayTracing for off_axis=0.0, mirror=0
INFO::simtel_runner(l120)::run::Running (test) with command: /workdir/sim_telarray/sim_telarray/bin/sim_telarray -c /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model/CTA-North-LSTN-01-6.0.0_tune_psf.cfg -I../cfg/CTA -I/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model -C random_state=none -C IMAGING_LIST=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C stars=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/stars-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C altitude=2156.0 -C telescope_theta=20.0 -C star_photons=5000 -C telescope_phi=0 -C camera_transmission=1.0 -C nightsky_background=all:0. -C trigger_current_limit=1e10 -C telescope_random_angle=0 -C telescope_random_error=0 -C convergent_depth=0 -C maximum_telescopes=1 -C show=all -C camera_filter=none /workdir/sim_telarray/run9991.corsika.gz 2>&1 > /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/log-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.log 2>&1
INFO::psf_analysis(l72)::read_photon_list_from_simtel_file::Reading sim_telarray file /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis.gz
INFO::ray_tracing(l551)::export_results::Exporting results to /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/results/ray-tracing-North-LSTN-01-d10.0km-za20.0deg_tune_psf.ecsv
INFO::ray_tracing(l181)::simulate::Simulating RayTracing for off_axis=0.0, mirror=0
INFO::simtel_runner(l120)::run::Running (test) with command: /workdir/sim_telarray/sim_telarray/bin/sim_telarray -c /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model/CTA-North-LSTN-01-6.0.0_tune_psf.cfg -I../cfg/CTA -I/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model -C random_state=none -C IMAGING_LIST=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C stars=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/stars-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C altitude=2156.0 -C telescope_theta=20.0 -C star_photons=5000 -C telescope_phi=0 -C camera_transmission=1.0 -C nightsky_background=all:0. -C trigger_current_limit=1e10 -C telescope_random_angle=0 -C telescope_random_error=0 -C convergent_depth=0 -C maximum_telescopes=1 -C show=all -C camera_filter=none /workdir/sim_telarray/run9991.corsika.gz 2>&1 > /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/log-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.log 2>&1
INFO::psf_analysis(l72)::read_photon_list_from_simtel_file::Reading sim_telarray file /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis.gz
INFO::ray_tracing(l551)::export_results::Exporting results to /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/results/ray-tracing-North-LSTN-01-d10.0km-za20.0deg_tune_psf.ecsv
INFO::ray_tracing(l181)::simulate::Simulating RayTracing for off_axis=0.0, mirror=0
INFO::simtel_runner(l120)::run::Running (test) with command: /workdir/sim_telarray/sim_telarray/bin/sim_telarray -c /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model/CTA-North-LSTN-01-6.0.0_tune_psf.cfg -I../cfg/CTA -I/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model -C random_state=none -C IMAGING_LIST=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C stars=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/stars-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C altitude=2156.0 -C telescope_theta=20.0 -C star_photons=5000 -C telescope_phi=0 -C camera_transmission=1.0 -C nightsky_background=all:0. -C trigger_current_limit=1e10 -C telescope_random_angle=0 -C telescope_random_error=0 -C convergent_depth=0 -C maximum_telescopes=1 -C show=all -C camera_filter=none /workdir/sim_telarray/run9991.corsika.gz 2>&1 > /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/log-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.log 2>&1
INFO::psf_analysis(l72)::read_photon_list_from_simtel_file::Reading sim_telarray file /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis.gz
INFO::ray_tracing(l551)::export_results::Exporting results to /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/results/ray-tracing-North-LSTN-01-d10.0km-za20.0deg_tune_psf.ecsv
INFO::ray_tracing(l181)::simulate::Simulating RayTracing for off_axis=0.0, mirror=0
INFO::simtel_runner(l120)::run::Running (test) with command: /workdir/sim_telarray/sim_telarray/bin/sim_telarray -c /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model/CTA-North-LSTN-01-6.0.0_tune_psf.cfg -I../cfg/CTA -I/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/model -C random_state=none -C IMAGING_LIST=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C stars=/tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/stars-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis -C altitude=2156.0 -C telescope_theta=20.0 -C star_photons=5000 -C telescope_phi=0 -C camera_transmission=1.0 -C nightsky_background=all:0. -C trigger_current_limit=1e10 -C telescope_random_angle=0 -C telescope_random_error=0 -C convergent_depth=0 -C maximum_telescopes=1 -C show=all -C camera_filter=none /workdir/sim_telarray/run9991.corsika.gz 2>&1 > /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/log-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.log 2>&1
INFO::psf_analysis(l72)::read_photon_list_from_simtel_file::Reading sim_telarray file /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/photons-North-LSTN-01-d10.0km-za20.0deg-off0.000deg_tune_psf.lis.gz
INFO::ray_tracing(l551)::export_results::Exporting results to /tmp/pytest-of-root/pytest-0/popen-gw0/test-data34/simtools-derive-psf-parameters-run/simtools-tests/ray-tracing/results/ray-tracing-North-LSTN-01-d10.0km-za20.0deg_tune_psf.ecsv
Traceback (most recent call last):
  File "/workdir/env/bin/simtools-derive-psf-parameters", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/__w/simtools/simtools/simtools/applications/derive_psf_parameters.py", line 430, in main
    run_pars(tel_model, args_dict, best_pars, data_to_plot, radius, pdf_pages)
  File "/__w/simtools/simtools/simtools/applications/derive_psf_parameters.py", line 317, in run_pars
    raise ValueError("No best parameters found")
ValueError: No best parameters found

Rerunning usually fixes it (which is not a good solution). Check how we can reliably find best parameters.

GernotMaier commented 1 week ago

I am closing this one, this was probably fixed in #1148.

I have run the test 100 times locally without seeing this error (before it occurred roughly 10-30% of the times). Also didn't see it in any of the github action integration test.