Skip to content
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

Improve documentation for MutliDeviceFactories #276

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions OpenEphys.Onix1/ConfigureBreakoutBoard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ namespace OpenEphys.Onix1
/// <summary>
/// Configures an ONIX breakout board.
/// </summary>
/// <remarks>
/// The ONIX breakout board is a general purpose interface for neural data acquisition. It provides the
/// following features on the headstage:
/// <list type="bullet">
/// <item><description>2x general purpose input ports for headstage, miniscopes, etc.</description></item>
/// <item><description>12x configurable ±10V analog input/output channels sampled/updated at 100 kHz per
/// channel.</description></item>
/// <item><description>8x digital inputs</description></item>
/// <item><description>8x digital outputs</description></item>
/// <item><description>Hardware time-stamped buttons for manual event logging</description></item>
/// <item><description>Indicator LEDs with dark mode for light-sensitive applications.</description></item>
/// </list>
/// </remarks>
[Description("Configures an ONIX breakout board.")]
public class ConfigureBreakoutBoard : MultiDeviceFactory
{
Expand Down
49 changes: 33 additions & 16 deletions OpenEphys.Onix1/ConfigureHeadstage64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ namespace OpenEphys.Onix1
/// <summary>
/// Configures an ONIX headstage-64 on the specified port.
/// </summary>
/// <remarks>
/// Headstage-64 is a 1.5g serialized, multifunction headstage for small animals. This headstage is
/// designed to function with passive probes such as tetrode microdrives, silicon arrays, EEG/ECOG arrays,
/// etc. It provides the following features:
/// <list type="bullet">
/// <item><description>64 analog ephys channels and 3 auxiliary channels sampled at 30 kHz per
/// channel.</description></item>
/// <item><description>A BNO055 9-axis IMU for real-time, 3D orientation tracking.</description></item>
/// <item><description>Three TS4231 light to digital converters for real-time, 3D position tracking with
/// HTC Vive base stations.</description></item>
/// <item><description>A single electrical stimulator (current controlled, +/-15V compliance, automatic
/// electrode discharge).</description></item>
/// <item><description>Two optical stimulators (800 mA peak current per channel).</description></item>
/// </list>
/// </remarks>
[Description("Configures an ONIX headstage-64 in the specified port.")]
public class ConfigureHeadstage64 : MultiDeviceFactory
{
Expand All @@ -30,10 +45,11 @@ public class ConfigureHeadstage64 : MultiDeviceFactory
/// </remarks>
public ConfigureHeadstage64()
{
// WONTFIX: The issue with this headstage is that its locking voltage is far, far lower than the voltage required for full
// functionality. Locking occurs at around 2V on the headstage (enough to turn 1.8V on). Full functionality is at 5.0 volts.
// The FMC port voltage can only go down to 3.3V, which means that its very hard to find the true lowest voltage
// for a lock and then add a large offset to that. Fixing this requires a hardware change.
// WONTFIX: The issue with this headstage is that its locking voltage is far, far lower than the
// voltage required for full functionality. Locking occurs at around 2V on the headstage (enough
// to turn 1.8V on). Full functionality is at 5.0 volts. The FMC port voltage can only go down to
// 3.3V, which means that its very hard to find the true lowest voltage for a lock and then add a
// large offset to that. Fixing this requires a hardware change.
Port = PortName.PortA;
PortControl.HubConfiguration = HubConfiguration.Standard;
}
Expand Down Expand Up @@ -82,7 +98,8 @@ public ConfigureHeadstage64()
/// Gets or sets the port.
/// </summary>
/// <remarks>
/// The port is the physical connection to the ONIX breakout board and must be specified prior to operation.
/// The port is the physical connection to the ONIX breakout board and must be specified prior to
/// operation.
/// </remarks>
[Description("Specifies the physical connection of the headstage to the ONIX breakout board.")]
[Category(ConfigurationCategory)]
Expand All @@ -107,15 +124,15 @@ public PortName Port
/// </summary>
/// <remarks>
/// <para>
/// If defined, it will override automated voltage discovery and apply the specified voltage to the headstage.
/// If left blank, an automated headstage detection algorithm will attempt to communicate with the headstage and
/// apply an appropriate voltage for stable operation. Because ONIX allows any coaxial tether to be used, some of
/// which are thin enough to result in a significant voltage drop, its may be required to manually specify the
/// port voltage.
/// If defined, it will override automated voltage discovery and apply the specified voltage to the
/// headstage. If left blank, an automated headstage detection algorithm will attempt to communicate
/// with the headstage and apply an appropriate voltage for stable operation. Because ONIX allows any
/// coaxial tether to be used, some of which are thin enough to result in a significant voltage drop,
/// its may be required to manually specify the port voltage.
/// </para>
/// <para>
/// Warning: this device requires 5.5V to 6.0V, measured at the headstage, for proper operation. Supplying higher
/// voltages may result in damage.
/// Warning: this device requires 5.5V to 6.0V, measured at the headstage, for proper operation.
/// Supplying higher voltages may result in damage.
/// </para>
/// </remarks>
[Description("If defined, it will override automated voltage discovery and apply the specified voltage" +
Expand All @@ -142,10 +159,10 @@ class ConfigureHeadstage64PortController : ConfigurePortController
{
protected override bool ConfigurePortVoltage(DeviceContext device)
{
// WONTFIX: It takes a huge amount of time to get to 0, almost 10 seconds.
// The best we can do at the moment is drive port voltage to minimum which
// is an active process and then settle from there to zero volts. This requires
// a hardware revision that discharges the headstage between cycles to fix.
// WONTFIX: It takes a huge amount of time to get to 0, almost 10 seconds. The best we can do
// at the moment is drive port voltage to minimum which is an active process and then settle
// from there to zero volts. This requires a hardware revision that discharges the headstage
// between cycles to fix.
const uint MinVoltage = 33;
const uint MaxVoltage = 60;
const uint VoltageOffset = 34;
Expand Down
18 changes: 10 additions & 8 deletions OpenEphys.Onix1/ConfigureHeadstage64ElectricalStimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ namespace OpenEphys.Onix1
/// Configures a headstage-64 onboard electrical stimulator.
/// </summary>
/// <remarks>
/// This configuration operator can be linked to a <see cref="Headstage64ElectricalStimulatorTrigger"/> instance to deliver
/// current controlled electrical micro-stimulation through a contact on the probe connector on the bottom of the headstage
/// or the corresponding contact on a compatible electrode interface board.
/// This configuration operator can be linked to a <see cref="Headstage64ElectricalStimulatorTrigger"/>
/// instance to deliver current controlled electrical micro-stimulation through a contact on the probe
/// connector on the bottom of the headstage or the corresponding contact on a compatible electrode
/// interface board.
/// </remarks>
[Description("Configures a headstage-64 onboard electrical stimulator.")]
public class ConfigureHeadstage64ElectricalStimulator : SingleDeviceFactory
Expand All @@ -26,12 +27,13 @@ public ConfigureHeadstage64ElectricalStimulator()
/// Configure a headstage-64 onboard electrical stimulator.
/// </summary>
/// <remarks>
/// This will schedule configuration actions to be applied by a <see cref="StartAcquisition"/> instance
/// prior to data acquisition.
/// This will schedule configuration actions to be applied by a <see cref="StartAcquisition"/>
/// instance prior to data acquisition.
/// </remarks>
/// <param name="source">A sequence of <see cref="ContextTask"/> instances that holds configuration actions.</param>
/// <returns>The original sequence modified by adding additional configuration actions required to configure a headstage-64
/// onboard electrical stimulator.</returns>
/// <param name="source">A sequence of <see cref="ContextTask"/> instances that holds configuration
/// actions.</param>
/// <returns>The original sequence modified by adding additional configuration actions required to
/// configure a headstage-64 onboard electrical stimulator.</returns>
public override IObservable<ContextTask> Process(IObservable<ContextTask> source)
{
var deviceName = DeviceName;
Expand Down
17 changes: 9 additions & 8 deletions OpenEphys.Onix1/ConfigureHeadstage64OpticalStimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ namespace OpenEphys.Onix1
/// Configures a headstage-64 dual-channel optical stimulator.
/// </summary>
/// <remarks>
/// This configuration operator can be linked to a <see cref="Headstage64OpticalStimulatorTrigger"/> instance to drive current
/// through laser diodes or LEDs connected to two contacts on the probe connector on the bottom of the headstage
/// or the corresponding contacts on a compatible electrode interface board.
/// This configuration class can be linked to a <see cref="Headstage64OpticalStimulatorTrigger"/> instance
/// to drive current through laser diodes or LEDs connected to two contacts on the probe connector on the
/// bottom of the headstage or the corresponding contacts on a compatible electrode interface board.
/// </remarks>
[Description("Configures a headstage-64 dual-channel optical stimulator.")]
public class ConfigureHeadstage64OpticalStimulator : SingleDeviceFactory
Expand All @@ -26,12 +26,13 @@ public ConfigureHeadstage64OpticalStimulator()
/// Configure a headstage-64 dual-channel optical stimulator.
/// </summary>
/// <remarks>
/// This will schedule configuration actions to be applied by a <see cref="StartAcquisition"/> instance
/// prior to data acquisition.
/// This will schedule configuration actions to be applied by a <see cref="StartAcquisition"/>
/// instance prior to data acquisition.
/// </remarks>
/// <param name="source">A sequence of <see cref="ContextTask"/> instances that holds configuration actions.</param>
/// <returns>The original sequence modified by adding additional configuration actions required to configure a
/// headstage-64 dual-channel optical stimulator.</returns>
/// <param name="source">A sequence of <see cref="ContextTask"/> instances that holds configuration
/// actions.</param>
/// <returns>The original sequence modified by adding additional configuration actions required to
/// configure a headstage-64 dual-channel optical stimulator.</returns>
public override IObservable<ContextTask> Process(IObservable<ContextTask> source)
{
var deviceName = DeviceName;
Expand Down
16 changes: 15 additions & 1 deletion OpenEphys.Onix1/ConfigureNeuropixelsV1eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@ namespace OpenEphys.Onix1
/// <summary>
/// Configures a NeuropixelsV1e headstage on the specified port.
/// </summary>
[Description("Configures a NeuropixelsV1e headstage on the specified port.")]
/// <remarks>
/// The NeuropixeslV1e Headstage is a 0.68g serialized, multifunction headstage for small animals. This
/// headstage is designed to function with IMEC Neuropixels V1 probes. It provides the following features:
/// <list type="bullet">
/// <item><description>Support for a single IMEC Neuropixels 1.0 probe that features:
/// <list type="bullet">
/// <item><description>A single 1 cm long shank probe with a 70 x 24 µm shank cross-section.</description></item>
/// <item><description>960-electrode low-impedance TiN electrodes.</description></item>
/// <item><description>384 parallel, dual-band (AP, LFP), low-noise recording channels.</description></item>
/// </list>
/// </description></item>
/// <item><description>A BNO055 9-axis IMU for real-time, 3D orientation tracking.</description></item>
/// </list>
/// </remarks>
[Description("Configures a NeuropixelsV1e headstage.")]
[Editor("OpenEphys.Onix1.Design.NeuropixelsV1eHeadstageEditor, OpenEphys.Onix1.Design", typeof(ComponentEditor))]
public class ConfigureNeuropixelsV1eHeadstage : MultiDeviceFactory
{
Expand Down
14 changes: 14 additions & 0 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eBetaHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ namespace OpenEphys.Onix1
/// <summary>
/// Configures a NeuropixelsV2eBeta headstage on the specified port.
/// </summary>
/// <remarks>
/// The NeuropixelsV2e-Beta Headstage is a 0.64g serialized, multifunction headstage for small animals. This
/// headstage is designed to function with IMEC Neuropixels V2Beta probes. It provides the following features:
/// <list type="bullet">
/// <item><description>Support for dual IMEC Neuropixels 2.0-Beta probes, each of which features:
/// <list type="bullet">
/// <item><description>4x silicon shanks with a 70 x 24 µm cross-section.</description></item>
/// <item><description>1280 electrodes low-impedance TiN electrodes per shank.</description></item>
/// <item><description>384 parallel, full-band (AP, LFP), low-noise recording channels.</description></item>
/// </list>
/// </description></item>
/// <item><description>A BNO055 9-axis IMU for real-time, 3D orientation tracking.</description></item>
/// </list>
/// </remarks>
[Description("Configures a NeuropixelsV2eBeta headstage.")]
[Editor("OpenEphys.Onix1.Design.NeuropixelsV2eHeadstageEditor, OpenEphys.Onix1.Design", typeof(ComponentEditor))]
public class ConfigureNeuropixelsV2eBetaHeadstage : MultiDeviceFactory
Expand Down
14 changes: 14 additions & 0 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ namespace OpenEphys.Onix1
/// <summary>
/// Configures a NeuropixelsV2e headstage on the specified port.
/// </summary>
/// <remarks>
/// The NeuropixelsV2e Headstage is a 0.64g serialized, multifunction headstage for small animals. This
/// headstage is designed to function with IMEC Neuropixels V2 probes. It provides the following features:
/// <list type="bullet">
/// <item><description>Support for dual IMEC Neuropixels 2.0 probes, each of which features:
/// <list type="bullet">
/// <item><description>Either 1x or 4x silicon shanks with a 70 x 24 µm cross-section.</description></item>
/// <item><description>1280 electrodes low-impedance TiN electrodes per shank.</description></item>
/// <item><description>384 parallel, full-band (AP, LFP), low-noise recording channels.</description></item>
/// </list>
/// </description></item>
/// <item><description>A BNO055 9-axis IMU for real-time, 3D orientation tracking.</description></item>
/// </list>
/// </remarks>
[Editor("OpenEphys.Onix1.Design.NeuropixelsV2eHeadstageEditor, OpenEphys.Onix1.Design", typeof(ComponentEditor))]
[Description("Configures a NeuropixelsV2e headstage on the specified port.")]
public class ConfigureNeuropixelsV2eHeadstage : MultiDeviceFactory
Expand Down