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

Included function for gain selection and spectral weighting #75

Merged
merged 10 commits into from
Feb 20, 2019
Merged

Included function for gain selection and spectral weighting #75

merged 10 commits into from
Feb 20, 2019

Conversation

misabelber
Copy link
Collaborator

Hello!
I have done some implementations based on the latests notebooks we've been working on:

  • I've included a function in the calib module to do the gain selection after calibration. It's the same I showed in the step_by_step_dl0_to_dl1 notebook, it looks for waveform samples that go over a thresholds and for those pixels, it changes to low gain charge values.
    I've included this selection in the r0_to_dl1() function from dl0_to_dl1 moduel, so the selection it's done right before calculating the hillas and timing parameters.
    About this: I've searched in ctapipe for a function that does the gain selection, and in fact it exist (ctapipe/ctapipe/calib/camera/gainselection.py, there's a class named "GainSelector") and basically does the same thing but it reads the thresholds depending on each camera type from a file which is inside ctapipe-extra. The problem is I think the number for the LST cam is wrong (it says 100, but it should be using the number of counts (4095), not photoelectrons) and I couldn't manage to make it work, even editing the file myself.

  • I've included an option in dl0_to_dl1 module to chose between the standard calibration (CameraCalibrator from ctapipe) and our custom calibration. Probably using the standard is the best option.

  • Included functions in dl0_to_dl1 module to calculate the spectral weight of an event.

@misabelber
Copy link
Collaborator Author

I've managed to make work the GainSelector class of ctapipe. Still, it is necessary to manually set the threshold for the LSTCam to 4094, because the one in the default file is wrong (100). I will open an issue in ctapipe to comment this.

@rlopezcoto
Copy link
Contributor

For this PR, I would prefer to wait a little bit to see what is the answer about this Issue:
cta-observatory/ctapipe#962
is that ok, @misabelber?

@misabelber
Copy link
Collaborator Author

Actually I think it can be merged so the new functions are already in the code, because I think any answer to the issue would barely affect one line of the code (it has more to do with the tabulated thresholds stored in ctapipe-extra than with the usage of GainSelector) but it's up to you :)

lstchain/reco/dl0_to_dl1.py Show resolved Hide resolved
lstchain/calib/calib.py Outdated Show resolved Hide resolved
@rlopezcoto
Copy link
Contributor

sorry, I just realized I forgot to send these comments that I wrote last week...
Now there seem to be some conflicts, could you please work on the comments, solve the conflicts and I'll merge it (no need to wait for ctapipe issue to be solved...)

@misabelber
Copy link
Collaborator Author

Hi! I just answered the comments and solved conflicts (it was just because of the change of name from containers to lstcontainers module). Thank you!!

@rlopezcoto rlopezcoto merged commit 44b50b5 into cta-observatory:master Feb 20, 2019
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.

2 participants