精度評価実験の分析を複数被験者対応

This commit is contained in:
agomizi1cm committed 2026-10-14 19:06:18 +09:00
1 parent 9d2531a283
commit 47208b65ce
6 files changed
+1226 -46

No files matched your search

+17 -4
View File
@@ -44,6 +44,11 @@ INTERVAL_AUDIO = {
"block": Path("assets/audio/block.wav"),
"auto": Path("assets/audio/auto_interval.wav"),
}
TRIAL_AUDIO = {
"trial_start": Path("assets/audio/1.wav"),
"turn": Path("assets/audio/2.wav"),
"trial_end": Path("assets/audio/3.wav"),
}
# Angle announcement is composed from separate sign and number WAV files.
# Prepare these files under assets/audio/ using exactly these names.
ANGLE_SIGN_AUDIO = {
@@ -184,6 +189,14 @@ class IntervalAudioPlayer:
self._sounds[kind] = mixer.Sound(str(path))
except Exception as exc:
LOGGER.error("Failed to load interval audio %s: %s", path, exc)
for kind, path in TRIAL_AUDIO.items():
if not path.is_file():
LOGGER.warning("Trial audio file does not exist: %s", path)
continue
try:
self._sounds[kind] = mixer.Sound(str(path))
except Exception as exc:
LOGGER.error("Failed to load trial audio %s: %s", path, exc)
for sign, path in ANGLE_SIGN_AUDIO.items():
if not path.is_file():
LOGGER.warning("Angle sign audio file does not exist (%s): %s", sign, path)
@@ -347,7 +360,7 @@ class SessionRunner:
continue
if first_trial_move_pending:
self.interval_audio.play("block")
self._countdown(20.0, label="initial move")
self._countdown(10.0, label="initial move")
first_trial_move_pending = False
elif block_change and self.block_interval > 0:
self.interval_audio.play("block")
@@ -374,17 +387,17 @@ class SessionRunner:
def _execute(self, row: PlanRow) -> tuple[str, str, str]:
t_base = self.clock()
self.beep("start")
self.interval_audio.play("trial_start")
self.out(f" baseline {self.baseline_sec:g} s: face the camera and stay still")
self.sleep(self.baseline_sec)
t_cue = self.clock()
self.beep("turn")
self.interval_audio.play("turn")
self.out(f" TURN to {_sign(row.true_yaw_deg)} deg (head only) — you have {self.turn_grace_sec:g} s to turn")
self.sleep(self.turn_grace_sec)
self.out(f" HOLD {self.hold_sec:g} s")
self.sleep(self.hold_sec)
t_end = self.clock()
self.beep("end")
#self.interval_audio.play("trial_end")
self.out(" return to the front")
return t_base, t_cue, t_end