ACHMartin / seastar_project

4 stars 0 forks source link

Find a way to integrate Antenna dimension directly into compute_WASV #237

Open DavidMcCann-NOC opened 1 year ago

DavidMcCann-NOC commented 1 year ago

After an erroneous merge direction compute_WASV was altered to only accept Polarization in a narrow format. Now it has been reverted back, it has been decided to try and make the function Antenna-agnostic, so it can run without an Antenna dimension or with ATI data containing multiple look directions in the form of an Antenna dimension.

The current way to implement this is in an Antenna loop within compute_radial_surface_current or to use, e.g., list comprehension like:

rsc = [compute_radial_surface_current(ds_L1b[track].sel(Antenna=a), aux, gmf='mouche12') for a in antenna_ident] ds_L1b[track]['RadialSurfaceCurrent'] = xr.concat(rsc, 'Antenna',join='outer')

However this is not particularly readable.

Perform a test to find exactly where a multi-Antenna-dimension L1 dataset passed into compute_WASV really breaks, so far the likely candidates are in lines 144 to 150: L1, aux_geo = xr.align(L1, aux_geo, join="outer")

relative_wind_direction =\ seastar.utils.tools.compute_relative_wind_direction( aux_geo.WindDirection, L1.AntennaAzimuthImage )

Post potential fixes here before adding to the function to maintain the discussion