EXAMPLE: from obspy.clients.fdsn import Client from obspy.core.event import Catalog from eqcorrscan.core.template_gen import template_gen client = Client('ISC') catalog = client.get_events(eventid='614566033', includearrivals=True) print(catalog.__str__(print_all=True)) catalog[0].picks = catalog[0].picks[6:8] print(catalog[0].picks) templates = template_gen(method='from_client', catalog=catalog, client_id='NIEP', lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=200) 1 Event(s) in Catalog: 2018-12-05T00:17:02.280000Z | +45.756, +26.804 | 3.0 ml [Pick(resource_id=ResourceIdentifier(id="smi:ISC/pickid=914454268"), time=UTCDateTime(2018, 12, 5, 0, 17, 18, 570000), waveform_id=WaveformStreamID(network_code='IR', station_code='BISRR'), phase_hint='P'), Pick(resource_id=ResourceIdentifier(id="smi:ISC/pickid=914454269"), time=UTCDateTime(2018, 12, 5, 0, 17, 29, 930000), waveform_id=WaveformStreamID(network_code='IR', station_code='BISRR'), phase_hint='S')] --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[18], line 9 7 catalog[0].picks = catalog[0].picks[6:8] 8 print(catalog[0].picks) ----> 9 templates = template_gen(method='from_client', catalog=catalog, 10 client_id='NIEP', lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=200) File ~\AppData\Local\anaconda3\envs\eqcorrscan\Lib\site-packages\eqcorrscan\core\template_gen.py:311, in template_gen(method, lowcut, highcut, samp_rate, filt_order, length, prepick, swin, process_len, all_vert, all_horiz, delayed, plot, plotdir, return_event, min_snr, parallel, num_cores, save_progress, skip_short_chans, vertical_chans, horizontal_chans, **kwargs) 309 if method in ['from_client']: 310 Logger.info("Downloading data") --> 311 st = _download_from_client( 312 client=client, client_type=client_map[method], 313 catalog=sub_catalog, data_pad=data_pad, 314 process_len=process_len, available_stations=available_stations, 315 all_channels=all_channels) 316 Logger.info('Pre-processing data') 317 st.merge() File ~\AppData\Local\anaconda3\envs\eqcorrscan\Lib\site-packages\eqcorrscan\core\template_gen.py:548, in _download_from_client(client, client_type, catalog, data_pad, process_len, available_stations, all_channels) 545 net, sta, chan, loc = waveform_info 546 Logger.info('Downloading for start-time: {0} end-time: {1}'.format( 547 starttime, endtime)) --> 548 Logger.debug('.'.join([net, sta, loc, chan])) 549 query_params = dict( 550 network=net, station=sta, location=loc, channel=chan, 551 starttime=starttime, endtime=endtime) 552 try: TypeError: sequence item 3: expected str instance, NoneType found DATA EXISTS: from obspy import UTCDateTime from obspy.clients.fdsn import Client client = Client("NIEP") t1 = UTCDateTime(2018, 12, 5, 0, 17, 02.28) t2 = t1 + 60 st = client.get_waveforms("*", "BISRR", "*", "*", t1, t2) print(st.__str__(extended=True)) 6 Trace(s) in Stream: RO.BISRR..HHE | 2018-12-05T00:17:02.280000Z - 2018-12-05T00:18:02.280000Z | 100.0 Hz, 6001 samples RO.BISRR..HHN | 2018-12-05T00:17:02.280000Z - 2018-12-05T00:18:02.280000Z | 100.0 Hz, 6001 samples RO.BISRR..HHZ | 2018-12-05T00:17:02.280000Z - 2018-12-05T00:18:02.280000Z | 100.0 Hz, 6001 samples RO.BISRR..HNE | 2018-12-05T00:17:02.280000Z - 2018-12-05T00:18:02.280000Z | 100.0 Hz, 6001 samples RO.BISRR..HNN | 2018-12-05T00:17:02.280000Z - 2018-12-05T00:18:02.280000Z | 100.0 Hz, 6001 samples RO.BISRR..HNZ | 2018-12-05T00:17:02.280000Z - 2018-12-05T00:18:02.280000Z | 100.0 Hz, 6001 samples