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

Raise error in CameraReadout.from_name if no corresponding file can be found #1703

Merged
merged 2 commits into from
May 7, 2021

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented May 7, 2021

  • Raise error in CameraReadout.from_name if requested data is not available
  • Set readout to None in CameraDescription.from_name if that exception is raised.

@maxnoe maxnoe added this to the v0.11.0 milestone May 7, 2021
@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #1703 (1a7313a) into master (1053c6c) will decrease coverage by 0.01%.
The diff coverage is 38.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1703      +/-   ##
==========================================
- Coverage   90.70%   90.69%   -0.02%     
==========================================
  Files         183      183              
  Lines       14082    14084       +2     
==========================================
  Hits        12773    12773              
- Misses       1309     1311       +2     
Impacted Files Coverage Δ
ctapipe/instrument/camera/tests/test_readout.py 91.66% <0.00%> (-5.40%) ⬇️
ctapipe/instrument/camera/description.py 89.65% <50.00%> (-6.50%) ⬇️
ctapipe/instrument/camera/readout.py 90.62% <100.00%> (+5.11%) ⬆️

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 1053c6c...1a7313a. Read the comment docs.

reference_pulse_sample_width=u.Quantity(1, u.ns),
)
tabname = "{camera_name}{verstr}.camreadout".format(
camera_name=camera_name, verstr=verstr
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use f-string syntax?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't add/change this code, just removed a try except around. There is no real reason to remove format

ctapipe/instrument/camera/tests/test_readout.py Outdated Show resolved Hide resolved
@maxnoe maxnoe merged commit 4033541 into master May 7, 2021
@maxnoe maxnoe deleted the fix_1450 branch May 7, 2021 15:07
@maxnoe maxnoe linked an issue May 7, 2021 that may be closed by this pull request
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.

CameraReadout.from_file() should fail if no camerareadout exists
3 participants