# Design FIR with linear phase response

What is the best way to design a FIR filter with a given linear phase response, such that each frequency inside the passband is phase shifted according to: $$H(f)=e^{i2\pi f k}$$ where $$k$$ is factor that I want to specify. I also want to specify the number of taps $$N$$. Note that the effective shift is bigger than the tap length $$N$$.

I don't really care about the bandwidth of the passband, but it has to be at least 1 MHz at a sampling of 100 MHz. The amplitude should be relatively flat inside the passband.

In python there is a lot of functions which allow me to specify a passband and how flat it is, but I have not found any way to control the phase according to my needs.

$$x(t-\tau) \Rightarrow e^{-j\omega \tau}$$
If you can live with $$k$$ being quantized you can simply use a single tap delay FIR filter. If you need more granularity you need to implement a fractional dealy. I would cascade a shot fractional FIR filter with a long single tab bulk delay filter.
If $$k$$ is positive the filter becomes a non-causal. The best way to deal with this depends a bit on your application. If you do off-line processing, you just need to delay all other signals paths by the same amount.