icebear¶
icebear.utils¶
-
icebear.utils.baselines(x, y, z, wavelength)[source]¶ Given relative antenna positions in cartesian coordinates with units of meters and the wavelength in meters determines the u, v, w baselines in cartesian coordinates.
- Parameters
x (float np.array) – East-West antenna coordinate in meters.
y (float np.array) – North-South antenna coordinate in meters.
z (float np.array) – Altitude antenna coordinate in meters.
wavelength (float) – Radar signal wavelength in meters.
- Returns
u (float np.array) – East-West baseline coordinate divided by wavelength.
v (float np.array) – North-South baseline coordinate divided by wavelength.
w (float np.array) – Altitude baseline coordinate divided by wavelength.
Notes
Given N antenna then M=N(N-1)/2 unique baselines exist.
M baselines can include conjugates and a origin baseline for M_total = M*2 + 1.
- Todo
Makes options to include or disclude 0th baseline and conjugates.
Make array positions load from the calibration.ini file.
Error handling for missing antenna position values (like no z).
-
icebear.utils.fov_window(coeffs, resolution=array([0.1, 0.1]), azimuth=array([225.0, 315.0]), elevation=array([90.0, 110.0]))[source]¶ Set the field-of-view (fov) for a coefficients set. A narrower fov will result in faster run times.
- Parameters
coeffs (complex64 np.array) – Array of pre-calculated SWHT coefficents for full sphere.
resolution (float np.array) – [Azimuth, Elevation] resolution with minimum 0.1 degrees.
azimuth (float np.array) – [[start, stop],…] angles within 0 to 360 degrees.
elevation (float np.array) – [[start, stop],…] angles within 0 to 180 degrees.
- Returns
fov_coeffs (complex64 np.array) – Array of pre-calculated SWHt coefficients for FOV.
Notes
All azimuth field of view zones must have a corresponding elevation zone specified.
It is advised to specify field of view zones slightly larger than required.
Azimuth and elevation resolution are best kept equal.
Boresight is at 270 degrees azimuth and 90 degrees elevation.
- todo
function is not complete DO NOT USE.
-
icebear.utils.get_all_data_files(directory, start_subdir='nodate', stop_subdir='nodate')[source]¶ Given a directory, reads all sub directories to find hdf5 files and returns paths, start times, and stop times.
- Parameters
directory –
start_subdir –
stop_subdir –
- Returns
times
Note
This is intended to be used for batching large data sets.
-
icebear.utils.get_data_file_times(filepath)[source]¶ Given an HDF5 file path this return the start and stop times.
- Parameters
filepath –
-
icebear.utils.rtp_to_uvw(r, t, p)[source]¶ Converts radius, theta, phi spherical baseline coordinates to u, v, w cartesian coordinates.
- Parameters
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
u (float np.array) – East-West baseline coordinate divided by wavelength.
v (float np.array) – North-South baseline coordinate divided by wavelength.
w (float np.array) – Altitude baseline coordinate divided by wavelength.
-
icebear.utils.uvw_to_rtp(u, v, w)[source]¶ Converts u, v, w cartesian baseline coordinates to radius, theta, phi spherical coordinates.
- Parameters
u (float np.array) – East-West baseline coordinate divided by wavelength.
v (float np.array) – North-South baseline coordinate divided by wavelength.
w (float np.array) – Altitude baseline coordinate divided by wavelength.
- Returns
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.