@@ -100,12 +100,22 @@ public Headstage64OpticalStimulatorSequenceDialog(ConfigureHeadstage64OpticalSti
100100 { StimulusSequenceOptions . textBoxPulsesPerBurst ,
101101 new TextBoxBinding < uint > (
102102 StimulusSequenceOptions . textBoxPulsesPerBurst ,
103- value => { OpticalStimulator . PulsesPerBurst = value ; return OpticalStimulator . PulsesPerBurst ; } ,
103+ value =>
104+ {
105+ OpticalStimulator . PulsesPerBurst = value ;
106+ StimulusSequenceOptions . textBoxPulsePeriod . Enabled = OpticalStimulator . PulsesPerBurst > 1 ;
107+ return OpticalStimulator . PulsesPerBurst ;
108+ } ,
104109 uint . Parse ) } ,
105110 { StimulusSequenceOptions . textBoxBurstsPerTrain ,
106111 new TextBoxBinding < uint > (
107112 StimulusSequenceOptions . textBoxBurstsPerTrain ,
108- value => { OpticalStimulator . BurstsPerTrain = value ; return OpticalStimulator . BurstsPerTrain ; } ,
113+ value =>
114+ {
115+ OpticalStimulator . BurstsPerTrain = value ;
116+ StimulusSequenceOptions . textBoxInterBurstInterval . Enabled = OpticalStimulator . BurstsPerTrain > 1 ;
117+ return OpticalStimulator . BurstsPerTrain ;
118+ } ,
109119 uint . Parse ) }
110120 } ;
111121
@@ -281,9 +291,9 @@ static bool IsSequenceValid(ConfigureHeadstage64OpticalStimulator sequence, out
281291 reason = "Maximum current is invalid." ;
282292 return false ;
283293 }
284- else if ( sequence . PulsesPerSecond <= sequence . PulseDuration )
294+ else if ( sequence . PulsesPerBurst > 1 && sequence . PulsesPerSecond <= sequence . PulseDuration )
285295 {
286- reason = "Pulse duration is too short compared to the pulse period ." ;
296+ reason = "Pulse period is too short compared to the pulse duration ." ;
287297 return false ;
288298 }
289299
0 commit comments