I remove instrument response by first getting the inventory from get_station, attaching inventory to the stream using attach_response and finally, remove_response. This assumes that the relevant response file is available through the datacenter.
If the response file is not available through the datacenter but on my local, how do I attach the response file to stream as inventory and remove response?
please try not to use the attach_response() method anymore. We keep it around for compatibility reason but it was a design mistake in retrospect. The remove_response() method has an inventory argument which takes an ObsPy inventory object with the response information. You can get that either from a datacenter or just by using obspy.read_inventorty() on a local file in one of the supported data format.
Stream.attach_response() (followed directly by "remove_response()") is
working exactly the same as Stream.remove_response(inventory=...).
Only if you make manual metadata changes or merge Traces etc in between,
there are some potentially dangerous scenarios with the "attaching the
response to traces approach" and it is so incredibly way safer to always
look up response information for every Trace dynamically, on-the-fly,
all the time.
The attach_response() routine was a design mistake we plan to deprecate
and will remove in some future major release for safety reasons.