sample_wave#
- pulserver.ir.sample_wave()[source]#
Return a wave as a playout loads it into a region, normalised to unit peak.
waveis the subsequence and the wave’s index there, asplay()reports it, andregionone thatplan_waves()lays out. The wave is sampled at the centres of the region’ssamplesraster intervals from itsstart_us, linear between the pointsplay()plays it through and zero outside them.- Parameters:
seq_path (Path | str) – The first file of the chain; the cache is the file beside it.
region (dict[str, Any]) – One region of the layout
plan_waves()returns.budget (WaveBudget) – The budget the layout was planned for; its
raster_usis the sampling interval.cache_ext (str, default='.pseg') – Extension of the cache, dot included.
- Returns:
(3, samples), along x, y and z; zero on an axis the wave does not drive.- Return type:
ndarray
- Raises:
ValueError – If the cache cannot be loaded or holds no such wave.