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
z coordinate update #535
z coordinate update #535
Conversation
strax.Option( | ||
name='electron_drift_time_gate', | ||
help='Electron drift time from the gate in ns', | ||
default=("electron_drift_time_gate", "ONLINE", True) |
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.
[pep8] reported by reviewdog 🐶
C812 missing trailing comma
@@ -375,6 +382,7 @@ def setup(self): | |||
|
|||
is_CMT = isinstance(self.config['fdc_map'], tuple) | |||
self.electron_drift_velocity = get_correction_from_cmt(self.run_id, self.config['electron_drift_velocity']) | |||
self.electron_drift_time_gate = get_correction_from_cmt(self.run_id, self.config['electron_drift_time_gate']) |
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.
[pep8] reported by reviewdog 🐶
E501 line too long (117 > 100 characters)
@@ -395,7 +403,7 @@ def compute(self, events): | |||
result = {'time': events['time'], | |||
'endtime': strax.endtime(events)} | |||
|
|||
z_obs = - self.electron_drift_velocity * events['drift_time'] | |||
z_obs = - self.electron_drift_velocity * (events['drift_time'] - self.electron_drift_time_gate) |
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.
[pep8] reported by reviewdog 🐶
E501 line too long (103 > 100 characters)
@@ -420,7 +431,9 @@ def compute(self, events): | |||
'r_field_distortion_correction': delta_r, | |||
'theta': np.arctan2(orig_pos[:, 1], orig_pos[:, 0]), | |||
'z_naive': z_obs, | |||
'z': z_cor}) | |||
'z': z_obs, | |||
'z_field_distortion_correction': delta_z |
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.
[pep8] reported by reviewdog 🐶
C815 missing trailing comma in Python 3.5+
We need to change the description for the z variable. Otherwise it looks good :) |
Hi @jingqiangye , thanks!
|
Thanks for the explanation and suggestion! I added the placeholder for |
@@ -272,6 +272,7 @@ def xenonnt_simulation(output_folder='./strax_data'): | |||
electron_drift_velocity=("electron_drift_velocity_constant", 1.3325e-4, False), | |||
event_info_function='disabled', | |||
max_drift_length=96.9, | |||
electron_drift_time_gate=("electron_drift_time_gate_constant", 1700), |
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.
@jingqiangye do you happen to know the correct value for 1T?
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.
Yeah I think it is the electron_drift_time_gate_constant
for 1T, see Tab. 1. Is that your question? I feel like you are asking smth else... :)
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.
@jingqiangye @jorana looks good. Can we merge this guy?
@ershockley Yeah I think so |
Looks good 😄 |
What does the code in this PR do / what does it improve?
electron_drift_time_gate
into account when calculatingz_naive
Can you briefly describe how it works?
Can you give a minimal working example (or illustrate with a figure)?
A test is done in
https://xenonnt.slack.com/archives/C020GRDUNN8/p1622855301162000. Not sure why it fails automatic checks. Is it related to the Travis shutdown?
Please include the following if applicable: