ComplexMath

About the ComplexMath class

The WaveBlocks Project

@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License

Class documentation

The WaveBlocks Project

Some selected functions for complex math.

@author: R. Bourquin @copyright: Copyright (C) 2011 R. Bourquin @license: Modified BSD License

ComplexMath.cont_angle(data, reference=None)[source]

Compute the angle of a complex number not constrained to the principal value and avoiding discontinuities at the branch cut.

Parameters:
  • data – An array with the input data.
  • reference – This value allows the specify the starting point for continuation explicitely. It can be used together with data beeing a single number.

Note

This function just applies ‘continuate(.)’ to the complex phase.

ComplexMath.cont_sqrt(data, reference=None)[source]

Compute the complex square root (following the Riemann surface) yields a result not constrained to the principal value and avoiding discontinuities at the branch cut.

Parameters:
  • data – An array with the input data.
  • reference – This value allows the specify the starting point for continuation explicitely. It can be used together with data beeing a single number.

Note

This function applies ‘continuate(.)’ to the complex phase and computes the complex square root according to the formula \sqrt{z} = \sqrt{r} \cdot \exp \left( i \cdot \frac{\phi}{2} \right)

ComplexMath.continuate(data, jump=6.283185307179586, reference=0.0)[source]

Make the given data continuous by removing all jumps of size k*jump but not touching jumps of any other size. This can be used to overcome issues with the branch cut along the negative axis.

Parameters:
  • data – An array with the input data.
  • jump – The basic size of jumps which will be removed. Default is 2*pi.
  • reference – This value allows the specify the starting point for continuation explicitely. It can be used together with data beeing a single number.

Note

There may be issues with jumps that are of size nearly k*jump.

Table Of Contents

Previous topic

Welcome to WaveBlocks’s documentation!

Next topic

MatrixExponential

This Page