# sample_stf

Source: https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/sample_stf

```python
Graph.sample_stf(stf, sample_times, *, name=None)
```

Sample an Stf at the given times.

### Parameters
* **stf** ([*Stf*](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Stf.md#boulderopal.graph.Stf)) – The Stf to sample.
* **sample_times** (*np.ndarray*) – The times at which you want to sample the Stf. Must be ordered and contain
  at least one element.
* **name** (*str* *or* *None* *,* *optional*) – The name of the node.
### Returns
The values of the Stf at the given times.
### Return type
[Tensor](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor.md#boulderopal.graph.Tensor)

### SEE ALSO
[`Graph.constant_stf_operator`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/constant_stf_operator.md#boulderopal.graph.Graph.constant_stf_operator)
: Create a constant Stf operator.

[`Graph.discretize_stf`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/discretize_stf.md#boulderopal.graph.Graph.discretize_stf)
: Discretize an Stf into a Pwc.

[`Graph.identity_stf`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/identity_stf.md#boulderopal.graph.Graph.identity_stf)
: Create an Stf representing the identity function.

[`Graph.sample_pwc`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/sample_pwc.md#boulderopal.graph.Graph.sample_pwc)
: Sample a Pwc at given times.

## Notes

For more information on Stf nodes see the [Working with time-dependent functions in
Boulder Opal](https://docs.q-ctrl.com/boulder-opal/topics/working-with-time-dependent-functions-in-boulder-opal) topic.
