Skip to content

Commit

Permalink
abs -> amplitude
Browse files Browse the repository at this point in the history
  • Loading branch information
nulinspiratie committed Nov 8, 2024
1 parent 8ce9541 commit dea03bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(
(self.y_axis.name, self.y_axis.sweep_values_with_offset),
(self.x_axis.name, self.x_axis.sweep_values_with_offset),
],
attrs={"units": "V", "long_name": "Signal"},
attrs={"long_name": "Signal"},
)
for axis in [self.x_axis, self.y_axis]:
attrs = {"label": axis.label or axis.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
x_axis: SweepAxis,
y_axis: SweepAxis,
num_averages=1,
result_type: Literal["I", "Q", "abs", "phase"] = "I",
result_type: Literal["I", "Q", "amplitude", "phase"] = "I",
initial_delay: Optional[float] = None,
**kwargs,
):
Expand Down Expand Up @@ -115,7 +115,7 @@ def process_results(self, results: Dict[str, Any]) -> np.ndarray:
"""
if self.result_type in ["I", "Q"]:
result = results[self.result_type]
elif self.result_type == "abs":
elif self.result_type == "amplitude":
result = np.abs(results["I"] + 1j * results["Q"])
elif self.result_type == "phase":
result = np.angle(results["I"] + 1j * results["Q"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
x_axis: SweepAxis,
y_axis: SweepAxis,
num_averages=1,
result_type: Literal["I", "Q", "abs", "phase"] = "I",
result_type: Literal["I", "Q", "amplitude", "phase"] = "I",
initial_delay: Optional[float] = None,
**kwargs,
):
Expand Down

0 comments on commit dea03bc

Please sign in to comment.