Good morning,

I have a 2D array with a single numeric attribute. From this array I neeed to produce a new array containing the minimum value of the 8 surrounding cells and also the minimum’s realtive position. I know the minimum value can be obtained using the “window” function but I do not know how to get the relative position. By relative position I mean two integers which I can add to the current dimensions in order to obtain the dimensions of the minimum value respect to the current cell.

For example, the 2D array is something like this:

```
1 2 3
4 5 6
7 8 9
```

And the expected results are (min, rel_row, rel_col):

```
(2, 0, +1) (1, +0, -1) (2, 0, -1)
(1, -1, +0) (1, -1, -1) (2, -1, -1)
(4, -1, +0) (4, -1, -1) (5, -1, -1)
```

What is the best way to do this in SciDB?

Thanks!