def mktemplates(network_code='<STR_LIT>',<EOL>publicIDs=['<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'], plot=True):
<EOL>client = Client(network_code)<EOL>catalog = Catalog()<EOL>for publicID in publicIDs:<EOL><INDENT>if network_code == '<STR_LIT>':<EOL><INDENT>data_stream = client._download(<EOL>'<STR_LIT>' + publicID)<EOL>data_stream.seek(<NUM_LIT:0>, <NUM_LIT:0>)<EOL>catalog += read_events(data_stream, format="<STR_LIT>")<EOL>data_stream.close()<EOL><DEDENT>else:<EOL><INDENT>catalog += client.get_events(<EOL>eventid=publicID, includearrivals=True)<EOL><DEDENT><DEDENT>if plot:<EOL><INDENT>catalog.plot(projection='<STR_LIT>', resolution='<STR_LIT:h>')<EOL><DEDENT>catalog = filter_picks(catalog, top_n_picks=<NUM_LIT:5>)<EOL>for event in catalog:<EOL><INDENT>for pick in event.picks:<EOL><INDENT>if pick.phase_hint == '<STR_LIT:S>':<EOL><INDENT>event.picks.remove(pick)<EOL><DEDENT><DEDENT><DEDENT>templates = template_gen.template_gen(<EOL>method='<STR_LIT>', catalog=catalog, client_id=network_code,<EOL>lowcut=<NUM_LIT>, highcut=<NUM_LIT>, samp_rate=<NUM_LIT>, filt_order=<NUM_LIT:4>, length=<NUM_LIT>,<EOL>prepick=<NUM_LIT>, swin='<STR_LIT:all>', process_len=<NUM_LIT>, debug=<NUM_LIT:0>, plot=plot)<EOL>for i, template in enumerate(templates):<EOL><INDENT>template.write('<STR_LIT>' + str(i) + '<STR_LIT>', format='<STR_LIT>')<EOL><DEDENT>return<EOL>
Functional wrapper to make templates