-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix muon scripts #232
Fix muon scripts #232
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick look and seems fine to me. Just x-check how you are using the image
array in the lstchain_data_muon_analysis.py
@@ -153,17 +153,17 @@ def main(): | |||
print("Event {}. Number of pixels above 10 phe: {}".format(event_id, | |||
np.size(image[0][image[0] > 10.]))) | |||
|
|||
if not tag_pix_thr(image): #default skipps pedestal and calibration events | |||
if not tag_pix_thr(image[0]): #default skipps pedestal and calibration events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this back to image[0]
while in the rest of the script you corrected to just image
?. In this script, does the image array still contain the two gains for each pixel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right @morcuended. I should apply here gain selection...
by the way, for the data that you are analyzing in LP, are you applying the proper threshold for the gain selection? According to #200, we do not have a proper threshold due to the ctapipe bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have the threshold set to 4094
, then it means that the threshold is not properly applied.
For the muon script, I do not think it is a good idea to have a duplicated calibration for the regular data analysis and muon data analysis, therefore I expect the script lstchain_data_muon_analysis.py
to be deprecated and run the analysis only on calibrated files. I'll mark this in a comment on the script as no-gain selection, but I'm not sure if it is worth it to solve it at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the warning I'm getting:
WARNING: AstropyDeprecationWarning: channel selection is now performed at <= R1 calibration level [lstchain.reco.dl0_to_dl1]
WARNING: AstropyDeprecationWarning: gain selection is now performed at <= R1 calibration level [lstchain.calib.camera.calib]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have the threshold set to
4094
, then it means that the threshold is not properly applied.For the muon script, I do not think it is a good idea to have a duplicated calibration for the regular data analysis and muon data analysis, therefore I expect the script
lstchain_data_muon_analysis.py
to be deprecated and run the analysis only on calibrated files. I'll mark this in a comment on the script as no-gain selection, but I'm not sure if it is worth it to solve it at the moment.
The config files I am using indicate:
"gain_selector": "ThresholdGainSelector",
"gain_selector_config": {
"threshold": 4094
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what threshold value should we use then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For MC yes.
The exact switching value is not so critical, around 20 should be ok,
enough to have already a clear LG signal, but could also be taken up to 50
or so safely, I think.
More important: the DL1 you were producing then had effectively only high
gain, correct?
…On Tue, 26 Nov 2019 at 13:11, Ruben Lopez-Coto ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In lstchain/scripts/lstchain_data_muon_analysis.py
<#232 (comment)>
:
> @@ -153,17 +153,17 @@ def main():
print("Event {}. Number of pixels above 10 phe: {}".format(event_id,
np.size(image[0][image[0] > 10.])))
- if not tag_pix_thr(image): #default skipps pedestal and calibration events
+ if not tag_pix_thr(image[0]): #default skipps pedestal and calibration events
then I think it will be affected... According to #200
<#200>, the threshold
should be 20.9
@vuillaut <https://github.com/vuillaut> can you confirm?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#232?email_source=notifications&email_token=ADMCCOXPE6I6SSWOWPYYFQDQVUG67A5CNFSM4JRQDCLKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCM7Y5XQ#discussion_r350703786>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADMCCOW5G52EOKL42AVZ5WTQVUG67ANCNFSM4JRQDCLA>
.
--
Abelardo Moralejo Olaizola
Institut de Física d'Altes Energies
Tel : +34 931641662
Fax: +34 935811938
Avís - Aviso - Legal Notice - (LOPD) - http://legal.ifae.es
--
Avís -
Aviso - Legal Notice - (LOPD) - http://legal.ifae.es
<http://legal.ifae.es/>
|
Yes, I think so. I did not realize this before. Thus, I should set the threshold to 20.9 and reprocess everything again, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go ahead with these scripts
Thanks! |
No description provided.