allow usage of custom weight matrix synthesis

The custom function is called via function handle and with given option
struct.
add some parameters to function call