diff --git a/pyEPR/core_distributed_analysis.py b/pyEPR/core_distributed_analysis.py index c9a91ef..e1d1482 100644 --- a/pyEPR/core_distributed_analysis.py +++ b/pyEPR/core_distributed_analysis.py @@ -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