-
Notifications
You must be signed in to change notification settings - Fork 5
Description
In the Configure node, there are PulseDuration and PulsesPerSecond properties, whereas the GUI has Pulse Duration and Pulse Period. However, the description/XML comments for the PulsesPerSecond property describe it as a pulse period.
bonsai-onix1/OpenEphys.Onix1/ConfigureHeadstage64OpticalStimulator.cs
Lines 177 to 189 in 7fb9332
| /// <summary> | |
| /// Gets or sets the pulse period within a burst in msec. | |
| /// </summary> | |
| [Description("The pulse period within a burst (msec).")] | |
| [Editor(DesignTypes.NumericUpDownEditor, DesignTypes.UITypeEditor)] | |
| [Range(Headstage64OpticalStimulator.MinPulsePeriod, Headstage64OpticalStimulator.MaxPulsePeriod)] | |
| [Precision(3, 1)] | |
| [Category(AcquisitionCategory)] | |
| public double PulsesPerSecond | |
| { | |
| get => pulsesPerSecond.Value; | |
| set => pulsesPerSecond.OnNext(Clamp(value, Headstage64OpticalStimulator.MinPulsePeriod, Headstage64OpticalStimulator.MaxPulsePeriod)); | |
| } |
We should go through and ensure that the correct name/description is being used throughout the library.
Additionally, in digging further, it appears that PulseDuration and PulsesPerSecond might be swapped when writing to hardware, so we should ensure that names are consistent and properties are correctly used:
bonsai-onix1/OpenEphys.Onix1/ConfigureHeadstage64OpticalStimulator.cs
Lines 313 to 316 in 7fb9332
| pulseDuration.SubscribeSafe(observer, value => | |
| device.WriteRegister(Headstage64OpticalStimulator.PULSEDUR, pulseDurationToRegister(value, PulsesPerSecond))), | |
| pulsesPerSecond.SubscribeSafe(observer, value => | |
| device.WriteRegister(Headstage64OpticalStimulator.PULSEPERIOD, pulseFrequencyToRegister(value, PulseDuration))), |