<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calc_z0_and_conv_factor_from_ratio_of_harmonics(z, z2, NA=0.999):
 """ Calculates the Conversion Factor and physical amplitude of motion in nms by comparison of the ratio of the heights of the z signal and second harmonic of z. Parameters z : ndarray array containing z signal in volts z2 : ndarray array containing second harmonic of z signal in volts NA : float NA of mirror used in experiment Returns ------- z0 : float Physical average amplitude of motion in nms ConvFactor : float Conversion Factor between volts and nms """

    V1 = calc_mean_amp(z)
    V2 = calc_mean_amp(z2)
    ratio = V2/V1
    beta = 4*ratio
    laserWavelength = 1550e-9 # in m
    k0 = (2*pi)/(laserWavelength)
    WaistSize = laserWavelength/(pi*NA)
    Zr = pi*WaistSize**2/laserWavelength
    z0 = beta/(k0 - 1/Zr)
    ConvFactor = V1/z0
    T0 = 300
    return z0, ConvFactor