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

Recover metadata in DL1 files #728

Merged
merged 4 commits into from
Sep 20, 2021
Merged

Recover metadata in DL1 files #728

merged 4 commits into from
Sep 20, 2021

Conversation

Bultako
Copy link
Collaborator

@Bultako Bultako commented Sep 10, 2021

This PR recovers metadata added to DL1 files during the initial r0_to_dl1 process, that were lost when applying lstchain_dl1ab.py script.

@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #728 (ffe16c1) into master (7819257) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #728   +/-   ##
=======================================
  Coverage   84.50%   84.50%           
=======================================
  Files          62       62           
  Lines        5074     5074           
=======================================
  Hits         4288     4288           
  Misses        786      786           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7819257...ffe16c1. Read the comment docs.

@moralejo moralejo merged commit 14deb0b into master Sep 20, 2021
@Bultako Bultako deleted the meta branch September 21, 2021 06:50
@moralejo
Copy link
Collaborator

Hi @Bultako, I was just trying lstchain_dl1ab.py on real data and there seems to be a problem. The output DL1 file is produced, but then the program gives these messages:

Metadata SOURCE_FILENAMES does not exist in file ../orig/dl1_LST-1.Run02975.0080.h5
Metadata LSTCHAIN_VERSION does not exist in file ../orig/dl1_LST-1.Run02975.0080.h5
Metadata CTAPIPE_VERSION does not exist in file ../orig/dl1_LST-1.Run02975.0080.h5
Metadata CONTACT does not exist in file ../orig/dl1_LST-1.Run02975.0080.h5

and never ends... It keeps "running" (doing nothing, the output file is not growing) until one kills it. Upon killing it, the output files are readable (could not check in detail of they are fully ok).

Given the messages about metadata I guess this may have something to do with the changes in this PR. Can you please have a look?

@moralejo
Copy link
Collaborator

The lstchain_dl1ab script works on MC, by the way, I only found this issue with real data.

@Bultako
Copy link
Collaborator Author

Bultako commented Sep 24, 2021

Hi @moralejo
It is indeed weird to have such never-ending process when running lstchain_dl1ab.py script. The warning messages are ok when the input file does not have these metadata, but this should not prevent you from ending the script correctly. if you are running lstchain in a local env you can always comment the two lines below in lstchain_dl1ab.py script and see if we can blame on the changes of this PR.

metadata = read_metadata(args.input_file)

write_metadata(metadata, args.output_file)

In the meantime, I will try to reproduce this issue with those input files.
I will let you know.

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.

4 participants