identity_stf

Graph.identity_stf()

Create an Stf representing the identity function, f(t) = t.

Returns

An Stf representing the identity function.

Return type

Stf

See also

constant_stf()

Create a batch of constant Stfs.

discretize_stf()

Discretize an Stf into a Pwc.

sample_stf()

Sample an Stf at given times.

Notes

For more information on Stf nodes see the Working with time-dependent functions in Boulder Opal topic.

Examples

Create Gaussian pulse.

>>> time = graph.identity_stf()
>>> time
<Stf: operation_name="identity_stf", value_shape=(), batch_shape=()>
>>> gaussian = graph.exp(- time ** 2)
>>> gaussian
<Stf: operation_name="exp", value_shape=(), batch_shape=()>

Refer to the How to perform model-based optimization with user-defined basis functions user guide to find the example in context.