What is the best way of filtering EEG signal for the specific frequency band? I have an EEG data with a sampling rate is 500 Hz. Actually, there are too many ways to filter EEG signals. However, the abundance of options is not valid for me. I have to use a causal, linear-phase FIR filter with a small group delay as possible. I also want to -3dB attenuation at cut- off frequencies.
The problem arises at this point.  Look at the figure below.

I applied 30th order FIR filter (hamming window 4-30 Hz) on the continuous (non-epoched) EEG. The side-lobe attenuation for higher frequencies is satisfactory but the lower frequency components for this filter failed.
I don't want to use rectangular window because of relatively low side-lobe attenuation. How can I design ideal filter to make possible my intention?
Perhaps you should try some of the filter design tools that are available online.
You can define the required filter behavior (Cutoff frequency, Ripple ..) and you will get a design solution that fits your needs.
This kind of tools will help you know what is possible to achieve in terms of filtering performance given the constraints that you detailed
Checkout the following ones ( this is not an exhaustive list) :
http://t-filter.engineerjs.com/
https://webench.ti.com/filter-design-tool/filter-response
Best regards,
Mourad