pyNastran/op2/op2_helper

This is the pyNastran.op2.op2_helper.rst file.

op2_helper Module

defines:
  • polar_to_real_imag

  • real_imag_to_mag_phase

pyNastran.op2.op2_helper.polar_to_real_imag(mag, phase)[source]

Converts magnitude-phase to real-imaginary so all complex results are consistent

Parameters:
magfloat

magnitude c^2

phasefloat

phase angle phi (degrees; theta)

Returns:
real_valuefloat

the real component a of a+bi

imag_valuefloat

the imaginary component b of a+bi

pyNastran.op2.op2_helper.real_imag_to_mag_phase(real_imag)[source]

returns the magnitude and phase (degrees) of a complex number