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 support for calibration scale and shift in R1 #1749

Merged
merged 9 commits into from
Jul 5, 2021

Conversation

HealthyPear
Copy link
Member

@HealthyPear HealthyPear commented Jun 4, 2021

This PR adds the possibility to both scale and shift the R1 waveform samples in photoelectrons from SimtelEventSource.

The scale factor (called calib_scale in simtel and == 0.92 in both HESS and CTAMARS analyses - possibly depends on prod also) is on top of the already present DC_to_PHE factor, which is now explicit.
This is also reported in #1744 .
@moralejo could you check if this corresponds to what you apply in your analysis?

The shift can be useful for simulating a mis-calibration (for example to see how far calibration can drift before we need new IRFs)

@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #1749 (1adccb3) into master (9fb2901) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1749      +/-   ##
==========================================
- Coverage   91.62%   91.50%   -0.12%     
==========================================
  Files         185      185              
  Lines       14382    14400      +18     
==========================================
  Hits        13177    13177              
- Misses       1205     1223      +18     
Impacted Files Coverage Δ
ctapipe/io/simteleventsource.py 94.80% <100.00%> (+0.06%) ⬆️
ctapipe/io/tests/test_simteleventsource.py 100.00% <100.00%> (ø)
ctapipe/tools/camdemo.py 55.68% <0.00%> (-20.46%) ⬇️

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 9fb2901...1adccb3. Read the comment docs.

@kosack kosack merged commit d1cae6a into cta-observatory:master Jul 5, 2021
@HealthyPear HealthyPear deleted the feature-add_calibscale branch July 5, 2021 12:59
nbiederbeck pushed a commit to nbiederbeck/ctapipe that referenced this pull request Aug 3, 2021
* Add calib_scale as a traitlet to SimtelEventSource and use it in R0->R1

* Add unit-test

* Remove unused CameraCalibrator

* fix test assertion

* Improve docstring

* Add suport for calibration shift in SimtelEventSource

* Extend unit-test to test also calibration shift

* simplify unit-tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants