chirp#

Creates a real chirp signal (swept-frequency cosine)

template<typename TimeType, typename FreqType>
inline auto matx::chirp(index_t num, TimeType last, FreqType f0, TimeType t1, FreqType f1, ChirpMethod method = ChirpMethod::CHIRP_METHOD_LINEAR)#

Creates a chirp signal (swept-frequency cosine)

Creates a linearly-spaced sequence from 0 to “last” with “num” elements in between. Each step is of size 1/num.

Template Parameters:
  • FreqType – Frequency data type

  • TimeType – Type of time vector

  • Method – Chirp method (CHIRP_METHOD_LINEAR)

Parameters:
  • num – Number of time samples

  • last – Last time sample value

  • f0 – Instantenous frequency at time 0

  • t1 – Time for f1

  • f1 – Frequency (Hz) at time t1

  • method – Method to use to generate the chirp

Returns:

The chirp operator

template<typename SpaceOp, typename FreqType>
inline auto matx::chirp(SpaceOp t, FreqType f0, typename SpaceOp::value_type t1, FreqType f1, ChirpMethod method = ChirpMethod::CHIRP_METHOD_LINEAR)#

Creates a real chirp signal (swept-frequency cosine)

SpaceOp provides the time vector with custom spacing.

Template Parameters:
  • FreqType – Frequency data type

  • SpaceOp – Operator type of spacer

Parameters:
  • t – Vector representing values in time

  • f0 – Instantenous frequency at time 0

  • t1 – Time for f1

  • f1 – Frequency (Hz) at time t1

  • method – Chirp method (CHIRP_METHOD_LINEAR)

Returns:

The chirp operator

Examples#

auto t1 = make_tensor<TestType>({count});
// Create a chirp of length "count" and assign it to tensor "t1"
(t1 = chirp(count, end, f0, end, f1)).run(exec);

cchirp#

Creates a complex chirp signal (swept-frequency cosine)

template<typename TimeType, typename FreqType>
inline auto matx::cchirp(index_t num, TimeType last, FreqType f0, TimeType t1, FreqType f1, ChirpMethod method = ChirpMethod::CHIRP_METHOD_LINEAR)#

Creates a complex chirp signal (swept-frequency cosine)

Creates a linearly-spaced sequence from 0 to “last” with “num” elements in between. Each step is of size 1/num.

Template Parameters:
  • FreqType – Frequency data type

  • TimeType – Type of time vector

  • Method – Chirp method (CHIRP_METHOD_LINEAR)

Parameters:
  • num – Number of time samples

  • last – Last time sample value

  • f0 – Instantenous frequency at time 0

  • t1 – Time for f1

  • f1 – Frequency (Hz) at time t1

  • method – Method to use to generate the chirp

Returns:

The chirp operator

template<typename SpaceOp, typename FreqType>
inline auto matx::cchirp(SpaceOp t, FreqType f0, typename SpaceOp::value_type t1, FreqType f1, ChirpMethod method = ChirpMethod::CHIRP_METHOD_LINEAR)#

Creates a complex chirp signal (swept-frequency cosine)

SpaceOp provides the time vector with custom spacing.

Template Parameters:
  • FreqType – Frequency data type

  • SpaceOp – Operator type of spacer

Parameters:
  • t – Vector representing values in time

  • f0 – Instantenous frequency at time 0

  • t1 – Time for f1

  • f1 – Frequency (Hz) at time t1

  • method – Chirp method (CHIRP_METHOD_LINEAR)

Returns:

The chirp operator

Examples#

auto t1c = make_tensor<cuda::std::complex<TestType>>({count});
// Create a complex chirp of length "count" and assign it to tensor "t1"
(t1c = cchirp(count, end, f0, end, f1, ChirpMethod::CHIRP_METHOD_LINEAR)).run(exec);