Skip to content

Commit

Permalink
Merge pull request #530 from int-brain-lab/hotfix/8.11.3
Browse files Browse the repository at this point in the history
bugfix: 0 contrasts argument overwritten for trainingCW
  • Loading branch information
bimac authored Oct 20, 2023
2 parents 630d3c4 + 0d0fddd commit 6cac080
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/source/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Developer Guide
===============

Release Checklist
=================

1) update CHANGELOG.md including changes from the last tag
2) Pull request to ``iblrigv8dev``
3) Check CI and eventually wet lab test
4) Pull request to ``iblrigv8``
5) Merge PR
6) git tag the release in accordance to the version number below (after merge!)

Versioning Scheme
=================

Expand Down
2 changes: 1 addition & 1 deletion iblrig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 3) Check CI and eventually wet lab test
# 4) Pull request to iblrigv8
# 5) git tag the release in accordance to the version number below (after merge!)
__version__ = '8.11.2'
__version__ = '8.11.3'

# The following method call will try to get post-release information (i.e. the number of commits since the last tagged
# release corresponding to the one above), plus information about the state of the local repository (dirty/broken)
Expand Down
3 changes: 2 additions & 1 deletion iblrig/base_choice_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ def reward_amount(self):
return self.task_params.REWARD_AMOUNT_UL

def draw_next_trial_info(self, pleft=0.5, contrast=None, position=None):
contrast = contrast or misc.draw_contrast(self.task_params.CONTRAST_SET, self.task_params.CONTRAST_SET_PROBABILITY_TYPE)
if contrast is None:
contrast = misc.draw_contrast(self.task_params.CONTRAST_SET, self.task_params.CONTRAST_SET_PROBABILITY_TYPE)
assert len(self.task_params.STIM_POSITIONS) == 2, "Only two positions are supported"
position = position or int(np.random.choice(self.task_params.STIM_POSITIONS, p=[pleft, 1 - pleft]))
quiescent_period = self.task_params.QUIESCENT_PERIOD + misc.texp(factor=0.35, min_=0.2, max_=0.5)
Expand Down
2 changes: 2 additions & 0 deletions iblrig/test/tasks/test_training_choice_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def test_task(self):
if i == 245:
task.show_trial_log()
assert not np.isnan(task.reward_time)
if training_phase == 5:
assert np.sum(task.trials_table['contrast'] == 0.5) == 0

def test_acquisition_description(self):
ad = self.task.experiment_description
Expand Down

0 comments on commit 6cac080

Please sign in to comment.