property galois.ReedSolomon.field : type[FieldArray]

The Galois field \(\mathrm{GF}(q)\) that defines the codeword alphabet.

Examples

Construct a \(\textrm{RS}(15, 9)\) code over \(\mathrm{GF}(2^4)\).

In [1]: rs = galois.ReedSolomon(15, 9); rs
Out[1]: <Reed-Solomon Code: [15, 9, 7] over GF(2^4)>

In [2]: rs.field
Out[2]: <class 'galois.GF(2^4)'>

In [3]: print(rs.field.properties)
Galois Field:
  name: GF(2^4)
  characteristic: 2
  degree: 4
  order: 16
  irreducible_poly: x^4 + x + 1
  is_primitive_poly: True
  primitive_element: x

Construct a \(\textrm{RS}(26, 18)\) code over \(\mathrm{GF}(3^3)\).

In [4]: rs = galois.ReedSolomon(26, 18, field=galois.GF(3**3)); rs
Out[4]: <Reed-Solomon Code: [26, 18, 9] over GF(3^3)>

In [5]: rs.field
Out[5]: <class 'galois.GF(3^3)'>

In [6]: print(rs.field.properties)
Galois Field:
  name: GF(3^3)
  characteristic: 3
  degree: 3
  order: 27
  irreducible_poly: x^3 + 2x + 1
  is_primitive_poly: True
  primitive_element: x