diff --git a/amstrax/plugins/events/corrected_areas.py b/amstrax/plugins/events/corrected_areas.py index d4f5f9b8..4cd392f8 100644 --- a/amstrax/plugins/events/corrected_areas.py +++ b/amstrax/plugins/events/corrected_areas.py @@ -65,4 +65,4 @@ def compute(self, events): result[f"{peak_type}cs1"] = events[f"{peak_type}s1_area"] result[f"{peak_type}cs2"] = events[f"{peak_type}s2_area"]*np.exp(events["drift_time"]/elife) - return result \ No newline at end of file + return result diff --git a/amstrax/plugins/events/event_area_per_channel.py b/amstrax/plugins/events/event_area_per_channel.py index e94a2fe1..5cf51ae1 100644 --- a/amstrax/plugins/events/event_area_per_channel.py +++ b/amstrax/plugins/events/event_area_per_channel.py @@ -97,4 +97,4 @@ def compute(self, events, peaks): "event_area_per_channel": area_per_channel, "event_n_channel": n_channel, } - return result \ No newline at end of file + return result diff --git a/amstrax/plugins/events/event_basics.py b/amstrax/plugins/events/event_basics.py index 564e853e..c2ba2bcb 100644 --- a/amstrax/plugins/events/event_basics.py +++ b/amstrax/plugins/events/event_basics.py @@ -40,7 +40,7 @@ class EventBasics(strax.Plugin): alternative S2 is selected as the largest S2 other than main S2 in the time window [main S1 time, main S1 time + max drift time]. """ - __version__ = '1.4' + __version__ = '1.6' depends_on = ('events', 'peak_basics', @@ -163,7 +163,7 @@ def _set_posrec_save(self): self.pos_rec_labels.sort() self.posrec_save = [(xy + algo) - for xy in ['x_', 'y_', 'r_'] + for xy in ['x_', 'y_'] for algo in self.pos_rec_labels] def _get_posrec_dtypes(self): @@ -269,10 +269,10 @@ def fill_result_i(self, event, peaks): # peak_properties_to_save += ['max_diff', 'min_diff'] pass elif s_i == 2: - - # peak_properties_to_save += ['x', 'y'] - # peak_properties_to_save += self.posrec_save - pass + + algo = self.pos_rec_labels[0] + peak_properties_to_save += [f'x_{algo}', f'y_{algo}'] + peak_properties_to_save += self.posrec_save field_names = [f'{main_or_alt}{s_i}_{name}' for name in peak_properties_to_save] self.copy_largest_peaks_into_event(event, diff --git a/amstrax/plugins/events/event_positions.py b/amstrax/plugins/events/event_positions.py index 3f9081d4..d1935942 100644 --- a/amstrax/plugins/events/event_positions.py +++ b/amstrax/plugins/events/event_positions.py @@ -33,7 +33,7 @@ class EventPositions(strax.Plugin): depends_on = ('event_basics',) - __version__ = '0.3.0' + __version__ = '0.4.0' def infer_dtype(self): @@ -65,7 +65,7 @@ def compute(self, events): algo = self.default_reconstruction_algorithm for j in 'x y'.split(): - field = f's2_{j}' + field = f'{j}' result[j] = events[f's2_{j}_{algo}'] field = f'alt_s2_{j}' @@ -75,4 +75,4 @@ def compute(self, events): result['alt_s2_r'] = np.sqrt(result['alt_s2_x'] ** 2 + result['alt_s2_y'] ** 2) - return result \ No newline at end of file + return result diff --git a/amstrax/plugins/events/event_waveform.py b/amstrax/plugins/events/event_waveform.py index 0094ec46..cd4f7b08 100644 --- a/amstrax/plugins/events/event_waveform.py +++ b/amstrax/plugins/events/event_waveform.py @@ -66,4 +66,4 @@ def compute(self, events, peaks): result[f"{type_}_length"][event_i] = sp["length"][type_index] result[f"{type_}_data"][event_i] = sp["data"][type_index] result[f"{type_}_dt"][event_i] = sp["dt"][type_index] - return result \ No newline at end of file + return result