### pypho v3

#### pypho_arbmod

Generic signal modulator for arbitrary modulation formats.

pypho_arbmod.__init__(glova)

Instantiation and parameter setting. All parameters have to be set after ___call___, as the input parameter symbols are generated by other moduls.

Parameter Type Description
glova instance Global parameters

Output Type Description
User defined variable pypho_arbmod.pypho_arbmod

pypho_arbmod.__call__(E, constpoints, bits

Parameter Type Description
E list List in which the optical data and noise signal are defined. Read here about data signal and noise representation
The optical input signal should be a pulse comb. See example below.
constpoints array Defines the constellation points.
No default value.
Further information below.
symbols array Defines the bit sequence which is modulated.
No default value.

Output Type Description
User defined variable list Returns a list in which the optical data and noise signal are defined. Read here about data signal and noise representation.

The parameter constpoints defines the constellation points. It is an multidimensial array:
constpoints = [constpoints_x, constpoints_y], where constpoints_x and constpoints_y define the constellation points of the X- and the Y-polarisation. constpoints_* is another multidimensional array. For example

# 16-QAM
alpha = np.arctan(np.sqrt(1.0)/3.0)
constpts_16qam_x = [( [np.sqrt(3.0**2 + 1.0)]*8 + [np.sqrt(2.0)]*4 + [np.sqrt(2*3.0**2)]*4),
( [2.0*np.pi*x/4.0+alpha for x in range(0,4)] + [2.0*np.pi*x/4.0+np.pi-alpha for x in range(0,4)] + [2.0*np.pi*x/4.0+np.pi/4 for x in range(0,8)] ),

([(0),(0),(0),(0)], [(0),(0),(0),(1)], [(0),(0),(1),(0)], [(0),(0),(1),(1)], [(0),(1),(0),(0)], [(0),(1),(0),(1)], [(0),(1),(1),(0)], [(0),(1),(1),(1)],
[(1),(1),(1),(1)], [(1),(1),(1),(0)], [(1),(1),(0),(1)], [(1),(1),(0),(0)], [(1),(0),(1),(1)], [(1),(0),(1),(0)], [(1),(0),(0),(1)], [(1),(0),(0),(0)]
)]  # codes not optimized! 

The first array in constpts_16qam_x defines the constellation point as a complex number (for I and Q).
The second array defines the bitsequence wich represents each constellation point.
The figure shows the onstellation diagram as defined in the example above.

Fig. 1 : Constellation diagramme of the X- and Y-polarisation plane.

The parameter symbols defines symbol sequence which has to be modulated. It is an multidimensial array:
symbols = [symbol_x, symbol_y], where symbol_x and symbol_y define the symbol sequence of the X- and the Y-polarisation. If only symbol_x is set, symbol_y = symbol_x is defined by the module.