def _find_resp(station, channel, network, time, delta, directory):
possible_respfiles = glob.glob(directory + os.path.sep + '<STR_LIT>' +<EOL>network + '<STR_LIT:.>' + station +<EOL>'<STR_LIT>' + channel)  <EOL>possible_respfiles += glob.glob(directory + os.path.sep + '<STR_LIT>' +<EOL>network + '<STR_LIT:.>' + channel +<EOL>'<STR_LIT:.>' + station)  <EOL>possible_respfiles += glob.glob(directory + os.path.sep + '<STR_LIT>' +<EOL>station + '<STR_LIT:.>' + network)<EOL>station = str(station)<EOL>channel = str(channel)<EOL>possible_respfiles += glob.glob(directory + os.path.sep +<EOL>station.ljust(<NUM_LIT:5>, str('<STR_LIT:_>')) +<EOL>channel[<NUM_LIT:0>:len(channel) - <NUM_LIT:1>].<EOL>ljust(<NUM_LIT:3>, str('<STR_LIT:_>')) +<EOL>channel[-<NUM_LIT:1>] + '<STR_LIT>')<EOL>PAZ = []<EOL>seedresp = []<EOL>for respfile in possible_respfiles:<EOL><INDENT>print('<STR_LIT>' + respfile)<EOL>if respfile.split(os.path.sep)[-<NUM_LIT:1>][<NUM_LIT:0>:<NUM_LIT:4>] == '<STR_LIT>':<EOL><INDENT>seedresp = {'<STR_LIT:filename>': respfile, '<STR_LIT:date>': UTCDateTime(time),<EOL>'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': network, '<STR_LIT>': station,<EOL>'<STR_LIT>': channel, '<STR_LIT:location>': '<STR_LIT:*>'}<EOL>try:<EOL><INDENT>freq_resp, freqs = evalresp(<EOL>delta, <NUM_LIT:100>, seedresp['<STR_LIT:filename>'], seedresp['<STR_LIT:date>'],<EOL>units=seedresp['<STR_LIT>'], freq=True,<EOL>network=seedresp['<STR_LIT>'], station=seedresp['<STR_LIT>'],<EOL>channel=seedresp['<STR_LIT>'])<EOL><DEDENT>except:<EOL><INDENT>print('<STR_LIT>')<EOL>seedresp = []<EOL>continue<EOL><DEDENT><DEDENT>elif respfile[-<NUM_LIT:3>:] == '<STR_LIT>':<EOL><INDENT>PAZ, pazdate, pazstation, pazchannel, pazsensor =_GSE2_PAZ_read(respfile)<EOL>if pazdate >= time and pazchannel != channel andpazstation != station:<EOL><INDENT>print('<STR_LIT>')<EOL>print('<STR_LIT>' + str(pazdate) + '<STR_LIT>' + pazchannel +<EOL>'<STR_LIT>' + pazstation)<EOL>PAZ = []<EOL><DEDENT><DEDENT>else:<EOL><INDENT>continue<EOL><DEDENT>if PAZ or seedresp:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if PAZ:<EOL><INDENT>return PAZ<EOL><DEDENT>elif seedresp:<EOL><INDENT>return seedresp<EOL><DEDENT>
Helper function to find the response information.

Works for a given station and channel at a given time and return a
dictionary of poles and zeros, gain and sensitivity.

:type station: str
:param station: Station name (as in the response files)
:type channel: str
:param channel: Channel name (as in the response files)
:type network: str
:param network: Network to scan for, can be a wildcard
:type time: datetime.datetime
:param time: Date-time to look for repsonse information
:type delta: float
:param delta: Sample interval in seconds
:type directory: str
:param directory: Directory to scan for response information

:returns: dictionary of response information
:rtype: dict