Skip to content

Commit

Permalink
Improve documentation for MutliDeviceFactories
Browse files Browse the repository at this point in the history
- Add features to class description in bullet list format.
  • Loading branch information
jonnew committed Aug 30, 2024
1 parent 3fdcec6 commit a713696
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 44 deletions.
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>
/// A class that 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>Time-stamped buttons for manual event logging</description></item>
/// <item><description>Dark mode for light-sensitive applications.</description></item>
/// </list>
/// </remarks>
[Description("Configures an ONIX breakout board.")]
public class ConfigureBreakoutBoard : MultiDeviceFactory
{
Expand Down
61 changes: 33 additions & 28 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>
/// A class that 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 tetrode microdrives. Alternatively it can be used with other passive probes
/// (e.g. silicon arrays, EEG/ECOG arrays, etc.). It provides the following features on the headstage:
/// <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 @@ -16,24 +31,13 @@ public class ConfigureHeadstage64 : MultiDeviceFactory
/// <summary>
/// Initializes a new instance of the <see cref="ConfigureHeadstage64"/> class.
/// </summary>
/// <remarks>
/// Headstage-64 is a 1.5g serialized, multifunction headstage for small animals. This headstage is designed to function
/// with tetrode microdrives. Alternatively it can be used with other passive probes (e.g. silicon arrays, EEG/ECOG arrays,
/// etc.). It provides the following features on the headstage:
/// <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>
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 +86,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 +112,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 +147,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
/// A class that configures a headstage-64 onboard electrical stimulator.
/// </summary>
/// <remarks>
/// This configuration class 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 class 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
/// A class that configures a headstage-64 dual-channel optical stimulator.
/// </summary>
/// <remarks>
/// 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.
/// 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
15 changes: 15 additions & 0 deletions OpenEphys.Onix1/ConfigureNeuropixelsV1eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ namespace OpenEphys.Onix1
/// <summary>
/// A class that configures a NeuropixelsV1e headstage on the specified port.
/// </summary>
/// <remarks>
/// Headstage-NeuropixelsV1e 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
/// on the headstage:
/// <list type="bullet">
/// <item><description>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 electodes.</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
15 changes: 15 additions & 0 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eBetaHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ namespace OpenEphys.Onix1
/// <summary>
/// A class that configures a NeuropixelsV2eBeta headstage on the specified port.
/// </summary>
/// <remarks>
/// Headstage-NeuropixelsV2e-Beta 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
/// on the headstage:
/// <list type="bullet">
/// <item><description>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.")]
public class ConfigureNeuropixelsV2eBetaHeadstage : MultiDeviceFactory
{
Expand Down
15 changes: 15 additions & 0 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ namespace OpenEphys.Onix1
/// <summary>
/// A class that configures a NeuropixelsV2e headstage on the specified port.
/// </summary>
/// <remarks>
/// Headstage-NeuropixelsV2e 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
/// on the headstage:
/// <list type="bullet">
/// <item><description>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.")]
public class ConfigureNeuropixelsV2eHeadstage : MultiDeviceFactory
Expand Down

0 comments on commit a713696

Please sign in to comment.