@sebastienmarti to give you an idea how we do unit tests, at leas this is one way to do it. Here we test the function against tiny precomputed surrogates and spatial filters based in toy-data.