ACHMartin / seastar_project

4 stars 0 forks source link

Multi-beam implementation of compute_wasv #211

Closed DavidMcCann-NOC closed 1 year ago

DavidMcCann-NOC commented 1 year ago

Changes to compute_wasv and compute_radial_surface_current to accept the full beam-merged level1 dataset. Not currently tested for yurovsky but identical results obtained for mouche as previous implementation.

DavidMcCann-NOC commented 1 year ago

To address issue #206

ACHMartin commented 1 year ago

I didn't think about this yesterday for compute_nrcs, but as it is implemented with this new version, we can't use compute_nrcs or compute_wasv if we don't have an Antenna dimension. After discussion: 1st step/solution, to put a dimension string as input of the function (in our case it will be Antenna), how does it work if we only have a 2D field? 2nd step/solution, to have a function agnostic of dimension. I think the main issue is from xr.align(L1,geo), perhaps we can just test the data are aligned and raised issue if it is not the case, but not aligning within the function.

DavidMcCann-NOC commented 1 year ago

Perhaps a good way to implement this would be to have the wasv and nrcs computations work on DataArrays, with whatever function that calls them (e.g. compute_radial_surface_current) do the dimension wrangling. I've been working on this for a couple of hours and can make the dimension compute_wasv runs over dimension-agnostic but can't get it to do both that and work on just data arrays (0th dimension, essentially) without an if and repeating the code all over again for the different case.

ACHMartin commented 1 year ago

Perhaps a good way to implement this would be to have the wasv and nrcs computations work on DataArrays, with whatever function that calls them (e.g. compute_radial_surface_current) do the dimension wrangling. I've been working on this for a couple of hours and can make the dimension compute_wasv runs over dimension-agnostic but can't get it to do both that and work on just data arrays (0th dimension, essentially) without an if and repeating the code all over again for the different case.

In this case, perhaps the code you need to repeat can be a sub-function. We might discuss the code together on Friday if you wish

ACHMartin commented 1 year ago

what is the status of this? Are you ready to deploy it? Thanks

DavidMcCann-NOC commented 1 year ago

what is the status of this? Are you ready to deploy it? Thanks

I think its good to merge, it works in the current 'Antenna' environment we're operating in but will need some more work to make it fully dimension agnostic

ACHMartin commented 1 year ago

Perhaps a good way to implement this would be to have the wasv and nrcs computations work on DataArrays, with whatever function that calls them (e.g. compute_radial_surface_current) do the dimension wrangling. I've been working on this for a couple of hours and can make the dimension compute_wasv runs over dimension-agnostic but can't get it to do both that and work on just data arrays (0th dimension, essentially) without an if and repeating the code all over again for the different case.

The code as it is, is not dimension-agnostic. Antenna is mentioned. Did you forget to push a commit?

ACHMartin commented 1 year ago

Could you please solve the LookDirection issue #204 with this merge request? Thanks

DavidMcCann-NOC commented 1 year ago

Perhaps a good way to implement this would be to have the wasv and nrcs computations work on DataArrays, with whatever function that calls them (e.g. compute_radial_surface_current) do the dimension wrangling. I've been working on this for a couple of hours and can make the dimension compute_wasv runs over dimension-agnostic but can't get it to do both that and work on just data arrays (0th dimension, essentially) without an if and repeating the code all over again for the different case.

The code as it is, is not dimension-agnostic. Antenna is mentioned. Did you forget to push a commit?

I'm either living in some sort of fever dream or I've somehow managed to write a day's worth of code, fail to commit it and then loose it to the ether. You're right - its not dimension agnostic, but the code I appear to have lost was....

ACHMartin commented 1 year ago

I'm either living in some sort of fever dream or I've somehow managed to write a day's worth of code, fail to commit it and then loose it to the ether. You're right - its not dimension agnostic, but the code I appear to have lost was....

Could it be on a different branch?

DavidMcCann-NOC commented 1 year ago

I'm either living in some sort of fever dream or I've somehow managed to write a day's worth of code, fail to commit it and then loose it to the ether. You're right - its not dimension agnostic, but the code I appear to have lost was....

Could it be on a different branch?

I've only been working on two and I've checked both. Unfortunately it seems to have fallen through the cracks which is incredibly frustrating. Thankfully I remember the structure of what i implemented so it shouldn't take too long to re-do, but perhaps when we talk next we will think up a better way of implementing this anyway