Skip to content

Headstage64 Optical Stimulator: Standardize naming between GUI and Configure node #542

@bparks13

Description

@bparks13

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.

/// <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:

pulseDuration.SubscribeSafe(observer, value =>
device.WriteRegister(Headstage64OpticalStimulator.PULSEDUR, pulseDurationToRegister(value, PulsesPerSecond))),
pulsesPerSecond.SubscribeSafe(observer, value =>
device.WriteRegister(Headstage64OpticalStimulator.PULSEPERIOD, pulseFrequencyToRegister(value, PulseDuration))),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions