Polarisation

data_models.polarisation Module

Functions for defining polarisation conventions. These include definitions via classes and conversion functions.

For example:

stokes = numpy.array(random.uniform(-1.0, 1.0, [3, 4, 128, 128]))
ipf = PolarisationFrame('stokesIQUV')
opf = PolarisationFrame('circular')
cir = convert_pol_frame(stokes, ipf, opf)
st = convert_pol_frame(cir, opf, ipf)

or:

stokes = numpy.array([1, 0.5, 0.2, -0.1])
circular = convert_stokes_to_circular(stokes)

These function operate on Numpy arrays. These are packaged for use in Images. The Image functions are probably more useful.

Functions

congruent_polarisation(rec_frame, …)

Are these receptor and polarisation frames congruent?

convert_circular_to_stokes(circular[, polaxis])

Convert Circular to Stokes IQUV

convert_circular_to_stokesI(circular[, polaxis])

Convert Circular to Stokes I

convert_linear_to_stokes(linear[, polaxis])

Convert Linear to Stokes IQUV

convert_linear_to_stokesI(linear[, polaxis])

Convert Linear to Stokes I

convert_pol_frame(polvec, ipf, opf[, polaxis])

convert_stokes_to_circular(stokes[, polaxis])

Convert Stokes IQUV to Circular

convert_stokes_to_linear(stokes[, polaxis])

Convert Stokes IQUV to Linear

correlate_polarisation(rec_frame)

Gives the polarisation frame corresponding to a receptor frame

polmatrixmultiply(cm, vec[, polaxis])

Matrix multiply of appropriate axis of vec […,:] by cm

Classes

PolarisationFrame(name)

Define polarisation frames post correlation

ReceptorFrame(name)

Define polarisation frames for receptors