Package pygeodesy :: Package auxilats :: Module auxDST :: Class AuxDST
[frames] | no frames]

Class AuxDST

object --+
         |
        AuxDST

Discrete Sine Transforms (DST) for Auxiliary Latitudes.


See Also: Karney's C++ class DST.

Instance Methods
 
__init__(self, N)
New AuxDST instance.
 
refine(self, f, F)
Double the number of sampled points on a Fourier series.
 
reset(self, N)
Reset this DST.
 
transform(self, f)
Compute N terms in the Fourier series.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods
 
evaluate(sinx, cosx, F, *N)
Compute the Fourier sum given the sine and cosine of the angle, using Clenshaw summation sum(F[i] * sin((2*i+1) * x)) for i in range(min(len(F), *N)).
 
integral(sinx, cosx, F, *N)
Compute the integral of Fourier sum given the sine and cosine of the angle using Clenshaw summation -sum(F[i] / (2*i+1) * cos((2*i+1) * x)) for i in range(min(len(F), *N)).
Properties
  N
Get this DST's size, number of points (int).

Inherited from object: __class__

Method Details

__init__ (self, N)
(Constructor)

 

New AuxDST instance.

Arguments:
  • N - Size, number of points (int).
Overrides: object.__init__

evaluate (sinx, cosx, F, *N)
Static Method

 

Compute the Fourier sum given the sine and cosine of the angle, using Clenshaw summation sum(F[i] * sin((2*i+1) * x)) for i in range(min(len(F), *N)).

Arguments:
  • sinx - The sin(sigma) (float).
  • cosx - The cos(sigma) (float).
  • F - The Fourier coefficients (float[]).
  • N - Optional, (smaller) number of terms to evaluate (int).
Returns:
Precison Clenshaw sum (float).

See Also: Methods AuxDST.integral and AuxDST.integral2.

integral (sinx, cosx, F, *N)
Static Method

 

Compute the integral of Fourier sum given the sine and cosine of the angle using Clenshaw summation -sum(F[i] / (2*i+1) * cos((2*i+1) * x)) for i in range(min(len(F), *N)).

Arguments:
  • sinx - The sin(sigma) (float).
  • cosx - The cos(sigma) (float).
  • F - The Fourier coefficients (float[]).
  • N - Optional, (smaller) number of terms to evaluate (int).
Returns:
Precison Clenshaw intergral (float).

See Also: Methods AuxDST.evaluate and AuxDST.integral2.

refine (self, f, F)

 

Double the number of sampled points on a Fourier series.

Arguments:
  • f - Single-argument function (callable(sigma) with sigma = j * PI_4 / N for j in range(1, N*2, 2).
  • F - The initial Fourier series coefficients (float[:N]).
Returns:
Fourier series coefficients (float[:N*2]).

reset (self, N)

 

Reset this DST.

Arguments:
  • N - Size, number of points (int).
Returns:
The new size (int, non-negative).

transform (self, f)

 

Compute N terms in the Fourier series.

Arguments:
  • f - Single-argument function (callable(sigma) with sigma = i * PI_2 / N for i in range(1, N + 1).
Returns:
Fourier series coefficients (float[:N]).

Property Details

N

Get this DST's size, number of points (int).

Get method:
N(self) - Get this DST's size, number of points (int).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.