SampleTimes

class qugradlab.pulses.sampling.SampleTimes(**kwargs)[source]

Bases: object

Allows for easy generation of equally spaced sample times from a variety of input data

Attributes

T

The total time.

dt

The time step.

number_sample_points

The number of sample times between 0 and T.

t

An array of the sample times

Methods

__init__

Initialises an instance of SampleTimes.

__init__(**kwargs)[source]

Initialises an instance of SampleTimes. Exactly two of the three optional keyword arguments must be passed.

Parameters:
  • T (float, optional) – The total time.

  • dt (float, optional) – The time step.

  • number_sample_points (int, optional) – The number of sample times between 0 and T.

Raises:
  • TypeError – Raised when more or less than two keyword arguments are provided.

  • TypeError – Raised when a keyword arguement other than T, dt, or number_sample_points is passed.

property T: float

The total time. If updated, so is dt while number_sample_points is kept constant.

property dt: float

The time step. If updated, so is T while number_sample_points is kept constant.

property number_sample_points: int

The number of sample times between 0 and T. If updated, so is dt while T is kept constant.

property t: ndarray[float64]

An array of the sample times