updated memd_flandrin_weights with version that has width argument