klabhub / neurostim

Design and run visual neuroscience experiments using Matlab and the Psychophysics Toolbox.
MIT License
5 stars 3 forks source link

Handling of stimulus mccChannel [might be] broken #125

Closed cnuahs closed 5 years ago

cnuahs commented 5 years ago

Handling of the mccChannel property in the stimulus base class seems broken... or maybe I don't understand the intent.

@stimulus.baseBeforeExperiment appears to be trying to 'map' a digital input on an mcc channel to the stimulus's .on property...

a) the supplied 'when' parameter ('FIRSTFRAME') in the call to mcc.map() doesn't seem to satisfy any of the conditions recognised in the mcc plugin anyway (either 'AFTERFRAME' or 'AFTERTRIAL' as far as I can tell), so I cannot see how this works, and

b) is tying an input to the .on property really the intent? I don't see any utility in doing that.

Wouldn't it be more useful to set a digital output (given by o.mccChannel) HIGH when the stimulus is drawn and LOW when it is not... ? That could be used for timing, triggering external equipment etc.

bartkrekelberg commented 5 years ago

I think this property should be removed (presumably nobody is using it).

The functionality that it ones served is now avaiable by setting a onsetFunction or offsetFunction that can trigger arbitrary other commands in other plugins (e.g. setting a bit high in the mcc plugin).

The egiAvTester in the tools directory shows an example of this.

B


Bart Krekelberg, PhD

Professor, Rutgers University - Newark

Co-Director, Center for Molecular and Behavioral Neuroscience

Associate Director, Rutgers University Brain Imaging Center

197 University Avenue

Newark, NJ 07102

T: +1 551 285 9265

E: bart@rutgers.edu

W: vision.rutgers.edu

Skype: bartkrekelberg


From: Shaun Cloherty notifications@github.com Sent: Thursday, May 16, 2019 2:19 To: klabhub/neurostim-ptb Cc: Subscribed Subject: [klabhub/neurostim-ptb] Handling of stimulus mccChannel [might be] broken (#125)

Handling of the mccChannel property in the stimulus base class seems broken... or maybe I don't understand the intent.

@stimulus.baseBeforeExperiment appears to be trying to 'map' a digital input on an mcc channel to the stimulus's .on property...

a) the supplied 'when' parameter ('FIRSTFRAME') in the call to mcc.map() doesn't seem to satisfy any of the conditions recognised in the mcc plugin anyway (either 'AFTERFRAME' or 'AFTERTRIAL' as far as I can tell), so I cannot see how this works, and

b) is tying an input to the .on property really the intent? I don't see any utility in doing that.

Wouldn't it be more useful to set a digital output (given by o.mccChannel) HIGH when the stimulus is drawn and LOW when it is not... ? That could be used for timing, triggering external equipment etc.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fklabhub%2Fneurostim-ptb%2Fissues%2F125%3Femail_source%3Dnotifications%26email_token%3DAC3MRU6XVTWAEGXGQFYHPEDPVT4FRA5CNFSM4HNJJEO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GUCWMBA&data=02%7C01%7Cbart%40rutgers.edu%7C572380d76a4e41d38e9508d6d9c66c3d%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636935843602310328&sdata=4sXRMKRLqWadGj0bUzNNlPq0FH63NkO2ul5v7rNTN18%3D&reserved=0, or mute the threadhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAC3MRU2ORIEWGC6KJ7FD5ALPVT4FRANCNFSM4HNJJEOQ&data=02%7C01%7Cbart%40rutgers.edu%7C572380d76a4e41d38e9508d6d9c66c3d%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636935843602310328&sdata=31Xc%2FAJONdAok1modGRf1Ojp9mlAHLIHwjueOlq9aQ4%3D&reserved=0.

cnuahs commented 5 years ago

I'd be fine with that. I'm not using it, but was about to. I'll try using the onset/offset functions instead, which I think I like better anyway.

@adammorrissirrommada, any thoughts to add?

cnuahs commented 5 years ago

I think this is resolved by commit a08185d. I'm going to mark it as closed.