From b3e6f5795173bbecf6357ab4d4bba67044d5ca68 Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Sun, 22 Sep 2024 14:54:45 -0700 Subject: [PATCH 1/2] Renamed stuff --- .../ManipulatorBehaviorController.cs | 26 +++++++------- ...troller_Automation_ReferenceCoordinate.cs} | 12 +++---- ...er_Automation_ReferenceCoordinate.cs.meta} | 0 .../Scripts/Pinpoint/Probes/ProbeManager.cs | 2 +- .../Scripts/Pinpoint/TP_ProbeQuickSettings.cs | 2 +- .../Pinpoint/TrajectoryPlannerManager.cs | 2 +- .../ResetZeroCoordinatePanelHandler.cs | 4 +-- .../ManipulatorConnectionPanel.cs | 10 +++--- .../AutomationStack/AutomationStackHandler.cs | 12 +++---- ...mationStackHandler_ReferenceCoordinate.cs} | 4 +-- ...nStackHandler_ReferenceCoordinate.cs.meta} | 0 .../Scripts/UI/States/AutomationStackState.cs | 36 +++++++++---------- Assets/UI/Components/AutomationStack.uxml | 4 +-- 13 files changed, 57 insertions(+), 57 deletions(-) rename Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/{ManipulatorBehaviorController_Automation_BregmaCalibration.cs => ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs} (90%) rename Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/{ManipulatorBehaviorController_Automation_BregmaCalibration.cs.meta => ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs.meta} (100%) rename Assets/Scripts/UI/AutomationStack/{AutomationStackHandler_BregmaCalibration.cs => AutomationStackHandler_ReferenceCoordinate.cs} (84%) rename Assets/Scripts/UI/AutomationStack/{AutomationStackHandler_BregmaCalibration.cs.meta => AutomationStackHandler_ReferenceCoordinate.cs.meta} (100%) diff --git a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController.cs b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController.cs index 89e74f17..3a34e3b7 100644 --- a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController.cs +++ b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController.cs @@ -41,19 +41,19 @@ public partial class ManipulatorBehaviorController : MonoBehaviour /// Getter and setter or the zero coordinate offset of the manipulator. /// If passed a NaN value, the previous value is kept. /// - public Vector4 ZeroCoordinateOffset + public Vector4 ReferenceCoordinateOffset { - get => _zeroCoordinateOffset; + get => _referenceCoordinateOffset; set { - _zeroCoordinateOffset = new Vector4( - float.IsNaN(value.x) ? _zeroCoordinateOffset.x : value.x, - float.IsNaN(value.y) ? _zeroCoordinateOffset.y : value.y, - float.IsNaN(value.z) ? _zeroCoordinateOffset.z : value.z, - float.IsNaN(value.w) ? _zeroCoordinateOffset.w : value.w + _referenceCoordinateOffset = new Vector4( + float.IsNaN(value.x) ? _referenceCoordinateOffset.x : value.x, + float.IsNaN(value.y) ? _referenceCoordinateOffset.y : value.y, + float.IsNaN(value.z) ? _referenceCoordinateOffset.z : value.z, + float.IsNaN(value.w) ? _referenceCoordinateOffset.w : value.w ); - ZeroCoordinateOffsetChangedEvent.Invoke(_zeroCoordinateOffset); + ZeroCoordinateOffsetChangedEvent.Invoke(_referenceCoordinateOffset); } } @@ -89,7 +89,7 @@ public bool IsRightHanded #region Private internal fields private Vector4 _lastLoggedManipulatorPosition = Vector4.zero; - private Vector4 _zeroCoordinateOffset = Vector4.zero; + private Vector4 _referenceCoordinateOffset = Vector4.zero; private float _brainSurfaceOffset; private bool _isRightHanded; private float _lastLoggedTime; @@ -124,7 +124,7 @@ private void Awake() private void OnDisable() { ManipulatorID = null; - _zeroCoordinateOffset = Vector4.zero; + _referenceCoordinateOffset = Vector4.zero; _brainSurfaceOffset = 0; } @@ -210,7 +210,7 @@ public Vector4 ConvertInsertionAPMLDVToManipulatorPosition(Vector3 insertionAPML posInManipulatorTransform.w -= float.IsNaN(BrainSurfaceOffset) ? 0 : BrainSurfaceOffset; // Apply coordinate offsets and return result - return posInManipulatorTransform + ZeroCoordinateOffset; + return posInManipulatorTransform + ReferenceCoordinateOffset; } /// @@ -327,7 +327,7 @@ public async Awaitable MoveBackToZeroCoordinate() var setPositionResponse = await CommunicationManager.Instance.SetPosition( new SetPositionRequest( ManipulatorID, - ZeroCoordinateOffset, + ReferenceCoordinateOffset, AUTOMATIC_MOVEMENT_SPEED ) ); @@ -362,7 +362,7 @@ private async Awaitable UpdateProbePositionFromManipulator() // Apply zero coordinate offset. var zeroCoordinateAdjustedManipulatorPosition = - positionResponse.Position - ZeroCoordinateOffset; + positionResponse.Position - ReferenceCoordinateOffset; // Convert to coordinate space. var manipulatorSpacePosition = CoordinateTransform.T2U( diff --git a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_BregmaCalibration.cs b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs similarity index 90% rename from Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_BregmaCalibration.cs rename to Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs index 9dd20878..dd41123d 100644 --- a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_BregmaCalibration.cs +++ b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs @@ -18,13 +18,13 @@ public partial class ManipulatorBehaviorController #endregion /// - /// Reset zero coordinate of the manipulator + /// Reset reference coordinate of the manipulator /// /// /// Alerts user of 4-axis manipulators if depth axis is not at 0 and 3-axis manipulators if depth is too far from /// center. /// - public async Awaitable ResetZeroCoordinate() + public async Awaitable ResetReferenceCoordinate() { // Query current position. var positionalResponse = await CommunicationManager.Instance.GetPosition(ManipulatorID); @@ -70,18 +70,18 @@ when Mathf.Abs(Dimensions.z / 2f - positionalResponse.Position.w) return false; // Complete reset. - ZeroCoordinateOffset = positionalResponse.Position; + ReferenceCoordinateOffset = positionalResponse.Position; BrainSurfaceOffset = 0; // Log event. OutputLog.Log( new[] { - "Copilot", + "Automation", DateTime.Now.ToString(CultureInfo.InvariantCulture), - "ResetZeroCoordinate", + "ResetReferenceCoordinate", ManipulatorID, - ZeroCoordinateOffset.ToString() + ReferenceCoordinateOffset.ToString() } ); return true; diff --git a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_BregmaCalibration.cs.meta b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs.meta similarity index 100% rename from Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_BregmaCalibration.cs.meta rename to Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_ReferenceCoordinate.cs.meta diff --git a/Assets/Scripts/Pinpoint/Probes/ProbeManager.cs b/Assets/Scripts/Pinpoint/Probes/ProbeManager.cs index 08a45bd9..a8a14106 100644 --- a/Assets/Scripts/Pinpoint/Probes/ProbeManager.cs +++ b/Assets/Scripts/Pinpoint/Probes/ProbeManager.cs @@ -1275,7 +1275,7 @@ public static ProbeManagerData ProbeManager2ProbeData(ProbeManager probeManager) data.NumAxes = probeManager.ManipulatorBehaviorController.NumAxes; data.ManipulatorID = probeManager.ManipulatorBehaviorController.ManipulatorID; - data.ZeroCoordOffset = probeManager.ManipulatorBehaviorController.ZeroCoordinateOffset; + data.ZeroCoordOffset = probeManager.ManipulatorBehaviorController.ReferenceCoordinateOffset; data.Dimensions = probeManager.ManipulatorBehaviorController.Dimensions; data.BrainSurfaceOffset = probeManager.ManipulatorBehaviorController.BrainSurfaceOffset; // data.Drop2SurfaceWithDepth = probeManager diff --git a/Assets/Scripts/Pinpoint/TP_ProbeQuickSettings.cs b/Assets/Scripts/Pinpoint/TP_ProbeQuickSettings.cs index fa6f4ee9..e175bcf9 100644 --- a/Assets/Scripts/Pinpoint/TP_ProbeQuickSettings.cs +++ b/Assets/Scripts/Pinpoint/TP_ProbeQuickSettings.cs @@ -149,7 +149,7 @@ public void ResetZeroCoordinate() if (ProbeManager.ActiveProbeManager.IsEphysLinkControlled) { _communicationManager.GetPosition(ProbeManager.ActiveProbeManager.ManipulatorBehaviorController.ManipulatorID, - zeroCoordinate => ProbeManager.ActiveProbeManager.ManipulatorBehaviorController.ZeroCoordinateOffset = zeroCoordinate); + zeroCoordinate => ProbeManager.ActiveProbeManager.ManipulatorBehaviorController.ReferenceCoordinateOffset = zeroCoordinate); ProbeManager.ActiveProbeManager.ManipulatorBehaviorController.BrainSurfaceOffset = 0; } else diff --git a/Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs b/Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs index 80ae13a2..5e3a8502 100644 --- a/Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs +++ b/Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs @@ -485,7 +485,7 @@ public ProbeManager AddNewProbe(ProbeProperties.ProbeType probeType, ProbeInsert // Repopulate Ephys Link information probeManager.ManipulatorBehaviorController.NumAxes = numAxes; - probeManager.ManipulatorBehaviorController.ZeroCoordinateOffset = zeroCoordinateOffset; + probeManager.ManipulatorBehaviorController.ReferenceCoordinateOffset = zeroCoordinateOffset; probeManager.ManipulatorBehaviorController.BrainSurfaceOffset = brainSurfaceOffset; // probeManager.ManipulatorBehaviorController.IsSetToDropToSurfaceWithDepth = dropToSurfaceWithDepth; // probeManager.ManipulatorBehaviorController.IsSetToDropToSurfaceWithDepth = dropToSurfaceWithDepth; diff --git a/Assets/Scripts/Pinpoint/UI/EphysCopilot/ResetZeroCoordinatePanelHandler.cs b/Assets/Scripts/Pinpoint/UI/EphysCopilot/ResetZeroCoordinatePanelHandler.cs index 77ac413e..ec6b1ac7 100644 --- a/Assets/Scripts/Pinpoint/UI/EphysCopilot/ResetZeroCoordinatePanelHandler.cs +++ b/Assets/Scripts/Pinpoint/UI/EphysCopilot/ResetZeroCoordinatePanelHandler.cs @@ -30,7 +30,7 @@ public void ResetZeroCoordinate() ProbeManager.ManipulatorBehaviorController.ManipulatorID, zeroCoordinate => { - ProbeManager.ManipulatorBehaviorController.ZeroCoordinateOffset = + ProbeManager.ManipulatorBehaviorController.ReferenceCoordinateOffset = zeroCoordinate; ProbeManager.ManipulatorBehaviorController.BrainSurfaceOffset = 0; } @@ -44,7 +44,7 @@ public void ResetZeroCoordinate() DateTime.Now.ToString(CultureInfo.InvariantCulture), "ResetZeroCoordinate", ProbeManager.ManipulatorBehaviorController.ManipulatorID, - ProbeManager.ManipulatorBehaviorController.ZeroCoordinateOffset.ToString() + ProbeManager.ManipulatorBehaviorController.ReferenceCoordinateOffset.ToString() } ); } diff --git a/Assets/Scripts/Pinpoint/UI/EphysLinkSettings/ManipulatorConnectionPanel.cs b/Assets/Scripts/Pinpoint/UI/EphysLinkSettings/ManipulatorConnectionPanel.cs index 259d3d8a..a2e3f69a 100644 --- a/Assets/Scripts/Pinpoint/UI/EphysLinkSettings/ManipulatorConnectionPanel.cs +++ b/Assets/Scripts/Pinpoint/UI/EphysLinkSettings/ManipulatorConnectionPanel.cs @@ -250,7 +250,7 @@ public void OnLinkedProbeSelectionChanged(int value) /// New offset X-axis value public void UpdateZeroCoordinateOffsetX(string newValue) { - _attachedProbe.ManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + _attachedProbe.ManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.Parse(newValue), float.NaN, float.NaN, @@ -264,7 +264,7 @@ public void UpdateZeroCoordinateOffsetX(string newValue) /// New offset Y-axis value public void UpdateZeroCoordinateOffsetY(string newValue) { - _attachedProbe.ManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + _attachedProbe.ManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.NaN, float.Parse(newValue), float.NaN, @@ -278,7 +278,7 @@ public void UpdateZeroCoordinateOffsetY(string newValue) /// New offset Z-axis value public void UpdateZeroCoordinateOffsetZ(string newValue) { - _attachedProbe.ManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + _attachedProbe.ManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.NaN, float.NaN, float.Parse(newValue), @@ -292,7 +292,7 @@ public void UpdateZeroCoordinateOffsetZ(string newValue) /// New offset D-axis value public void UpdateZeroCoordinateOffsetD(string newValue) { - _attachedProbe.ManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + _attachedProbe.ManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.NaN, float.NaN, float.NaN, @@ -402,7 +402,7 @@ private void UpdateProbePropertiesSectionState() { _probePropertiesSection.SetActive(true); UpdateZeroCoordinateOffsetInputFields( - _attachedProbe.ManipulatorBehaviorController.ZeroCoordinateOffset + _attachedProbe.ManipulatorBehaviorController.ReferenceCoordinateOffset ); UpdateBrainSurfaceOffsetInputField( _attachedProbe.ManipulatorBehaviorController.BrainSurfaceOffset diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs index 7f208f69..b12bf6cd 100644 --- a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs +++ b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs @@ -36,7 +36,7 @@ public partial class AutomationStackHandler : MonoBehaviour #region Bregma Calibration - private Button _resetBregmaCalibrationButton; + private Button _resetReferenceCoordinateButton; #endregion @@ -83,8 +83,8 @@ private void OnEnable() { // Get components. _automationStackPanel = _root.Q("automation-stack-panel"); - _resetBregmaCalibrationButton = _automationStackPanel.Q /// Probe is not selected/active and is not controlled by Ephys Link - private partial void ResetBregmaCalibration(); + private partial void ResetReferenceCoordinate(); #endregion diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_BregmaCalibration.cs b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs similarity index 84% rename from Assets/Scripts/UI/AutomationStack/AutomationStackHandler_BregmaCalibration.cs rename to Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs index 008ed20a..8deed0c9 100644 --- a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_BregmaCalibration.cs +++ b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs @@ -8,7 +8,7 @@ namespace UI.AutomationStack /// public partial class AutomationStackHandler { - private async partial void ResetBregmaCalibration() + private async partial void ResetReferenceCoordinate() { // Throw exception if invariant is violated. if (!AutomationStackState.IsEnabled) @@ -18,7 +18,7 @@ private async partial void ResetBregmaCalibration() ); // Reset the Bregma calibration of the active probe manager. - if (await ActiveManipulatorBehaviorController.ResetZeroCoordinate()) + if (await ActiveManipulatorBehaviorController.ResetReferenceCoordinate()) // Set probe's automation state to be calibrated if it did happen. ActiveProbeStateManager.SetCalibrated(); } diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_BregmaCalibration.cs.meta b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs.meta similarity index 100% rename from Assets/Scripts/UI/AutomationStack/AutomationStackHandler_BregmaCalibration.cs.meta rename to Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs.meta diff --git a/Assets/Scripts/UI/States/AutomationStackState.cs b/Assets/Scripts/UI/States/AutomationStackState.cs index 3710b97f..9b309f69 100644 --- a/Assets/Scripts/UI/States/AutomationStackState.cs +++ b/Assets/Scripts/UI/States/AutomationStackState.cs @@ -62,24 +62,24 @@ public class AutomationStackState : ResettingScriptableObject #endregion - #region Bregma Calibration + #region Reference Coordinate Calibration /// - /// X offset of the Bregma calibration (mm). + /// X offset of the reference coordinate calibration (mm). /// /// Automation is not enabled for the active probe manager. [CreateProperty] - public float BregmaCalibrationX + public float ReferenceCoordinateCalibrationX { - get => IsEnabled ? ActiveManipulatorBehaviorController.ZeroCoordinateOffset.x : 0; + get => IsEnabled ? ActiveManipulatorBehaviorController.ReferenceCoordinateOffset.x : 0; set { if (!IsEnabled) throw new InvalidOperationException( - "Cannot set the X offset for Bregma when automation is not enabled for probe " + "Cannot set the X offset for reference coordinate when automation is not enabled for probe " + ProbeManager.ActiveProbeManager.name ); - ActiveManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + ActiveManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( value, float.NaN, float.NaN, @@ -89,21 +89,21 @@ public float BregmaCalibrationX } /// - /// Y offset of the Bregma calibration (mm). + /// Y offset of the reference coordinate calibration (mm). /// /// Automation is not enabled for the active probe manager. [CreateProperty] public float BregmaCalibrationY { - get => IsEnabled ? ActiveManipulatorBehaviorController.ZeroCoordinateOffset.y : 0; + get => IsEnabled ? ActiveManipulatorBehaviorController.ReferenceCoordinateOffset.y : 0; set { if (!IsEnabled) throw new InvalidOperationException( - "Cannot set the Y offset for Bregma when automation is not enabled for probe " + "Cannot set the Y offset for reference coordinate when automation is not enabled for probe " + ProbeManager.ActiveProbeManager.name ); - ActiveManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + ActiveManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.NaN, value, float.NaN, @@ -113,21 +113,21 @@ public float BregmaCalibrationY } /// - /// Z offset of the Bregma calibration (mm). + /// Z offset of the reference coordinate calibration (mm). /// /// Automation is not enabled for the active probe manager. [CreateProperty] public float BregmaCalibrationZ { - get => IsEnabled ? ActiveManipulatorBehaviorController.ZeroCoordinateOffset.z : 0; + get => IsEnabled ? ActiveManipulatorBehaviorController.ReferenceCoordinateOffset.z : 0; set { if (!IsEnabled) throw new InvalidOperationException( - "Cannot set the Z offset for Bregma when automation is not enabled for probe " + "Cannot set the Z offset for reference coordinate when automation is not enabled for probe " + ProbeManager.ActiveProbeManager.name ); - ActiveManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + ActiveManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.NaN, float.NaN, value, @@ -137,21 +137,21 @@ public float BregmaCalibrationZ } /// - /// Depth offset of the Bregma calibration (mm). + /// Depth offset of the reference coordinate calibration (mm). /// /// Automation is not enabled for the active probe manager. [CreateProperty] public float BregmaCalibrationDepth { - get => IsEnabled ? ActiveManipulatorBehaviorController.ZeroCoordinateOffset.w : 0; + get => IsEnabled ? ActiveManipulatorBehaviorController.ReferenceCoordinateOffset.w : 0; set { if (!IsEnabled) throw new InvalidOperationException( - "Cannot set the depth offset for Bregma when automation is not enabled for probe " + "Cannot set the depth offset for reference coordinate when automation is not enabled for probe " + ProbeManager.ActiveProbeManager.name ); - ActiveManipulatorBehaviorController.ZeroCoordinateOffset = new Vector4( + ActiveManipulatorBehaviorController.ReferenceCoordinateOffset = new Vector4( float.NaN, float.NaN, float.NaN, diff --git a/Assets/UI/Components/AutomationStack.uxml b/Assets/UI/Components/AutomationStack.uxml index b83a2ae2..57692a59 100644 --- a/Assets/UI/Components/AutomationStack.uxml +++ b/Assets/UI/Components/AutomationStack.uxml @@ -7,7 +7,7 @@ - + @@ -42,7 +42,7 @@ - + From 56e55b60cae88717b3bef8311afb0f7309823cea Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Sun, 22 Sep 2024 15:00:09 -0700 Subject: [PATCH 2/2] More renaming --- .../ManipulatorBehaviorController_Automation_Insertion.cs | 2 +- Assets/Scripts/Pinpoint/Probes/ProbeAutomationState.cs | 2 +- .../Scripts/UI/AutomationStack/AutomationStackHandler.cs | 8 ++++---- .../AutomationStack/AutomationStackHandler_Insertion.cs | 2 +- .../AutomationStackHandler_ReferenceCoordinate.cs | 6 +++--- .../AutomationStackHandler_TargetInsertion.cs | 2 +- Assets/Scripts/UI/States/AutomationStackState.cs | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_Insertion.cs b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_Insertion.cs index 8e134789..30bc89d1 100644 --- a/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_Insertion.cs +++ b/Assets/Scripts/Pinpoint/Probes/ManipulatorBehaviorController/ManipulatorBehaviorController_Automation_Insertion.cs @@ -380,7 +380,7 @@ private Vector3 GetOffsetAdjustedTargetCoordinate(ProbeManager targetInsertionPr var offsetAdjustedTargetCoordinateWorldT = targetWorldT + offsetAdjustedRelativeTargetPositionWorldT; - // Converting worldT to AtlasT (to capture new Bregma offset when there is scaling) + // Converting worldT to AtlasT (to capture new reference coordinate offset when there is scaling) // then switch axes to get APMLDV. var offsetAdjustedTargetCoordinateAtlasT = BrainAtlasManager.ActiveReferenceAtlas.World2Atlas( diff --git a/Assets/Scripts/Pinpoint/Probes/ProbeAutomationState.cs b/Assets/Scripts/Pinpoint/Probes/ProbeAutomationState.cs index 0add000b..a26df5d9 100644 --- a/Assets/Scripts/Pinpoint/Probes/ProbeAutomationState.cs +++ b/Assets/Scripts/Pinpoint/Probes/ProbeAutomationState.cs @@ -11,7 +11,7 @@ public enum ProbeAutomationState IsUncalibrated, /// - /// Is calibrated to Bregma. Could be positioned anywhere. + /// Is calibrated to the reference coordinate. Could be positioned anywhere. /// IsCalibrated, diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs index b12bf6cd..305ddf01 100644 --- a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs +++ b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler.cs @@ -34,7 +34,7 @@ public partial class AutomationStackHandler : MonoBehaviour // Panels. private VisualElement _automationStackPanel; - #region Bregma Calibration + #region Reference Coordinate Calibration private Button _resetReferenceCoordinateButton; @@ -144,10 +144,10 @@ private void FixedUpdate() #region Stages - #region Bregma Calibration + #region Reference Coordinate Calibration /// - /// Reset the Bregma calibration of the active probe. + /// Reset the reference coordinate calibration of the active probe. /// /// Probe is not selected/active and is not controlled by Ephys Link private partial void ResetReferenceCoordinate(); @@ -192,7 +192,7 @@ private void FixedUpdate() /// /// /// Probe is not selected/active, is not controlled by Ephys Link, and is not - /// calibrated to bregma. + /// calibrated to reference coordinate. /// private partial void OnDriveToTargetEntryCoordinatePressed(); diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_Insertion.cs b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_Insertion.cs index d42b8cf3..d6c01585 100644 --- a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_Insertion.cs +++ b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_Insertion.cs @@ -4,7 +4,7 @@ namespace UI.AutomationStack { /// - /// Implements Bregma calibration in the Automation Stack.
+ /// Implements reference coordinate calibration in the Automation Stack.
///
public partial class AutomationStackHandler { diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs index 8deed0c9..62197883 100644 --- a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs +++ b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_ReferenceCoordinate.cs @@ -4,7 +4,7 @@ namespace UI.AutomationStack { /// - /// Implements Bregma calibration in the Automation Stack.
+ /// Implements reference coordinate calibration in the Automation Stack.
///
public partial class AutomationStackHandler { @@ -13,11 +13,11 @@ private async partial void ResetReferenceCoordinate() // Throw exception if invariant is violated. if (!AutomationStackState.IsEnabled) throw new InvalidOperationException( - "Cannot reset Bregma calibration if automation is not enabled on probe " + "Cannot reset reference coordinate calibration if automation is not enabled on probe " + ProbeManager.ActiveProbeManager.name ); - // Reset the Bregma calibration of the active probe manager. + // Reset the reference coordinate calibration of the active probe manager. if (await ActiveManipulatorBehaviorController.ResetReferenceCoordinate()) // Set probe's automation state to be calibrated if it did happen. ActiveProbeStateManager.SetCalibrated(); diff --git a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_TargetInsertion.cs b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_TargetInsertion.cs index caec55c6..025fe920 100644 --- a/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_TargetInsertion.cs +++ b/Assets/Scripts/UI/AutomationStack/AutomationStackHandler_TargetInsertion.cs @@ -178,7 +178,7 @@ private async partial void OnDriveToTargetEntryCoordinatePressed() // Throw exception if invariant is violated. if (!AutomationStackState.IsEnabled || !ActiveProbeStateManager.IsCalibrated()) throw new InvalidOperationException( - $"Cannot drive {ProbeManager.ActiveProbeManager.name} to target insertion if not enabled and not calibrated to Bregma." + $"Cannot drive {ProbeManager.ActiveProbeManager.name} to target insertion if not enabled and not calibrated to reference coordinate." ); // If the probe is moving, call stop. diff --git a/Assets/Scripts/UI/States/AutomationStackState.cs b/Assets/Scripts/UI/States/AutomationStackState.cs index 9b309f69..fba25dd2 100644 --- a/Assets/Scripts/UI/States/AutomationStackState.cs +++ b/Assets/Scripts/UI/States/AutomationStackState.cs @@ -378,7 +378,7 @@ private static string SurfaceCoordinateToString( /// Is the drive to selected target entry coordinate button enabled.
/// /// - /// Returns true if the active probe manager is Ephys Link controlled, calibrated to Bregma, and has a selected target. + /// Returns true if the active probe manager is Ephys Link controlled, calibrated to reference coordinate, and has a selected target. /// [CreateProperty] public bool IsDriveToTargetEntryCoordinateButtonEnabled =>