hi samar,
An ideal 'black' filter is actually a filter that will only allow thru the IR frequencies. Light frequencies outside the pass band will be blocked.
The square wave you are using is considered an 'ac' signal, the ambient light
can be considered as a 'dc' signal, as normally it changes very slowly.
So if you 'ac' couple your amplifier, with a capacitor input, using a black light
filter, you should optimise the performance of your amp, to your IR signal.
Regards
EricG
Nigel, Re-read my original post. "An ideal black filter"