ldeo-glaciology / xapres

package for processing ApRES data using xarray
MIT License
3 stars 2 forks source link

add polarmetric processing #32

Open jkingslake opened 9 months ago

jkingslake commented 9 months ago

prompted by @Elizabethcase's work on polarmetric data from Thwiates, and a comment by @benhills (copied below), this issue is adding polarmetric processing. Some coonsiderations

Comments from Ben Hills:

I am also wondering about the processing flow for polarimetry data. I was looking and couldn't find much but please point me toward it if it is already here or you are working on adding it.

Ultimately, I think it would be useful to have 2 separate options for processing polarimetry data. First, is very similar to the interferometry processing, would use the same coherence function like line 562 in ApRESDefs.py (Young et al., 2021; Ershadi et al., 2022). The second would be a co-registration method like Zeising et al. (2023).

I would love to contribute some code that I already have for this stuff if it is useful.
benhills commented 9 months ago

There is an ImpDAR branch with polarimetric processing scripts in Python. It is a bit of a mess, but you should feel welcome to steal anything you want from there, or I am happy to help move it over.

A while ago I changed the impdar ApRES structure to have three separate data objects: 1) single acquisition, 2) time difference (interferometry), 3) quadpol (polarimetry). This is the script with the polarimetry processing functions. https://github.com/benhills/ImpDAR/blob/quadpol/impdar/lib/ApresData/_QuadPolProcessing.py

The co-registration method I have written out myself as well, but it is just in a scratch space Jupyter Notebook.

jkingslake commented 8 months ago

This is great @benhills , thank you!

One thing that we could do pretty quickly is to incorporate a version of your polarmetric processing scripts (I think they are here, right?) into XApRES as 'bound methods' that we add to xarray.datasets, as we load polarmetric data. Much in the same way that we as db and sonify currently. This is actually going to change very slightly once #35 is merged, so I can update here once that is done with links to the places in the code.

What do you think?

benhills commented 8 months ago

That is the correct script, yes.

I think incorporating as bound methods is great. It would take me some time to figure out how to make them compatible with the broader framework, so if you have ideas on how to do that quickly feel free to steal whatever is useful and manipulate however you see fit. If you would like me to take some time looking at it and thinking about how best to incorporate please just let me know and I am happy to.