A tool to isolate locally correlated signals between two arrays

decorrelate-grids logo

Consider some image-like data (in the form of a “grid”, a labelled 2-D array) which can be explained at least in part by another observable. Suppose that this relationship is linear - or can be approximated as such - and varies spatially, with a spatial scale that is larger than the grid interval. Pending some other assumptions, we can invert this relationship in discrete windows: a rolling 2-D linear regression.

The resulting fit, in the form of an array of regression results, can be then subtracted from our original data, ideally isolating our signal of interest with no contribution from the explanatory variable.

This was designed with reduction of atmospheric delay in InSAR interferometric couples, which has a topography-dependent component. The method, however, can be trivially generalised to other applications - after all its nature is far from complex. All due credits for the idea to my colleague Marco Bartola - as of November 2022 a PhD candidate in the research unit I am doing a postdoc in - and to lots of inspiring conversations with him.

From the beginning, implementing this sounded quite fun to me, so after quickly setting up a working example for his project work I took it on as a spare-time collateral. This seemed a good opportunity to write a Python module and learn how to package it, while working on it at a slower pace - something which is unlikely to happen with my own research work. It is fun, and strict-sense fun should have no deadlines, even if I am doing it to incidentally learn something.

While I could not find anything ready made already available (if that is not the case, let me know!), the idea on its own is not novel. Some specific application could be novel, indeed, thus let’s hope this turns helpful for someone else’s purposes.

At the current “concept stage” (let’s tag it as v0.0.1-alpha) it is a working prototype. Clone it, create its conda environment, and call it as a shell script. A help printout for arguments (using argparse) can be accessed with flag -h. Being a prototype, the next changes are likely to break current behaviour and syntax.

Head over to the repository for any further information: apasto/decorrelate-grids.

Tags: