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

Add script for checking availability MAGIC _Y_ runs. #218

Merged
merged 14 commits into from
Jul 18, 2024

Conversation

joannaWojS
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@jsitarek jsitarek left a comment

Choose a reason for hiding this comment

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

thanks for the script.
I put some comments in the code

@jsitarek
Copy link
Collaborator

hi @joannaWojS just a reminder about this branch - it still has some comments to be implemented before merging

@joannaWojS
Copy link
Collaborator Author

hi @joannaWojS just a reminder about this branch - it still has some comments to be implemented before merging

Hi, thanks for the reminder. I'll do it tomorrow when I get back from a conference.

@aleberti
Copy link
Collaborator

One question: is this supposed to be also a standalone script? i.e. included in the console script? I think it should be better, but I am not sure about the original intention.

@Elisa-Visentin
Copy link
Collaborator

@aleberti I think it could be added to the other scripts for databases maintenance that we have in the auto_MCP PR. The ones already in the main PR can be used to produce the LST table, the one by Joanna to produce the MAGIC ones

@Elisa-Visentin
Copy link
Collaborator

Hi Joanna, I was running a test and I realized that, in 2021_03_17, there is a typo in the name of one of the sources in the database, switching X and S. Now I added a few lines to the list script, so that now only sources with the same name both in LST and in M1 and in M2 are added to the dat file of the sources to be processed (just to prevent crashes in case of typos or unmatching names), whereas the txt files are still produced according to the name of the sources in the respective database (so that we can try to find out errors by looking at the file names)

@joannaWojS
Copy link
Collaborator Author

One question: is this supposed to be also a standalone script? i.e. included in the console script? I think it should be better, but I am not sure about the original intention.

A few words of explanation about the script: Another script, list_from_h5.py, prints a list of LST and MAGIC runs for a date/source from the config file. The script uses two h5 files - one for MAGIC and another for LST data. The script check_MAGIC_runs displays data that are then used in the h5 file. Additionally, the scripts display missing files that are included in Federico's database. As Elisa mentioned, this should be added to the other scripts for databases.

@joannaWojS
Copy link
Collaborator Author

Hi Joanna, I was running a test and I realized that, in 2021_03_17, there is a typo in the name of one of the sources in the database, switching X and S. Now I added a few lines to the list script, so that now only sources with the same name both in LST and in M1 and in M2 are added to the dat file of the sources to be processed (just to prevent crashes in case of typos or unmatching names), whereas the txt files are still produced according to the name of the sources in the respective database (so that we can try to find out errors by looking at the file names)

You're right. However, in the file Common_MAGIC_LST1_data_MAGIC_RUNS_subruns (located in the same folder on the IT cluster), the source has the correct name. I think this file should be used in the scripts because it also contains additional information about the number of subruns.

@jsitarek
Copy link
Collaborator

I checked that all my previous comments are implemented.
lint and pyflakes still fail, but about different scripts, so I guess we can merge this PR

@Elisa-Visentin
Copy link
Collaborator

I just merged the 'base' branch here: this should fix the tests...

@jsitarek jsitarek merged commit e6cbfec into Torino_auto_MCP Jul 18, 2024
3 of 6 checks passed
@jsitarek jsitarek deleted the auto_MCP_script branch July 18, 2024 14:23
@aleberti aleberti added the new functionality For new functionalities label Aug 7, 2024
Elisa-Visentin pushed a commit that referenced this pull request Sep 12, 2024
Add script for checking availability MAGIC _Y_ runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new functionality For new functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants