dipetkov / eems

Estimating Effective Migration Surfaces
GNU General Public License v2.0
102 stars 28 forks source link

Using non Euclidean distances #53

Open cd-barratt opened 3 years ago

cd-barratt commented 3 years ago

Hello Desislava,

Would there be a way to feed EEMS a pre-defined distance matrix rather than have the program calculate it itself? We are using the program for marine plants dispersed by sea currents so Euclidean distances between two points are not suitable (i.e. straight lines between points overlap land areas like peninsulas, which is an unrealistic distance measure given we know they cannot disperse over land).

Thanks, Chris Barratt

dipetkov commented 3 years ago

The other distance metric is the geodesic but that will have the same issue as the Euclidean distance.

Instead what about providing a specially constructed population grid? The distance between vertices in the grid is still computed in terms of the Euclidean/geodesic but the configuration of the grid itself is "distorted" in a meaningful way?

Or simply remove demes that fall on land (i.e. make a "hole" in the population grid). This can also be achieved by providing a custom population grid with the gridpath optional argument. The only requirement is that the grid is connected.