property galois.BCH.field : type[FieldArray]

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

Examples

Construct a binary \(\textrm{BCH}(15, 7)\) code.

In [1]: bch = galois.BCH(15, 7); bch
Out[1]: <BCH Code: [15, 7, 5] over GF(2)>

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

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

Construct a \(\textrm{BCH}(26, 14)\) code over \(\mathrm{GF}(3)\).

In [4]: bch = galois.BCH(26, 14, field=galois.GF(3)); bch
Out[4]: <BCH Code: [26, 14, 7] over GF(3)>

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

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