Okay, the calculation was correct but I found out that the behavior was not as expected because I was using twice more FFT bins than the window size.
with n_fft = win_size the above formula seem correct