Module quantum_inferno.synth.doppler

This module contains functions for constructing and examining doppler shift in signals

Functions

def doppler_forward(tau_source_s: , signal_speed_mps: float, source_speed_mps: float, receiver_speed_mps: float, space_dimensions: int, source_position_vector_initial_xyz_m: , source_position_vector_final_xyz_m: , receiver_position_vector_initial_xyz_m: , receiver_position_vector_final_xyz_m: ) ‑> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Apply a doppler shift on a source moving towards the receiver

:param tau_source_s: array of source times in seconds :param signal_speed_mps: speed of the signal in meters per second :param source_speed_mps: speed of the source in meters per second :param receiver_speed_mps: speed of the receiver in meters per second :param space_dimensions: integer number of dimensions everything is moving in :param source_position_vector_initial_xyz_m: position in space where source initially started :param source_position_vector_final_xyz_m: position in space where source ends up :param receiver_position_vector_initial_xyz_m: position in space where receiver initially started :param receiver_position_vector_final_xyz_m: position in space where receiver ends up :return: array of receiver times in seconds, Magnitude of range and time, omega over omega center

def doppler_inverse(inv_time_receiver_s: , signal_speed_mps: float, source_speed_mps: float, receiver_speed_mps: float, space_dimensions: int, source_position_vector_initial_xyz_m: , source_position_vector_final_xyz_m: , receiver_position_vector_initial_xyz_m: , receiver_position_vector_final_xyz_m: ) ‑> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Apply a doppler shift on an inverse

:param inv_time_receiver_s: array of receiver times in seconds :param signal_speed_mps: speed of the signal in meters per second :param source_speed_mps: speed of the source in meters per second :param receiver_speed_mps: speed of the receiver in meters per second :param space_dimensions: integer number of dimensions everything is moving in :param source_position_vector_initial_xyz_m: position in space where source initially started :param source_position_vector_final_xyz_m: position in space where source ends up :param receiver_position_vector_initial_xyz_m: position in space where receiver initially started :param receiver_position_vector_final_xyz_m: position in space where receiver ends up :return: array of receiver times in seconds, Magnitude of range and time, omega over omega center

def hadamard_dot_product_mx(x_mx: numpy.ndarray, y_mx: numpy.ndarray) ‑> numpy.ndarray

Hadamard column-wise dot product with summation

:param x_mx: MxN matrix x, columns represent directional vectors :param y_mx: MxN matrix y :return: sum of matrix product over columns

def image_doppler_forward(tau_source_s: , signal_speed_mps: float, source_speed_mps: float, receiver_speed_mps: float, space_dimensions: int, source_position_vector_initial_xyz_m: , source_position_vector_final_xyz_m: , receiver_position_vector_initial_xyz_m: , receiver_position_vector_final_xyz_m: ) ‑> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Apply a doppler shift on a perceived source moving towards the receiver

:param tau_source_s: array of source times in seconds :param signal_speed_mps: speed of the signal in meters per second :param source_speed_mps: speed of the source in meters per second :param receiver_speed_mps: speed of the receiver in meters per second :param space_dimensions: integer number of dimensions everything is moving in :param source_position_vector_initial_xyz_m: position in space where source initially started :param source_position_vector_final_xyz_m: position in space where source ends up :param receiver_position_vector_initial_xyz_m: position in space where receiver initially started :param receiver_position_vector_final_xyz_m: position in space where receiver ends up :return: array of receiver times in seconds, Magnitude of range and time, omega over omega center

def image_doppler_inverse(inv_time_receiver_s: , signal_speed_mps: float, source_speed_mps: float, receiver_speed_mps: float, space_dimensions: int, source_position_vector_initial_xyz_m: , source_position_vector_final_xyz_m: , receiver_position_vector_initial_xyz_m: , receiver_position_vector_final_xyz_m: ) ‑> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Apply a doppler shift on an image inverse

:param inv_time_receiver_s: array of receiver times in seconds :param signal_speed_mps: speed of the signal in meters per second :param source_speed_mps: speed of the source in meters per second :param receiver_speed_mps: speed of the receiver in meters per second :param space_dimensions: integer number of dimensions everything is moving in :param source_position_vector_initial_xyz_m: position in space where source initially started :param source_position_vector_final_xyz_m: position in space where source ends up :param receiver_position_vector_initial_xyz_m: position in space where receiver initially started :param receiver_position_vector_final_xyz_m: position in space where receiver ends up :return: array of receiver times in seconds, Magnitude of range and time, omega over omega center

def range_hadamard(r_mx: numpy.ndarray) ‑> numpy.ndarray

Compute the magnitude of range and time (Square root of Hadamard dot product over columns)

:param r_mx: positional range matrix, 3-element XYZ columns, t rows :return: Square root of Hadamard dot product over columns

def range_matrix_sr(x_source_mx: numpy.ndarray, x_receiver_mx: numpy.ndarray) ‑> numpy.ndarray

start to end position, source vs receiver matrix

:param x_source_mx: starting position, 3-element XYZ columns, t rows :param x_receiver_mx: ending position, 3-element XYZ columns, t rows :return: receiver - source matrices

def range_scalar(x_source_vector: , x_receiver_vector: ) ‑> float

Compute the magnitude of the range (square root of the sum of the range vector squared, element-wise)

:param x_source_vector: starting position, 3-element XYZ :param x_receiver_vector: ending position, 3-element XYZ :return: magnitude of the range

def range_vector_sr(x_initial_position_vector: , x_final_position_vector: ) ‑> 

Start to end direction, or source vs receiver

:param x_initial_position_vector: starting position, 3-element XYZ :param x_final_position_vector: ending position, 3-element XYZ :return: receiver - source vectors

def space_4d_mx(space_column_vector: numpy.ndarray, time_number_samples: int) ‑> 

Input XYZ space vector and convert to spacetime matrix [time x XYZ]

:param space_column_vector: an array representing 3-dimensional space :param time_number_samples: number of time samples :return: spacetime matrix

def time_4d_mx(time_array: numpy.ndarray, space_dimensions: int) ‑> 

Input space and convert to spacetime matrix [time x XYZ] i.e. if time is [1, 2, 3, 4] and dimensions is 3 result is [[1, 1, 1], [2, 2, 2], [3, 3, 3], [4, 4, 4]]

:param time_array: array of times in seconds :param space_dimensions: integer number of dimensions of space :return: time_array arranged vertically space_dimensions number of times

def time_duration(time_vector: numpy.ndarray) ‑> float

Compute time from max and min

:param time_vector: array of times in seconds :return: duration in seconds