trajectory#

Define functions for modifying trajectories.

tike.trajectory.coded_exposure(theta, v, h, time, dwell, c_time, c_dwell)[source]#

Return the intersection of a scanning procedure and coded exposure.

Given a series of discrete measurements with time and duration (dwell) and series of coded exposures, the measurments are adjusted to only include measurements that fit under the masks. The measurements are also reordered and bundled by which code they fit into.

Measurements and codes must be ordered monotonically increasing by time i.e. time[1] >= time[0].

Essentially this function bins the measurements into the time codes, but if a measurement covers multiple bins, then it is put into all of them.

Parameters
  • theta (numpy.array (M, )) – The position of each ray at each measurement.

  • v (numpy.array (M, )) – The position of each ray at each measurement.

  • h (numpy.array (M, )) – The position of each ray at each measurement.

  • dwell (numpy.array (M, )) – The duration and start time of each measurement.

  • time (numpy.array (M, )) – The duration and start time of each measurement.

  • c_time – The start and extent of each exposure.

:param c_dwell numpy.array (N: The start and extent of each exposure. :param ): The start and extent of each exposure.

Returns

  • theta1, v1, h1, time1, dwell1 numpy.array (M, ) – New position and time coordates which fit into the code.

  • bundles (numpy.array (N, )) – The starting index of each coded bundle.

tike.trajectory.discrete_trajectory(trajectory, tmin, tmax, xstep, tstep, tkwargs=None)[source]#

Create a linear approximation of trajectory between tmin and tmax.

The space between measurements is less than xstep and the time between measurements is less than tstep.

Parameters
  • trajectory (function(time, **tkwargs) -> theta, v, h) – A continuous function taking a single 1D array and returning three 1D arrays.

  • [tmin (float) – The start and end times.

  • tmax) (float) – The start and end times.

  • xstep (float) – The maximum spatial step size.

  • tstep (float) – The maximum time step size.

Returns

  • theta, v, h ((N,) vectors [m]) – Discrete measurement positions along the trajectory satisfying constraints.

  • dwell ((N,) vector [s]) – The time spent at each position before moving to the next measurement.

  • time ((N,) vector [s]) – Discrete times along trajectory satisfying constraints.