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

Wrong initialisation values for gain selection and charge integration for data #252

Closed
FrancaCassol opened this issue Dec 17, 2019 · 8 comments

Comments

@FrancaCassol
Copy link
Collaborator

Hi,
looking at the dl0_dl1.py script, I see two issues concerning the initialisation values for data:

1- The threshold of the gain selection for data is hardcoded 4095, I am afraid that this means the LG is never selected (the thereshold value is checked with a "grater" not "equal or grater")

 if not is_simu:
                    combine_channels(event, telescope_id, 4095)

2- The charge integrator in the config file is NeighborPeakWindowSum, but the configuration in the code is hardcoded for the LocalPeakWindowSum

charge_config = Config({"LocalPeakWindowSum":{"window_shift": 5,"window_width":12}})

so this initialisation will never be used (by the way this window is good for flat field data, most probably too large for shower data)

I am in discussion with @rlopezcoto for integrating the new calibrator in the script (see #248). We will add there a solution to these problems, but we need to start also a reflection on how to improve the way we handle the initialisation values in the reconstruction scripts.

@vuillaut
Copy link
Member

Hi @FrancaCassol

I think you are right on both points.

Indeed for the gain selection, the value should be 4094 since it's only >.

@contrera
Copy link

Just a comment. Presently some times (a few) ADC values which we read from R0 are > 4096 because of the artificial baseline that is added in the DRS4 correction. Is that an issue? I do not know enough about the calibration to judge.

@moralejo
Copy link
Collaborator

moralejo commented Dec 19, 2019 via email

@FrancaCassol
Copy link
Collaborator Author

Hi @moralejo, @contrera ,

actually this is perhaps a good reason for using the R1 waveform as reference for the threshold (R1 is already baseline subtracted ) because otherwise we should put as threshold 3500 for the data and (3500-R0 offset) for the MC in order to set a comparable threshold value.

So, I would suggest to use R1 (before calibration) and to put as default 3500, what do you think?

@moralejo
Copy link
Collaborator

Hi @FrancaCassol, @contrera,

So, I would suggest to use R1 (before calibration) and to put as default 3500, what do you think?

the problem is that in data with pedestal baseline corrected by EVB we do not have those raw numbers. So in a way it cannot be properly done on data produced by EVB with "no gain selection" and "baseline correction".

On the other hand, I think it is currently not at all critical that the gain switch is not made exactly at the same point in data and MC.

@FrancaCassol
Copy link
Collaborator Author

Hi @moralejo

the problem is that in data with pedestal baseline corrected by EVB we do not have those raw numbers. So in a way it cannot be properly done on data produced by EVB with "no gain selection" and "baseline correction".

I am not sure to understand, in the EvB Julien can perform the gain selection on the baseline corrected r0 before adding the offset (isn't it?), and in lstchain the R1 corresponds to the baseline corrected R0 with offset subtraction, I part some other higher level correction the two waveforms are the same

On the other hand, I think it is currently not at all critical that the gain switch is not made exactly at the same point in data and MC.

Probably, but making things closer is always better ;-)

@moralejo
Copy link
Collaborator

the problem is that in data with pedestal baseline corrected by EVB we do not have those raw numbers. So in a way it cannot be properly done on data produced by EVB with "no gain selection" and "baseline correction".

I am not sure to understand, in the EvB Julien can perform the gain selection on the baseline corrected r0 before adding the offset (isn't it?),

Should not be the case. EVB has access to the raw values, so the gain selection should be done on the raw HG value. One might argue in favour of having the switch, for all channels, at the same calibrated charge, but that cannot be made at EVB. And in any case I do not think it is important at all, as long as HG and LG are well cross-calibrated.

To be clear, when I suggested 3500 I was referring to the values for which the baseline is at 400.

@rlopezcoto
Copy link
Contributor

Solved in #248

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

No branches or pull requests

5 participants