radarx.level1.iq.as_iq#

radarx.level1.iq.as_iq(i, q=None, *, dims=('azimuth', 'pulse', 'range'), scale=1.0, wavelength=None, prt=None, range_start=0.0, gate_spacing=None, name='IQ')[source]#

Complex IQ array from the in-phase and quadrature samples.

Parameters:
  • i (array_like or xarray.DataArray) – The in-phase samples, or the complex samples if q is not given.

  • q (array_like or xarray.DataArray, optional) – The quadrature samples, with the shape of i.

  • dims (sequence of str, optional) – Dimension names of NumPy input, in the order of the axes. The default ("azimuth", "pulse", "range") is for a 3-D array; use ("pulse", "range") or ("pulse",) for fewer axes. The dimensions of a DataArray are kept.

  • scale (float, optional) – Factor for integer counts (for example 1 / 32768 for 16 bit samples). Default 1.

  • wavelength (float, optional) – Radar wavelength (m), stored in the attributes.

  • prt (float, optional) – Pulse repetition time (s), stored in the attributes.

  • range_start (float, optional) – Range of the first gate (m), used with gate_spacing. Default 0.

  • gate_spacing (float, optional) – Distance between the gates (m). With it the array gets a range coordinate; without it, none.

  • name (str, optional) – Name of the array. Default "IQ".

Returns:

xarray.DataArray – Complex samples, complex64 (complex128 for double precision input), with a pulse coordinate and the wavelength and prt attributes.

Raises:

ValueError – If i and q differ in shape, the number of dims differs from the number of axes, or the data are not 1-D, 2-D or 3-D without dimension names.