Skip to content

Commit 6ab152c

Browse files
Update added wherein Cam1 is not treated as epoc Ts
1 parent dc291f4 commit 6ab152c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

GuPPy/preprocess.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,21 @@ def applyCorrection(filepath, timeForLightsTurnOn, event, displayName, naming):
396396
res = (arr>=timeRecStart).all()
397397
if res==True:
398398
arr = np.subtract(arr, timeRecStart)
399-
arr = np.subtract(arr, timeForLightsTurnOn)
399+
if "cam1" in event.lower():
400+
arr = arr[np.where(arr>=timeForLightsTurnOn)[0]]
401+
else:
402+
arr = np.subtract(arr, timeForLightsTurnOn)
400403
else:
401-
arr = np.subtract(arr, timeForLightsTurnOn)
404+
if "cam1" in event.lower():
405+
arr = arr[np.where(arr>=timeForLightsTurnOn)[0]]
406+
else:
407+
arr = np.subtract(arr, timeForLightsTurnOn)
402408
else:
403-
arr = np.subtract(arr, timeForLightsTurnOn)
409+
if "cam1" in event.lower():
410+
arr = arr[np.where(arr>=timeForLightsTurnOn)[0]]
411+
else:
412+
arr = np.subtract(arr, timeForLightsTurnOn)
413+
404414
write_hdf5(arr, displayName+'_'+naming, filepath, 'ts')
405415

406416
#if isosbestic_control==False and 'control' in displayName.lower():

0 commit comments

Comments
 (0)