icebear.imaging¶
icebear.imaging.image¶
-
icebear.imaging.image.append_level2_hdf5(filename, hour, minute, second, doppler_shift, snr_db, rf_distance)[source]¶ Appends to the hdf5 the standard data sets.
- Parameters
filename –
hour –
minute –
second –
doppler_shift –
snr_db –
rf_distance –
icebear.imaging.swht¶
-
icebear.imaging.swht.brightness_cutoff(brightness, threshold=0.5)[source]¶ Given a Brightness array this normalizes then removes noise in the image below a power threshold. The default threshold is 0.5 (3 dB).
- Parameters
brightness –
threshold –
-
icebear.imaging.swht.calculate_coeffs(filename, az, el, ko, r, t, p, lmax=85)[source]¶ Makes an array containing all the factors that do not change with Visibility values. This array can then be saved to quickly create Brightness values given changing Visibilities. The array is then stored as a HDF5 file.
- Parameters
filename (string) – Filename and path to the HDF5 file the calculated coefficients are to be appended.
az (float np.array) – An array of azimuth angles in radians to calculate coefficients for.
el (float np.array) – An array of elevation angles in radians to calculate coefficients for.
lmax (int) – The maximum harmonic degree.
ko (float) – Radar signal wave number, ko = 2pi/wavelength.
r (float np.array) – Radius baseline coordinate divided by wavelength.
t (float np.array) – Theta (elevation) baseline coordinate.
p (float np.array) – Phi (azimuthal) baseline coordinate.
- Returns
None
Notes
Maximum harmonic degree is Lmax = 85. Above this scipy crashes due to an overflow error. The potential fix is to scale the initial Pmm of the recursion by 10^280 sin^m (theta), and then rescale everything back at the end.
Holmes, S. A., and W. E. Featherstone, A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions, J. Geodesy, 76, 279- 299, doi:10.1007/s00190-002-0216-2, 2002.
-
icebear.imaging.swht.centroid_center(brightness)[source]¶ Given a Brightness array this returns the centroid as x, y index of the array and the area of the largest blob that encloses the maximum power pixel.
- Parameters
brightness –
- Returns
cx
cy
cx_extent
cy_extent
area
-
icebear.imaging.swht.create_coeffs(filename, date_created, array_name, fov, resolution, lmax, wavelength, baselines)[source]¶
-
icebear.imaging.swht.generate_coeffs(config, fov=array([[0, 360], [0, 90]]), resolution=1.0, lmax=85)[source]¶ Makes an array containing all the factors that do not change with Visibility values. This array can then be saved to quickly create Brightness values given changing Visibilities. The array is then stored as a HDF5 file.
- Parameters
config (Class Object) – Config class instantiation.
fov (float np.array) – [[start, stop], [start, stop]] azimuth, elevation angles within 0 to 360 and 0 to 180 degrees.
resolution (float) – Angular resolution in degree per pixel.
lmax (int) – The maximum harmonic degree.
- Returns
None
Notes
The array file must contain: wavelength : float
Radar signal wavelength in meters.
- ufloat np.array
East-West baseline coordinate divided by wavelength.
- vfloat np.array
North-South baseline coordinate divided by wavelength.
- wfloat np.array
Altitude baseline coordinate divided by wavelength.
-
icebear.imaging.swht.max_center(brightness)[source]¶ Given a Brightness array this returns the x, y index of the array of the brightest point.
- Parameters
brightness –
- Returns
cx
cy
area
-
icebear.imaging.swht.swht_cuda()[source]¶ Wrapper to implement the spherical wave harmonic transform (Carozzi, 2015) in CUDA.
- Parameters
visibilities (complex64 np.array) – Data cross-correlation values.
coeffs (complex64 np.array) – Array of pre-calculated SWHT coefficients.
- Returns
intensity (complex64 np.array) – Array of image domain intensity values.
-
icebear.imaging.swht.swht_method(visibilities, coeffs, resolution, fov, fov_center)[source]¶ - Parameters
visibilities –
coeffs –
resolution –
fov –
fov_center –
-
icebear.imaging.swht.swht_py(visibilities, coeffs)[source]¶ Apply a spherical wave harmonic transforms (Carozzi, 2015) to the given visibility values using the pre-calculated transform coefficients.
- Parameters
visibilities (complex64 np.array) – Data cross-correlation values.
coeffs (complex64 np.array) – Array of pre-calculated SWHT coefficients.
- Returns
brightness (complex64 np.array) – Array of image domain intensity values.
Notes
The coeffs is calculated for a specific antenna array pattern and wavelength. The visibilities must be from the matching coeffs.
np.matmul method is faster than CUDA for array size less than 10e6.