-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unit tests for makers, container and component modules (part 1/X) #163
Unit tests for makers, container and component modules (part 1/X) #163
Conversation
ds to find computed calibration quatities
…anted one -update pp and n values to last studies -display wfs -> mean instead of sum -Agg backend is not forced in Pstat calibnration
…ain into dev_test_doc
exluse user_scripts to pytest
improvement split_run method
src/nectarchain/user_scripts/ggrolleron/gain_PhotoStat_computation.py
Outdated
Show resolved
Hide resolved
Hi @guillaumegrolleron , Many thanks for this PR ! Just one question: did you check that Despeina's GUI and scripts for the TRR are still running fine ? I understand you refactored these scripts to avoid any clash with Otherwise, ready to merge or do you want to add things in this PR ? |
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.
OK... As is, the GUI for the TRR cannot be launched properly. @guillaumegrolleron , could you please either revert your changes in Despina's scripts, or fix it ? At the moment, the different imports are failing. Quickly hacking, but not cleanly, into it, for instance the linearity test fails with:
2025-01-15 21:04:27,329 �[1;32mINFO�[0m [tools_components.LinearityTestTool] (tool.finish): Goodbye
2025-01-15 21:04:27,329 �[1;33mWARNING�[0m [tools_components.LinearityTestTool] (core.finish): Shutting down.
Traceback (most recent call last):
File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/user_scripts/dmousadi/TRR_scripts/linearity.py", line 450, in <module>
main()
File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/user_scripts/dmousadi/TRR_scripts/linearity.py", line 134, in main
output = tool.finish()
^^^^^^^^^^^^^
File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/user_scripts/dmousadi/TRR_scripts/tools_components.py", line 255, in finish
dataset = group["ChargeContainer"]
~~~~~^^^^^^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/home/jlenain/local/opt/mambaforge/envs/nectar-dev/lib/python3.11/site-packages/h5py/_hl/group.py", line 357, in __getitem__
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 241, in h5py.h5o.open
KeyError: "Unable to synchronously open object (object 'ChargeContainer' doesn't exist)"
I guess this is related to the refactoring from ChargeContainer
to ChargeContainers
, is that correct ?
If you allow me to commit here, I have a patch ready at least to fix the imports for the TRR GUI test suite. I have put that into a new branch in my fork: https://github.com/jlenain/nectarchain/tree/trr-gui-fix |
Hum... not related to that. The same kind of error occurs on the deadtime test:
|
OK, got it... It is linked to the change from |
Hi @jlenain ! |
This change is done the make more robust the I/O methods for |
Hi @guillaumegrolleron ! Concerning the errors linked to the changes in container I/O methods, I am currently working on fixes for it in the branch https://github.com/jlenain/nectarchain/tree/trr-gui-fix. I'll open a PR on top on your PR, if manageable, for that. |
Whether the TRR test suite should be kept on |
Ok so we first merge this PR and then yours ? |
Yep, we can do that. Green light on your side that I merge this PR ? |
Yes you can merge ! |
* Try to fix TRR GUI test suite following PR #163 * Fixed bug in selection of fit function to be used for linearity
This PR is the first part of the implementation of the unit tests for :
It also includes modification of the core containers class to make more robust the I/O methods. Thus the pedestal workflow has been changed to fully use the
Necrtachain
containers (instead of thepytable
module).The LightNectarcamEventSource has been removed because you are now using the implementation of
ctapipe_io_nectarcam
There are also improvement of user scripts for waveforms, charges and photostat computation