-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix testeff again #1177
Fix testeff again #1177
Conversation
…ory if the correction is applied. Change the command line option to be skip instead of apply to follow the logic better. Skip the SST test because the mirrors are not implemented yet. Add tests for new function.
The unit tests fail at a surprising place, do you want to fix that first? |
I thought it was a hiccup last night, so I reran it and it still happens. Completely weird considering I see a correct value in the DB and locally this test passes. I will see what I can do. |
…ower photon count
…ower photon count
…date we get 79 photons (it is expected that protons would lead to less photons, so this should be fine)
I fixed the integration test. The change in the number of photons on the ground is not entirely expected, I didn't think the change in sim_telarray would lead to that, but it's not an issue I think so I relaxed the requirement instead. The unit test I still can't reproduce, so I will wait to see if it happens again on github. |
Analysis Details0 IssuesCoverage and DuplicationsProject ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w |
Unit tests are fixed, not sure why it was never an issue before, probably due to a random order of tests running. Good that we found this issue anyway. Integration tests are also expected to pass, but you can wait for them before reviewing of course. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
if "simtools-validate-camera-efficiency_SSTS" == full_test_name: | ||
pytest.skip( | ||
"The test simtools-validate-camera-efficiency_SSTS is skipped " | ||
"since the fake SST mirrors are not yet implemented (#1155)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the expression 'fake'. What does it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to provide a list of mirrors in the "standard style" of sim_telarray for SST. KB called it fake_astri_mirrorpos.dat
, so I did the same here. Either way, this comment will disappear when #1155 is fixed.
The summary below was written by copilot. The gist is that
model_parameters.py
is a bit ugly.This pull request includes several changes to the
simtools
package to update the handling of the NSB spectrum correction and add new functionality for exporting model files. The key changes involve renaming a parameter, updating method calls, and adding new methods and tests to support these updates.Parameter Renaming and Method Updates:
simtools/applications/validate_camera_efficiency.py
: Renamed the--apply_correction_to_nsb_spectrum
argument to--skip_correction_to_nsb_spectrum
and changed its type to a boolean flag.simtools/camera_efficiency.py
: Updated method calls to use the newskip_correction_to_nsb_spectrum
parameter instead ofapply_correction_to_nsb_spectrum
. [1] [2]simtools/simtel/simulator_camera_efficiency.py
: Updated the constructor and_make_run_command
method to useskip_correction_to_nsb_spectrum
. [1] [2] [3]New Functionality:
simtools/model/model_parameter.py
: Added a new methodexport_nsb_spectrum_to_telescope_altitude_correction_file
to export the NSB spectrum correction file.Tests:
tests/integration_tests/test_applications_from_config.py
: Added a condition to skip a specific test due to unimplemented features.tests/unit_tests/model/test_model_parameter.py
: Added a new unit test for theexport_nsb_spectrum_to_telescope_altitude_correction_file
method.tests/unit_tests/simtel/test_simulator_camera_efficiency.py
: Updated the test to useskip_correction_to_nsb_spectrum
.