Shape

Contents

Shape#

class pypulseqpp.io.Shape[source]#

Bases: object

One row of the shape library, as a file writes it.

The fields are those of the namespace upstream’s decompress_shape reads, so that function accepts a shape too.

Attributes:
  • num_samples (int) – Samples the shape stands for.

  • data (NDArray[np.float64]) – The values stored: the samples run-length encoded on their derivative when there are fewer of them than num_samples, the samples themselves when there are as many.

Methods

decompressed

Return the num_samples samples the shape stands for.

Attributes