Skip to content

Commit

Permalink
Fix EPR sign bug that caused EPR to always be positive (zlatko-minev#125
Browse files Browse the repository at this point in the history
)
  • Loading branch information
obrienpja authored Jul 20, 2022
1 parent e610dc4 commit 955e729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyEPR/core_distributed_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def calc_current_using_line_voltage(self, variation: str, junc_line_name: str,
"E").real().integrate_line_tangent(name=junc_line_name)
v_calc_imag = CalcObject([], self.setup).getQty(
"E").imag().integrate_line_tangent(name=junc_line_name)
V = np.sqrt(v_calc_real.evaluate(lv=lv)**2 +
V = np.sign(v_calc_real) * np.sqrt(v_calc_real.evaluate(lv=lv)**2 +
v_calc_imag.evaluate(lv=lv)**2)

# Get frequency
Expand Down

0 comments on commit 955e729

Please sign in to comment.