diff --git a/ALL_IMAGES_FIX_NOTES.md b/ALL_IMAGES_FIX_NOTES.md new file mode 100644 index 0000000..1f4d30a --- /dev/null +++ b/ALL_IMAGES_FIX_NOTES.md @@ -0,0 +1,23 @@ +# All-images stimulus fix + +This patch addresses two independent failure modes: + +1. `CloseCycle` is a custom Bonsai extension, so a fresh checkout must build `Extensions.dll` + before running Bonsai. The repo ignores `bin`, `obj`, and `*.dll`, so these artifacts are not + present after a fresh `git clone`/checkout. + +2. The stimulus selection branch previously used: + + EnumerateFiles -> Variation(Count=8) -> LoadImages -> SelectedImages + + For an experiment intended to use all available images in `stimuli/images_A`, this branch should + not randomly select a subset before loading images. The workflow is changed to: + + EnumerateFiles -> LoadImages -> SelectedImages + + The downstream branch still randomizes presentation order: + + SelectedImages -> Permutation -> CloseCycle -> task sequence + +Run `build_extensions.cmd` after each fresh checkout, or run `run_detection_of_change.cmd`, which +builds the extension and then launches the workflow from the `src` folder. diff --git a/build_extensions.cmd b/build_extensions.cmd new file mode 100644 index 0000000..6a2623a --- /dev/null +++ b/build_extensions.cmd @@ -0,0 +1,18 @@ +@echo off +setlocal + +cd /d "%~dp0" + +echo Building Bonsai Extensions... +dotnet build "src\Extensions.csproj" -c Release +if errorlevel 1 ( + echo. + echo Build failed. Do not run the experiment until this succeeds. + exit /b 1 +) + +copy /Y "src\bin\Release\net472\Extensions.dll" "src\Extensions.dll" +copy /Y "src\bin\Release\net472\Extensions.dll" "bonsai\Extensions.dll" + +echo. +echo Extensions.dll built and copied successfully. diff --git a/run_detection_of_change.cmd b/run_detection_of_change.cmd new file mode 100644 index 0000000..0b80c33 --- /dev/null +++ b/run_detection_of_change.cmd @@ -0,0 +1,10 @@ +@echo off +setlocal + +cd /d "%~dp0" + +call build_extensions.cmd +if errorlevel 1 exit /b 1 + +cd /d "%~dp0src" +"..\bonsai\Bonsai.exe" "DetectionOfChange_with_template_and_mpe_comp.bonsai" diff --git a/src/DetectionOfChange_with_template_and_mpe_comp.bonsai b/src/DetectionOfChange_with_template_and_mpe_comp.bonsai index d331633..b539e0e 100644 --- a/src/DetectionOfChange_with_template_and_mpe_comp.bonsai +++ b/src/DetectionOfChange_with_template_and_mpe_comp.bonsai @@ -1,4 +1,4 @@ - + - - - +