-
Notifications
You must be signed in to change notification settings - Fork 270
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
Problem with "parent" argument in eventsource #1013
Comments
Hi Franca, I already opened a PR in the LST eventsource to fix this: cta-observatory/ctapipe_io_lst#6 You maybe need to click the "watch" button in this repository, so you receive notifications. |
Perhaps we should rights to merge things in that repo to Franca (or whoever is maintaining it)? |
In any case, I just merged it |
I gave her Admin permissions a few days ago |
Thanks Karl, ValueError: Only one of
That is the same for the ChargeResolutionGenerator tool of ctapipe that I took as example should I not better define Then it works |
You should do it the other way around. Only pass parent=self |
We updated all the tools in ctapipe, so maybe just have a look at the tool you adapted |
That is what I did, did you test the ChargeResolutionGenerator tool? There is also a problem with one of the arguments:
`Calculate the Charge Resolution from a sim_telarray simulation and store within OptionsArguments that take values are actually convenience aliases to full KeyError Traceback (most recent call last) /scratch4/CTA_soft/anaconda3/envs/cta-dev/lib/python3.6/site-packages/traitlets/config/application.py in print_help(self, classes) /scratch4/CTA_soft/anaconda3/envs/cta-dev/lib/python3.6/site-packages/traitlets/config/application.py in print_options(self) /scratch4/CTA_soft/anaconda3/envs/cta-dev/lib/python3.6/site-packages/traitlets/config/application.py in print_alias_help(self) KeyError: 'PeakFindngIntegrator' ` |
Anyway, thanks, I will change as you suggest.
|
The help string you posted is correct. Both options are necessary but mutual exclusive. If you have a |
Actually the argument "tool" does not exist anymore, also a bit strange the concept of "both necessary but mutual exclusive" (for example I used only on them) ...
|
Both parameters are needed for the class, they do different things. TL:DR: passing both config and parent does strange things, this is why we now forbid it. If there is a parent Component, child components must get |
Ah, I just saw that the docstring says |
See #1016 |
This issue can be closed after #1016? |
I think this can be closed now @FrancaCassol ? |
* master: Add tests to Tools to check that help message works (cta-observatory#1034) make codacy happy Fix neighbors (cta-observatory#1015) Fix component docs (cta-observatory#1016) related to cta-observatory#1013 allow enums in containers and support in tableio # Conflicts: # ctapipe/tools/bokeh/file_viewer.py # ctapipe/tools/extract_charge_resolution.py
* master: Corrections to address comments Add tests to Tools to check that help message works (cta-observatory#1034) make codacy happy Fix neighbors (cta-observatory#1015) Fix component docs (cta-observatory#1016) related to cta-observatory#1013 allow enums in containers and support in tableio
* master: Corrections to address comments Add tests to Tools to check that help message works (cta-observatory#1034) make codacy happy Fix neighbors (cta-observatory#1015) Fix component docs (cta-observatory#1016) related to cta-observatory#1013 allow enums in containers and support in tableio # Conflicts: # ctapipe/image/tests/test_charge_extraction.py # ctapipe/image/waveform_extractor.py # ctapipe/tools/extract_charge_resolution.py
Hi,
when I call the ctapipe_io_lst source from a tool:
flatfield_tool.run(argv=['--config','/astro/users/cassol/soft/python/cta-lstchain/lstchain/tools/flatfield_param.json'])
I get an error concerning the "parent" and the "config" arguments.
The Component argument description seems outdated (there is "tool" not "parent").
Can perhaps somebody help?
Thanks
The text was updated successfully, but these errors were encountered: