Skip to content

Conversation

arpit99ag
Copy link
Collaborator

@arpit99ag arpit99ag commented Mar 31, 2025

Description

Merge Request: Introduce Arpit_CentrePokeTraining Protocol

This merge request introduces a new protocol, Arpit_CentrePokeTraining, designed to automate the training of rats to perform centre pokes. This protocol is based on the existing SoundCatContinuous protocol but incorporates several significant modifications and improvements.

Key Changes and Features:

  • New Automated Training Protocol:

    • Introduces Arpit_CentrePokeTraining for centre poke training.
    • Features automated, multi-step training stages.
    • Utilizes sessionmodel2 instead of the previous sessionmodel.
  • Configurable Training Stages:

    • Training steps, stage progression logic, and completion criteria are defined within SessionDefinition.
    • These settings can be modified directly in SessionDefinition or configured via a .mat file: Arpit_CentrePokeTraining_SessionDefinition_AutoTrainingStages.m.
    • Important: If using the .m file, remember to load it before making changes and save it afterward for the changes to take effect.
  • Flexible Stimulus Presentation:

    • Includes an option (configurable after Stage 5) to use either fixed or variable sound/stimuli distributions during centre poke training.
    • Randomizes pre-stimulus time, stimulus duration, and pre-go signal time to prevent rats from learning based on timing cues alone.
  • Updated State Machine Logic:

    • The system now checks the poke state before the designated "legal poke" period begins (i.e., before the settling time ends).
    • It also checks the poke state after the legal poke period ends.
    • Rats are no longer required to maintain the centre poke until the Go cue ends; they can withdraw anytime after the Go cue starts.
  • Time-Limited Reward Collection:

    • A time limit is imposed for collecting the reward from the side port after delivery. Failure to collect within this window is recorded as a violation.
  • New Panel To Change Training Params::

    • A dedicated panel has been added to the UI.
    • This allows users to adjust training parameters during a session for different stages.
    • It also includes functionality to test for stage completion criteria.
  • Improved Performance Tracking:

    • This section now includes additional metrics such as violation rate, timeout rate, and the number of sessions completed per stage and per day.
  • Enhanced Stimuli Configuration (Work in Progress):

    • The stimuli configuration section has been significantly remodelled to offer more parameters, including control over distribution and range.
    • Note: This section is still under development and will receive further updates.

This new protocol aims to provide a more robust and flexible framework for automated centre poke training.

Additionally, edited the m file in Plugin>sessionmodel2>CreateHelperVars as there was a conflict with same name for a variable and a function and therefore changed the name of the variable.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Breaking change
  • Other (please specify):

Checklist

  • I have tested the changes locally.
  • I have updated the documentation accordingly.
  • I have added necessary tests to cover the changes.
  • I have followed the code style guidelines.
  • I have verified that the code works in all target environments.

Related Issues

Closes # (issue number)

viktorpm and others added 30 commits October 29, 2024 12:00
replace specific rig ID with NaN
- Adjust figure position to center on screen
- Make figure visible by default
- Update position calculations
Clarifying excluded directories and files
- Replace deprecated JavaFrame usage with WindowStyle property
- Remove commented-out legacy code
- Improve compatibility with future MATLAB releases
- reposition ToggleParam for stimulus visibility to make it visible in
  the GUI
- Simplify axis labels and font sizes for consistency
* Copy plots to new figure in StimulusSection.m

- Add copyobj calls to duplicate axes and plots
- Enhance responsiveness by copying plot objects
- Improve GUI management with copied elements
- Note: This is a hacky workaround since plots don't display correctly on the original figure
- Optimize figure positioning and sizing
- Update axis labels and tick marks

* Improve figure positioning and sizing

- Center PokesPlotSection figure while maintaining original aspect ratio
- Center AthenaDelayComp protocol figure on screen while preserving original size
- Use dynamic positioning based on screen size for better cross-platform compatibility

* clearing axes, creating axes in loop

* Refactor StimulusSection plotting of pairs

- Implement new axes (ax2 and axperf2) for pairs performance
- Copy of ax and axperf axes content to ax2 and axperf2
* updating AthenaDelayComp with opto settings

* adding SoundCatContinuous protocol from rig 31
removing irrelevant windows 7 instructions
* modernize StateMachineAssembler

- Replace hardcoded input mappings with dynamic configuration
- Add support for variable number of input lines
- Implement input validation and error handling
- Update state matrix dimensions to accommodate flexible input count

* add fifth sound channel support

- Add new sound parameters (A5_sigma)
- Implement SoundManagerSection integration for fifth sound
- Add Toggle parameter for fifth sound channel
- Add corresponding callback function implementation

* improve GUI layout and code structure

* Refactor GUI initialization logic for better organization
* Implement dynamic GUI sizing based on monitor dimensions
* Standardize indentation and spacing throughout the file
* improving code structure

* GUI aesthetic tweeks
* djust sigma values in SoundCalibration.m

- Updated A1_sigma to 0.007.
- Modified A2_sigma to use geometric mean of 0.05 and 0.007.
- Set A3_sigma, A4_sigma, and A5_sigma to 0.05.
- Retained previous values as comments for reference.

* Update calibration values

max, min, mean and middle between mean&max and mean&min

---------

Co-authored-by: ledapent <[email protected]>
Co-authored-by: Leda Pentousi <[email protected]>
…ted training stages, renamed overall performance section to sessionperformance with some added data to be tracked over sessions and among others
@viktorpm viktorpm force-pushed the 2_step_soundcat_arpit branch from 8afe54a to bc9d19b Compare August 11, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants