Skip to content

Commit

Permalink
changes: (1) added qWait to synchronize_files
Browse files Browse the repository at this point in the history
  • Loading branch information
bartulem committed Jul 25, 2023
1 parent fcc8d40 commit 2ca6c95
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# usv-playpen v0.2.10
# usv-playpen v0.2.11

<br>
<div align="center">
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='usv-playpen',
version='0.2.10',
version='0.2.11',
author='@bartulem',
author_email='mimica.bartul@gmail.com',
classifiers=[
Expand Down
8 changes: 4 additions & 4 deletions src/synchronize_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(2) find audio and video sync trains and check whether they match.
"""

from PyQt6.QtTest import QTest
import glob
import json
import os
Expand All @@ -13,7 +14,6 @@
from datetime import datetime
from imgstore import new_for_filename
from numba import njit
from behavioral_experiments import _loop_time
from file_loader import DataLoader
from file_writer import DataWriter
from random_pulses import generate_truly_random_seed
Expand Down Expand Up @@ -294,7 +294,7 @@ def find_video_sync_trains(self, total_frame_number):
"""

self.message_output(f"A/V synchronization started at: {datetime.now().hour:02d}:{datetime.now().minute:02d}.{datetime.now().second:02d}")
_loop_time(1000)
QTest.qWait(1000)

sync_sequence_dict = {}
ipi_start_frames = 0
Expand Down Expand Up @@ -474,7 +474,7 @@ def find_audio_sync_trains(self):
audio_devices_start_sample_differences = 0
for af_idx, audio_file in enumerate(wave_data_dict.keys()):
self.message_output(f"Working on sync data in audio file: {audio_file[:-4]}")
_loop_time(2000)
QTest.qWait(2000)
# correct the sync LED jitters - when LED is recorded as being ON although it ia actually off
wave_data_dict[audio_file]['wav_data'] = self.correct_loose_ttl_samples(raw_data=wave_data_dict[audio_file]['wav_data'],
ch_num=self.input_parameter_dict['find_audio_sync_trains']['ch_receiving_input'],
Expand Down Expand Up @@ -559,7 +559,7 @@ def crop_wav_files_to_video(self):
"""

self.message_output(f"Cropping WAV files started at: {datetime.now().hour:02d}:{datetime.now().minute:02d}.{datetime.now().second:02d}")
_loop_time(1000)
QTest.qWait(1000)

# dictionary to store the number of frames in each video
camera_frame_count_dict = {}
Expand Down
2 changes: 1 addition & 1 deletion src/usv_playpen_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
my_app_id = 'mycompany.myproduct.subproduct.version'
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(my_app_id)

app_name = 'USV Playpen v0.2.10'
app_name = 'USV Playpen v0.2.11'
experimenter_id = 'bartulem'
email_list_global = ''
config_dir_global = 'C:\\experiment_running_docs'
Expand Down

0 comments on commit 2ca6c95

Please sign in to comment.