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

Require that the containers of pedestal, flatfield and cosmic parameters are arrays in the datacheck. Fixes #440 #442

Merged
merged 2 commits into from
Jul 3, 2020

Conversation

moralejo
Copy link
Collaborator

@moralejo moralejo commented Jul 2, 2020

Fixes #440, an exception thrown by lstchain_data_r0_to_dl1 when just one event of a given type (pedestal, flatfield or cosmic) is found in a file. We just require now a minimum of 2 events (instead of 1) - the problem was that something expected to be an array became a plain integer in case it had one single element. It was occurring only when a small number of events was processed (for test) from a raw file.

Note that this will make the script work, but the produced datacheck_dl1...h5 files may still give trouble if afterwards one tries to process them to produce the check plots. This is however irrelevant since data check is run for the full raw files.

Abelardo Moralejo Olaizola and others added 2 commits July 2, 2020 19:12
…estal,

flatfield or cosmics) required to process them in the DL1 check. Solves
an exception occurring when only one event was present.
@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #442 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #442   +/-   ##
=======================================
  Coverage   41.32%   41.32%           
=======================================
  Files          77       77           
  Lines        6371     6371           
=======================================
  Hits         2633     2633           
  Misses       3738     3738           
Impacted Files Coverage Δ
lstchain/datachecks/dl1_checker.py 6.74% <0.00%> (ø)

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 4679456...cba668e. Read the comment docs.

@rlopezcoto rlopezcoto changed the title Fixes #440 Require that the containers of pedestal, flatfield and cosmic parameters are arrays in the datacheck. Fixes #440 Jul 3, 2020
@rlopezcoto rlopezcoto merged commit cba0478 into cta-observatory:master Jul 3, 2020
@morcuended
Copy link
Member

Fixes #440, an exception thrown by lstchain_data_r0_to_dl1 when just one event of a given type (pedestal, flatfield or cosmic) is found in a file. We just require now a minimum of 2 events (instead of 1) - the problem was that something expected to be an array became a plain integer in case it had one single element. It was occurring only when a small number of events was processed (for test) from a raw file.

Note that this will make the script work, but the produced datacheck_dl1...h5 files may still give trouble if afterwards one tries to process them to produce the check plots. This is however irrelevant since data check is run for the full raw files.

Thanks @moralejo, understood.

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.

For pix in cog_pixid: TypeError: 'numpy.int64' object is not iterable
3 participants