cosineFlattop

cosineFlattop

Works with all licenses.

Function for a flat top function with cosine ramps up and down.

cosineFlattop Parameters

direction (float vector)

Direction of the ramp (unit vector \({\bf \hat{u}}\) of gradient).

startPosition (float)

Value of \({\bf \hat{u}}\cdot {\bf x}\) at which the ramp starts.

startFlattop (float)

Value of \({\bf \hat{u}}\cdot {\bf x}\) at which the flat top starts.

endFlattop (float)

Value of \({\bf \hat{u}}\cdot {\bf x}\) at which the flat top ends.

endPosition (float)

Value of \({\bf \hat{u}}\cdot {\bf x}\) at which the ramp ends.

startAmplitude (float)

Amplitude for \({\bf \hat{u}}\cdot {\bf x}<startPosition\).

endAmplitude (float)

Amplitude for \({\bf \hat{u}}\cdot {\bf x}>endPosition\).

flattopAmplitude (float)

Amplitude for \(startFlattop<{\bf \hat{u}}\cdot {\bf x}<endFlattop\).

Example cosineFlattop Block

<STFunc cosFT>
  kind             = cosineFlattop
  direction        = [1.  0.  0.]
  startPosition    = 0.0
  startFlattop     = 0.1
  endFlattop       = 1.
  endPosition      = 1.
  startAmplitude   = 0.
  endAmplitude     = 0.
  flattopAmplitude = 1.0e9
</STFunc>