From d6d007340d6e4a030c09125946341e9902fc3107 Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Thu, 4 May 2023 09:36:14 -0600 Subject: [PATCH] assign condition to make code readable --- sohstationviewer/model/handling_data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sohstationviewer/model/handling_data.py b/sohstationviewer/model/handling_data.py index d83766871..2092766e4 100644 --- a/sohstationviewer/model/handling_data.py +++ b/sohstationviewer/model/handling_data.py @@ -434,8 +434,9 @@ def combine_traces_except_gaps_overlaps( curr_gap_idx = 0 for idx, tr in enumerate(traces): try: - if (min(gaps[curr_gap_idx]) <= tr['startTmEpoch'] - <= max(gaps[curr_gap_idx]) and size != 0): + start_in_gap = (min(gaps[curr_gap_idx]) <= tr['startTmEpoch'] + <= max(gaps[curr_gap_idx])) + if start_in_gap and size != 0: new_tr = {'samplerate': tr['samplerate'], 'startTmEpoch': start_epoch, 'endTmEpoch': end_epoch, -- GitLab