-
Notifications
You must be signed in to change notification settings - Fork 4
Adding second stimulus #1276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Adding second stimulus #1276
Conversation
Great! Thanks @XX-Yin
I will take care of this too. |
Here's the refactored version (#1286). I have also refactored the workflow to make it easier to read and maintain in the future should you require. In general I advise abstracting the functionality as much as possible from the hardware (e.g. Coding the tones via subjects, and converting the logic into hardware instructions., i.e. HarpMessages, as late as possible). This makes code more readable for anyone trying to maintain it but also easier to refactor in the future should you need to use something else to deliver a tone. If you find bugs or have questions, lmk! |
@bruno-f-cruz Thank you! This looks great! @hagikent and @rachelstephlee will test your updates. I think you're likely right that "SelectMany would not close", but during testing, I didn't observe more and more messages. Could you show me sometime? I'm really curious about this. |
thank you everyone for getting this done so fast! our meeting on thursday will end early if we dont' need to do much (i hate long meetings). see you in a few days! |
In preparation for Thursday, Kenta and I will try to figure out the starting parameters we will want to use for this set up. Please let us know if there's anything else we can prepare ahead of time for our Thursday meeting so we can have a quick and efficient meeting. So far, the parameters we will need to provide are:
|
@XX-Yin We can discuss this tomorrow, thanks! |
@hagikent The distribution is generated on the GUI side. |
thanks for the clarification @XX-Yin ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment on dist selection.
Also make the default parameters for the second delay/reward delay more realistic!
(credit assignment won't work with ~8s reward delay!)
@@ -392,16 +395,23 @@ def _generate_next_trial_other_paras(self): | |||
# get the ITI time and delay time | |||
if self.TP_Randomness=='Exponential': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make distributions independently controlable.
-ITI needs to be exp so that it gives near-flat hazard.
-@rachelstephlee prefers normal dist for CS/Reward delays
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I no longer prefer normal distributon-- @alexpiet made a good point it doesn't have to be normal, exponential OK also. it shouldn't matter too much.... hopefully this is a small change we can change as we test how the mice responds. The rest would be guess-work and depend on how well model-fitting works after the fact.
ah, @XX-Yin are you directly modifying this branch? I'm ok if the former is easier for you! Just for clarification. |
I think we can go with the current branch without merging Bruno's branch. |
Ok, sounds good. @XX-Yin |
@hagikent |
@hagikent @rachelstephlee I added the independent randomness control to the second stimulus and the reward delay. I also described the updates required for the downstream pipeline in the pull request comment. |
Thank you so much Xinxin! |
I already did dry run at 428 3-weeks ago, and the new CS+/- function works. So, from my side, it's ok to merge. @rachelstephlee |
We should update the nwb transfer script to accommodate the new version (while keeping it compatible with old versions) before merging this to main. Otherwise it may immediately break all downstream pipelines and AutoTrain. We should finish these steps:
|
Yes absolutely. Thank you for reminding us of these important TODO’s. We definitely don’t want to break things downstream for other folks.
Given that @ahad is in the middle of consolidating the behavior -> nwb script, it means we may want to wait until he finishes that before we merge altogether. That way, we won’t have to do a separate fix for Ephys, and just need to update one script.
From: Hou, Han ***@***.***>
Date: Monday, January 27, 2025 at 8:38 AM
To: AllenNeuralDynamics/dynamic-foraging-task ***@***.***>
Cc: Rachel Lee ***@***.***>, Mention ***@***.***>
Subject: Re: [AllenNeuralDynamics/dynamic-foraging-task] Adding second stimulus (PR #1276)
We should update the nwb transfer script to accommodate the new version (while keeping it compatible with old versions) before merging this to main. Otherwise it may immediately break all downstream pipelines and AutoTrain. We should finish these steps:
* Nwb conversion
(Given that the effort to centralize nwb conversion is still in progress, I'm listing all three places here)
* @hagikent<https://github.com/hagikent> could you share a sample behavior json from your test run here? @XX-Yin<https://github.com/XX-Yin> could you use it to update the nwb transfer script? I can help you test it.
* @Ahad-Allen<https://github.com/Ahad-Allen> please make sure to update the nwb transfer script on your end.
* @ZhixiaoSu<https://github.com/ZhixiaoSu> please make sure to update the nwb conversion in your ephys pipeline, if necessary
* AutoTrain
* @hanhou<https://github.com/hanhou> will make sure it doesn't break our current AutoTrain system
* @micahwoodard<https://github.com/micahwoodard> please update these new parameters in your new task schema
—
Reply to this email directly, view it on GitHub<#1276 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADSAQJ6EBIVWTMAZQNMJXAD2MZOJVAVCNFSM6AAAAABUTSALP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJWGMYTKMJTGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Pull Request instructions:
Describe changes:
What issues or discussions does this update address?
#1263 (comment)
Describe the expected change in behavior from the perspective of the experimenter
This update aligns with our current pipeline, but a few adjustments are necessary:
Adding the following variables to the NWB file:
Deleting the following variables to the NWB file:
Adding the following variables to the curriculum
Deleting the following variables from the curriculum
Uploading waveform to index 5 and 6 of the soundcard to use the second stimulus.
Describe any manual update steps for task computers
Was this update tested in 446/447?
This PR is a prototype for adding a second stimulus, and it will be handled over to @rachelstephlee @hagikent for full testing, updates and modifications. @alexpiet @hanhou @bruno-f-cruz @micahwoodard for sanity check.