Added z coordinates to hits dictionary.#2
Open
RomanMBerner wants to merge 4 commits intolarpix:masterfrom
Open
Added z coordinates to hits dictionary.#2RomanMBerner wants to merge 4 commits intolarpix:masterfrom
RomanMBerner wants to merge 4 commits intolarpix:masterfrom
Conversation
peter-madigan
requested changes
Dec 9, 2020
| if len(event) and len(trigs): | ||
| events_dict['ts_start'] = np.array([min(event[0]['timestamp'],trigs[0]['ts'])]) | ||
| events_dict['ts_end'] = np.array([min(event[-1]['timestamp'],trigs[-1]['ts'])]) | ||
| events_dict['ts_end'] = np.array([max(event[-1]['timestamp'],trigs[-1]['ts'])]) |
| ped = np.array([self.pedestal[unique_id]['pedestal_mv'] for unique_id in hit_uniqueid_str]) | ||
| hits_dict['px'] = xy[:,0] | ||
| hits_dict['py'] = xy[:,1] | ||
| VD = float(str(self.track_fitter.get_parameters('vd')).split(':')[1][:-1]) |
Member
There was a problem hiding this comment.
I'm hesitant to apply the drift velocity here, since it then makes it so that a drift velocity must always be required to run the evd script (even if you don't want to do the track reconstruction or the drift velocity is zero). It also is more complicated when you have an external trigger, since the z location should be relative to this timestamp. I figured that it was better to not implement the pz variable in the file and let the analysis do that. Something like this:
hit_ref = f['events'][0]['hit_ref']
ext_trig_ref = f['events'][0]['ext_trig_ref'] if f['events'][0]['n_ext_trigs'] > 0 else None
z_scale = f['tracks'].attrs['z_scale']
if ext_trig_ref is not None:
pz = (f['hits'][hit_ref]['ts'] - f['ext_trigs'][ext_trig_ref][0]['ts']) * z_scale
But... if you're willing to add some logic to this to check for
- are you using a track fitter? -> if not, don't fill pz
- are there external triggers in the event? -> if not, don't fill pz
and then do the timestamp relative to the external trigger then I will merge it in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.