stations = model.load_stations(pjoin(data_base_dir, stations_file)) targets = du.stations2targets(stations, store_id) event = model.Event(load=pjoin(data_base_dir, event_file)) _ref_source = DCSource.from_pyrocko_event(event) print 'reference source magnitude: ', _ref_source.magnitude if test_type=='doctar': targets = filter(lambda x: x.distance_to(_ref_source)<80000., targets) #depths = num.linspace(_ref_source.depth-dz, _ref_source.depth+dz, num_depths) offset = 4000 depths = du.drange(600, 8000, 200) print 'depths: ', depths smaller_magnitude_source = du.clone(_ref_source) if false_magnitude: smaller_magnitude_source.magnitude = _ref_source.magnitude+false_magnitude print 'setting false magnitude to ', smaller_magnitude_source.magnitude ref_source_moment_tensor = _ref_source.pyrocko_moment_tensor() location_test_sources_lists = du.make_lots_of_test_events(smaller_magnitude_source, depths, {('strike', 'dip', 'rake'):15., ('north_shift', 'east_shift'): 4000}, num_tests, func='normal') i=0 # setup the misfit setup:
cmap = du.cmap pjoin = os.path.join derec_home = os.environ["DEREC_HOME"] show = False avail_colors = tango_colors.values() derec_home = os.environ['DEREC_HOME'] colormap = defaultdict() km = 1000. test_type = 'doctar' if test_type=='doctar': #store_id = 'doctar_crust_20Hz_200m' store_id = 'doctar_mainland_20Hz_500m' depths = du.drange(600, 8000, 200)#depths = num.linspace(500, 8000, 16) #depths = du.drange(1000, 8000, 2000)#depths = num.linspace(500, 8000, 16) print 'depths', depths #num_dist =2 #step=20 step=3 distances = num.arange(10, 60, step)*km #distances = num.array([50.,100.,150,190])*km gain = 1. ref_event = model.Event(load=pjoin(derec_home, 'mseeds', 'doctar', 'doctar_2011-11-01', 'doctar_2011-11-01_quakefile.dat')) else: print 'not doctar, NOT READY!!!!!!'