Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission issues in integration test #1106

Closed
orelgueta opened this issue Aug 27, 2024 · 4 comments
Closed

Transmission issues in integration test #1106

orelgueta opened this issue Aug 27, 2024 · 4 comments
Labels
Close_this? Issues suggested to be closed.

Comments

@orelgueta
Copy link
Contributor

orelgueta commented Aug 27, 2024

I've looked into

pytest --no-cov "tests/integration_tests/test_applications_from_config.py::test_applications_from_config[simtools-simulate-prod_gamma_20_deg]"

and files (although very small ones are generated for me at /tmp/pytest-of-root/pytest-1/test-data0/simtools-simulate-prod-gamma_20_deg/simtools-output/test-production//simtel-data/North/gamma/data/run000002_gamma_za020deg_azm000deg_North_TestLayout_test-production.simtel.zst

The log files look reasonable and it runs through without errors.

There are issues, many statements like

Warning: problematic transmission between telescope and observation level.
Evaluation was between observation layer at 21.560000 m a.s.l.
and 31.000000 m above, plus 16.000000 m in the telescope.
Lookup in transmission table in wavelength range from 200 to 1000 nm,
   altitude range from 2.156000 to 100.000000 km a.s.l.,
   for wavelength 400 nm from 0.052560 km a.s.l., for airmass factor 1.000000
Starting altitude of 0.052560 km is out of range (2.156000 to 100.000000 km).
This is either an underground installation or the wrong transmission table.
At 400 nm we get a transm. of 0.000000 between tel. and obs.lev., and 0.000000 inside tel.
Your transmission table might not be appropriate for the given site.
We are ignoring this problematic part now but you should fix your set-up.

in the log file.

Originally posted by @GernotMaier in #875 (comment)

Was this resolved in the meantime? The original PR does not refer to this issue again and a search for these warnings does not appear anywhere else in the repo. Therefore I am opening this issue so that we remember to check it.

@GernotMaier
Copy link
Contributor

Tried to remember and reread the issues / pull requests, but seems we didn't address this (multiple points were addressed).

This is a good point and I actually suggested / wanted to suggest that we move all those test functions from test_applications_from_config.py to a separate test module. This would be cleaner and allow us as well to write unit tests on this code.

@GernotMaier
Copy link
Contributor

The test discussed in this issues has been renamed to

tests/integration_tests/test_applications_from_config.py::test_applications_from_config[simtools-simulate-prod_gamma_20_deg_north]

Rerunning the test doesn't generate any errors. We also updated test_application_from_config.py in PR #1238 to make it cleaner. Therefor suggest to close this issues.

For completeness, this is the output I get from the test now:

 pytest -s --no-cov tests/integration_tests/test_applications_from_config.py::test_applications_from_config[simtools-simulate-prod_gamma_20_deg_north]
================================================================================================ test session starts =================================================================================================
platform linux -- Python 3.11.7, pytest-8.3.3, pluggy-1.5.0 -- /workdir/env/bin/python3.11
cachedir: .pytest_cache
Test order randomisation NOT enabled. Enable with --random-order or --random-order-bucket=<bucket_type>
rootdir: /workdir/external/simtools
configfile: pyproject.toml
plugins: cov-6.0.0, mock-3.14.0, profiling-1.7.0, random-order-1.1.1, repeat-0.9.3, xdist-3.6.1
collected 1 item

tests/integration_tests/test_applications_from_config.py::test_applications_from_config[simtools-simulate-prod_gamma_20_deg_north] DEBUG::simulator(l63)::__init__::Init Simulator corsika_simtel
DEBUG::simulator(l194)::_validate_run_list_and_range::run_range: [10]
INFO::simulator(l198)::_validate_run_list_and_range::run_list: [np.int64(10)]
DEBUG::array_model(l52)::__init__::Init ArrayModel
INFO::db_handler(l145)::_find_latest_simulation_model_db::Updated the DB simulation model to the latest version CTAO-Simulation-Model-v0-4-0
DEBUG::array_model(l89)::_initialize::Getting site parameters from DB (North)
DEBUG::site_model(l40)::__init__::Init SiteModel for site North
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North LSTN-01
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North LSTN-02
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North LSTN-03
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North LSTN-04
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-01
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-02
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-03
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-04
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-05
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-06
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-07
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-10
DEBUG::telescope_model(l48)::__init__::Init TelescopeModel North MSTN-15
DEBUG::corsika_config(l48)::__init__::Init CorsikaConfig
DEBUG::corsika_config(l114)::fill_corsika_configuration::Setting CORSIKA parameters
DEBUG::corsika_config(l120)::fill_corsika_configuration::Setting CORSIKA parameters from database (6.0.0)
DEBUG::corsika_config(l233)::_corsika_configuration_interaction_flags::Interaction parameters: {'FIXHEI': ['0.00', '0'], 'FIXCHI': ['0.0'], 'TSTART': ['T'], 'ECUTS': ['0.3 0.1 0.02 0.02'], 'MUADDI': ['F'], 'MUMULT': ['T'], 'LONGI': ['T', '20.0', 'F', 'F'], 'MAXPRT': ['10'], 'ECTMAP': ['1.e6']}
DEBUG::corsika_config(l278)::_corsika_configuration_cherenkov_parameters::Cherenkov parameters: {'CERSIZ': [5.0], 'CERFIL': '0', 'CWAVLG': ['240.0', '1000.0']}
DEBUG::corsika_config(l309)::_corsika_configuration_iact_parameters::IACT parameters: {'SPLIT_AUTO': [15000000], 'IO_BUFFER': ['1000MB'], 'MAX_BUNCHES': [1000000]}
DEBUG::corsika_config(l589)::set_output_file_and_directory::Creating directory /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output
DEBUG::corsika_runner(l51)::__init__::Init CorsikaRunner
DEBUG::runner_services(l26)::__init__::Init RunnerServices
DEBUG::runner_services(l93)::load_data_directories::Creating output dir /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output
DEBUG::runner_services(l103)::load_data_directories::Data directories for corsika: {'output': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output'), 'sub_scripts': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_scripts'), 'sub_logs': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_logs'), 'data': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/corsika/data'), 'inputs': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/corsika/inputs'), 'logs': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/corsika/logs')}
DEBUG::simulator_array(l37)::__init__::Init SimulatorArray
DEBUG::runner_services(l26)::__init__::Init RunnerServices
DEBUG::runner_services(l93)::load_data_directories::Creating output dir /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output
DEBUG::runner_services(l103)::load_data_directories::Data directories for corsika_simtel: {'output': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output'), 'sub_scripts': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_scripts'), 'sub_logs': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_logs'), 'data': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/simtel/data'), 'inputs': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/simtel/inputs'), 'logs': PosixPath('/tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/simtel/logs')}
INFO::simulator(l268)::simulate::Submission command: local
DEBUG::simulator(l324)::_get_runs_and_files_to_submit::Getting runs and files to submit (None)
INFO::simulator(l273)::simulate::Starting submission for 1 run
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope LSTN-01
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-01-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-01-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope LSTN-02
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-02-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-02-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope LSTN-03
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-03-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-03-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope LSTN-04
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-04-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-LSTN-04-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-01
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-01-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-01-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-02
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-02-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-02-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-03
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-03-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-03-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-04
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-04-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-04-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-05
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-05-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-05-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-06
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-06-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-06-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-07
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-07-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-07-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-10
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-10-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-10-6.0.0_test-production-North.cfg
DEBUG::array_model(l190)::export_simtel_telescope_config_files::Exporting configuration file for telescope MSTN-15
DEBUG::model_parameter(l294)::_set_config_file_directory_and_name::Config file path: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-15-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
DEBUG::simtel_config_writer(l65)::write_telescope_config_file::Writing telescope config file /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-North-MSTN-15-6.0.0_test-production-North.cfg
INFO::array_model(l212)::export_simtel_array_config_file::Writing array configuration file into /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/CTA-test_layout-North-6.0.0_test-production-North.cfg
DEBUG::simtel_config_writer(l44)::__init__::Init SimtelConfigWriter
INFO::corsika_simtel_runner(l114)::_export_multipipe_script::Multipipe script: /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/multi_cta-North-test_layout.cfg
DEBUG::corsika_config(l589)::set_output_file_and_directory::Creating directory /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output
INFO::corsika_config(l445)::generate_corsika_input_file::Exporting CORSIKA input file to /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/corsika_config_gamma_North_test_layout_za020-azm000deg_test-production-North.input
DEBUG::corsika_runner(l109)::prepare_run_script::Extra commands to be added to the run script: None
DEBUG::corsika_runner(l110)::prepare_run_script::CORSIKA data will be set to /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/corsika/data
INFO::job_manager(l107)::submit::Submitting script /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_scripts/sub_run000010_gamma_za20deg_azm000deg_North_test_layout_test-production-North.sh
INFO::job_manager(l108)::submit::Job output stream /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_logs/sub_run000010_gamma_za20deg_azm000deg_North_test_layout_test-production-North.out
INFO::job_manager(l109)::submit::Job error stream /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_logs/sub_run000010_gamma_za20deg_azm000deg_North_test_layout_test-production-North.err
INFO::job_manager(l110)::submit::Job log stream /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/sub_logs/sub_run000010_gamma_za20deg_azm000deg_North_test_layout_test-production-North.job
INFO::job_manager(l129)::_submit_local::Running script locally
 INFO::simulate_prod(l193)::main::Production run is complete for primary gamma showers coming from 0.0 deg azimuth and zenith angle of 20.0 deg at the North site, using the 6.0.0 simulation model.
INFO::simulate_prod(l157)::pack_for_register::Packing the output files for registering on the grid
INFO::simulator(l450)::get_file_list::Getting list of output files
INFO::simulator(l450)::get_file_list::Getting list of log files
INFO::simulator(l450)::get_file_list::Getting list of hist files
INFO::simulate_prod(l178)::pack_for_register::Output files for the grid placed in /tmp/pytest-of-root/pytest-34/test-data0/simtools-simulate-prod-gamma_20_deg_north/simtools-output/directory_for_grid_upload
PASSED

@GernotMaier GernotMaier added the Close_this? Issues suggested to be closed. label Nov 14, 2024
@GernotMaier
Copy link
Contributor

This has been addressed, see explanation above. Closing the issue.

@orelgueta
Copy link
Contributor Author

For completeness, the errors were as a result of setting the altitude in cm rather than meters. This was fixed when we implemented the simulation verification integration test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close_this? Issues suggested to be closed.
Projects
None yet
Development

No branches or pull requests

3 participants
@GernotMaier @orelgueta and others