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

IT container semi-automatic scripts #170

Closed
wants to merge 63 commits into from
Closed

Conversation

ranieremenezes
Copy link
Collaborator

Scripts that automatize the analysis in the 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."
Copy link
Collaborator

@aleberti aleberti Nov 4, 2023

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?

Copy link
Collaborator

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)

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add error message

@aleberti
Copy link
Collaborator

aleberti commented Nov 5, 2023

@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.

@Elisa-Visentin
Copy link
Collaborator

Elisa-Visentin commented Nov 5, 2023

I'm just fixing them! Thank you! (Done for the MC folder, ASAP for the NSB folder)

@Elisa-Visentin
Copy link
Collaborator

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

@aleberti aleberti mentioned this pull request Nov 13, 2023
@Elisa-Visentin Elisa-Visentin marked this pull request as draft March 25, 2024 10:33
@Elisa-Visentin Elisa-Visentin deleted the Torino_IT_Container branch August 14, 2024 09:05
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

Successfully merging this pull request may close these issues.

3 participants