Skip to content

Commit

Permalink
fix result tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-k committed Oct 23, 2024
1 parent 035b325 commit f85447a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_integrated_result_properties(result):
np.sqrt(results.voltage_i**2 + results.voltage_q**2), results.magnitude
)
np.testing.assert_equal(
np.unwrap(np.arctan2(results.voltage_i, results.voltage_q)), results.phase
np.unwrap(np.arctan2(results.voltage_q, results.voltage_i)), results.phase
)


Expand Down Expand Up @@ -119,7 +119,7 @@ def test_serialize(average, result):
"MSR[V]": np.sqrt(avg.voltage_i**2 + avg.voltage_q**2),
"i[V]": avg.voltage_i,
"q[V]": avg.voltage_q,
"phase[rad]": np.unwrap(np.arctan2(avg.voltage_i, avg.voltage_q)),
"phase[rad]": np.unwrap(np.arctan2(avg.voltage_q, avg.voltage_i)),
}
assert avg.serialize.keys() == target_dict.keys()
for key in output:
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_serialize_averaged_iq_results(result):
"MSR[V]": np.sqrt(results.voltage_i**2 + results.voltage_q**2),
"i[V]": results.voltage_i,
"q[V]": results.voltage_q,
"phase[rad]": np.unwrap(np.arctan2(results.voltage_i, results.voltage_q)),
"phase[rad]": np.unwrap(np.arctan2(results.voltage_q, results.voltage_i)),
}
assert output.keys() == target_dict.keys()
for key in output:
Expand Down

0 comments on commit f85447a

Please sign in to comment.