-
Notifications
You must be signed in to change notification settings - Fork 9
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
IT container semi-automatic scripts #170
Conversation
…ipts/placeholder.txt
…ory/magic-cta-pipe into Torino_IT_Container
date = run.split(",")[0] | ||
if len(LST_files) > 1: | ||
logger.info( | ||
f"run {run_number} classified in more than one NSB bin. Removing all these files and evaluating it again." |
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 am confused by the error message. How can it be that there are two files with the same run number? Files called like {source}_LST_nsb_{run_number}.txt
are created by this script only, containing, if I understand correctly, one nsb value (the median of the noise of the subruns). So, how it can be that there are more than one? Also, is the message classified in more than one NSB bin
correct?
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.
the message has to be changed. As for the message/if clause, we want to have only one single file per run (i.e., one NSB value): if, while writing the LST runs list, a run is duplicated (i.e., 5555 and 05555) or something strange is happening so that more than one file exists (i.e., files moved, copied, renamed...), they are all deleted. Analogous in the NSB matching version: a run for which more than one NSB value exists (no matter why) is re-evaluated to rule out every ambiguity. But we can discuss about this, maybe we are wrong (I am wrong)
magicctapipe/scripts/lst1_magic/IT_container_data_MC_bash_scripts/LSTnsb_MC.py
Outdated
Show resolved
Hide resolved
magicctapipe/scripts/lst1_magic/IT_container_data_MC_bash_scripts/LSTnsb_MC.py
Outdated
Show resolved
Hide resolved
magicctapipe/scripts/lst1_magic/IT_container_data_MC_bash_scripts/LSTnsb_MC.py
Outdated
Show resolved
Hide resolved
magicctapipe/scripts/lst1_magic/IT_container_data_MC_bash_scripts/setting_up_config_and_dir.py
Outdated
Show resolved
Hide resolved
magicctapipe/scripts/lst1_magic/IT_container_data_MC_bash_scripts/setting_up_config_and_dir.py
Outdated
Show resolved
Hide resolved
allfile = np.sort( | ||
glob.glob(f"{source}_LST_nsb_*.txt") | ||
) # List with the names of all files containing the NSB values for each run | ||
if len(allfile) == 0: |
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.
add error message
@Elisa-Visentin @ranieremenezes I saw you merged the latest changes of the master in this branch. As you can see, I added some validation of the documentation, because otherwise it would not be rendered correctly in the html version. I do not know which editor you are using. If you are using Visual Studio Code, I use this extension (https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring) to generate automatically snippets of the documentation following the required style. If you use SublimeText, there was one as well I was using in the past. If you use PyCharm I think there is an extension available for sure. Let me know if you need support in fixing the docs. |
I'm just fixing them! Thank you! (Done for the MC folder, ASAP for the NSB folder) |
magicctapipe/scripts/lst1_magic/IT_container_data_MC_bash_scripts/nsb_level_MC.py
Outdated
Show resolved
Hide resolved
We tried to merge the two folders (and script versions) into a single one (the cluster and the analysis type passed in the config file). As for using the MCP config.yaml instead of writing all the lines, we tried to implement it in the setting_up_config_and_dir script: let us know if this is ok and we will implement it in all the scripts. As for the DOC, we will fix them after we fix the scripts format |
Scripts that automatize the analysis in the IT Container.