### pypho v1

#### 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 bits 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.
bits 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

constpts_* = [( [1.0]*16),
([2.0*np.pi*x/16.0 for x in range(0,16)]),
(colors.values()[x] for x in range(0,16)]),
([x for x in range(0,16)]),
([(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)],
)]

The first array in constpts_* defines the absolute value and the second array the phase of the constellation point.
The third array defines a color code of each constellation point. This array is only for plotting a constellation diagram so that each point has a defined color.
The fourth array is a identification number of each point. The last array defines the bitsequence of 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 bits defines bitsequence which has to be modulated. It is an multidimensial array:
bits = [bits_x, bits_y], where bits_x and bits_y define the bitsequence of the X- and the Y-polarisation. If only bitsequence_x is set, bitsequence_y = bitsequence_x is defined by the module.