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

WIP: Add gain selection to r1 calibration #683

Closed

Conversation

kosack
Copy link
Contributor

@kosack kosack commented Mar 17, 2018

I've attempted to make the data flow a bit more like what CTA is envisioning, where at the R1 level the gain-channel selection has already been performed. For that the following change were make:

Main changes

  • modified HESSIOR1Calibrator to include a GainSelector (threshold by default). I didn't know the correct gain-switch thresholds for most cameras, so put some dummy values in ctapipe-extra. Those will need to be updated by experts

  • Modified all ChargeExtractors to assume a single gain channel (this simplified them a lot), and changed the options called sig_amp_cut_LG and sig_amp_cut_HG to a single option called peak_detection_threshold (which I think is more understandable)

  • I changed the name of the cleaned Field in R1CameraContainer to be waveform as before (it now contains the gain-selected, cleaned, calibrated waveform)

  • added waveform_full and gain_channel mask to the R1Container, for times when both channels are still needed.

  • updated the tests to expect a single gain past R1

Things that do not work so far

  • This has broken the TargetIOR1CameraCalibrator , which still expects 2 gains (i didn't want to touch that since I'm not sure exactly how it works. This is probably the same for the SST1MR1CameraCalibrator, so I'll need some help with those.

  • same for the CHECMWaveFormCleaner - it breaks, since the input from the corresponding CameraCalibrator is still 2-channel.

@watsonjj
Copy link
Contributor

Something further may need to be considered for the integration_correction in dl1.py. The MC file may have a different reference pulse shape depending on the channel, and therefore a different integration correction is needed. In the current version of this PR, you simply choose the first channel's integration correction.

@kosack kosack added this to the v0.7 milestone Jun 21, 2018
@kosack
Copy link
Contributor Author

kosack commented May 6, 2019

closed this since the calib refactoring will replace it

@kosack kosack deleted the add_gain_selection_to_r1cal branch August 21, 2019 11:06
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.

4 participants