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

Check consistency of settings at different steps of the pipeline #190

Open
aleberti opened this issue Jan 21, 2024 · 3 comments
Open

Check consistency of settings at different steps of the pipeline #190

aleberti opened this issue Jan 21, 2024 · 3 comments

Comments

@aleberti
Copy link
Collaborator

To keep track of what was discussed in #148

There were some that involved pathological cases with people playing with tel_id numbering, but this is not related to ctapipe0.19 compatibility so we can look into this later on with a new PR. Concerning this test that you implemented, I only saw the one checking consistency between different subarray information if multiple files are read at once, while we were discussing that the telescope numbering should be set at the first analysis step and then it should not be changed by new settings in input card, or there should be a check that the settings that are used in the input card do not clash with what is read from the subarray, but again, I think we can do it properly in another PR. Let's merge this one :-).

@aleberti
Copy link
Collaborator Author

@jsitarek I see here different possibilities:

  • in the first steps of the pipeline (magic_calib_to_dl1 and lst1_magic_mc_dl0_to_dl1) we write the subarray configuration, then at later steps we read back the subarray information and the IDs from the config file to check that they match. In general this may not 100% fail proof because for example, in MC with 4LSTs, the subarray telescope descriptions do not have specific names like "LST-1", "LST-2" and so on, but just a generic "LST". So in this case I can just check that in the subarray there are the IDs specified in the config files and that the telescope type is correct
  • the other thing that can be done, is to write out the dictionary with the telescope IDs from the config file to the HDF5 files created in magic_calib_to_dl1 and lst1_magic_mc_dl0_to_dl1. Then this would be checked in the next steps. So this would ensure that the IDs are not changed in the config file in following steps of the processing

@jsitarek
Copy link
Collaborator

jsitarek commented Feb 7, 2024

I like the second solution. The only problem is that once we do such a change it will not be backward compatible, and the old files will not be readable with the new code. But since we still did not produce any major production with ctapipe0.19-compatible branch I think it is fine.

@Elisa-Visentin
Copy link
Collaborator

We can keep backward compatibility if we read the dictionary with the IDs only if it has been written to the file (e.g., an if clause on the MCP version or a try-except)

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

No branches or pull requests

3 participants