diff --git a/straxen/plugins/events_nv/event_waveform_nv.py b/straxen/plugins/events_nv/event_waveform_nv.py index 77a9ac753..736a27177 100644 --- a/straxen/plugins/events_nv/event_waveform_nv.py +++ b/straxen/plugins/events_nv/event_waveform_nv.py @@ -44,15 +44,13 @@ def setup(self): self.to_pe[self.channel_range[0] :] = to_pe[:] def compute(self, events_nv, records_nv, start, end): - events = events_nv - events_waveform = np.zeros(len(events), self.dtype) + events_waveform = np.zeros(len(events_nv), self.dtype) # Compute shape like properties: _tmp_events = np.zeros(len(events_nv), dtype=_temp_event_data_type()) strax.copy_to_buffer(events_nv, _tmp_events, "_temp_nv_evts_wf_cpy") _tmp_events["length"] = (events_nv["endtime"] - events_nv["time"]) // 2 _tmp_events["dt"] = 2 - print(records_nv) strax.simple_summed_waveform(records_nv, _tmp_events, self.to_pe) strax.compute_widths(_tmp_events) @@ -79,11 +77,7 @@ def veto_event_waveform_dtype( return dtype -def _temp_event_data_type( - n_samples_wf: int = 150, - n_pmts: int = 120, - n_widths: int = 11, -) -> list: +def _temp_event_data_type(n_samples_wf: int = 150, n_widths: int = 11) -> list: """Temp. data type which adds field required to use some of the functions used to compute the shape of @@ -101,6 +95,11 @@ def _temp_event_data_type( np.float32, n_samples_wf, ), + ( + ("Dummy first waveform data in PE/sample (not PE/ns!)", "data_start"), + np.float32, + n_samples_wf, + ), (("Peak widths in range of central area fraction [ns]", "width"), np.float32, n_widths), ( ("Peak widths: time between nth and 5th area decile [ns]", "area_decile_from_midpoint"),