Processing math: 100%

pypho_functions

pypho_functions is a collection of usefull functions to make your coding live easier.

 

dbm2w( power_dbm )

Converts a power value from dBm to W: P|W=10P|dBm10 W

Parameter Type Description
power_dbm float Power value in dBm (P|dBm).

 

Output Type Description
Power value in W float P|W

 

 

w2dbm( power_w )

Converts a power value from W to dBm: P|dBm=10lg(P|W1mW) dBm.

Parameter Type Description
power_dbm float Power value in W (P|W).

 

Output Type Description
Power value in dBm float P|dBm

 

 

getpower_W( E )

Calculates the mean power in W of an optical Signal E: P|dBm=1TTτ=0(|Ex(τ)|2+|Ey(τ)|2)dτ.

Parameter Type Description
E numpy.ndarray 2 dimensional array with complex values, which represents the sample points over time of the X- and Y-polarisation.
For example E[0]['E'].
Read here about data signal and noise representation

 

Output Type Description
Power value in W float P|W

 

 

getpower_dBm( E )

Same as getpower_w( E ), but output is in dBm.