print("Layer interfaces in model: ", hif_mod, hif_mod.size) print("Depth points to be used in code: ", dep_pts_use, dep_pts_use.size) nz = dep_pts_use.size wspeed = 3.0 # NEED TO CHANGE, SHOULD BE BASED ON VELOCITIES FROM DISP FILE else: # nz = None wspeed = 3.0 # wavespeed everywhere in model (km/s); Type 1 (but could be Type 2 if doing synthetics) #-------------------------------- End model reading (elastic case) ---------------------------------- # Custom modules: set 2 import anseicca_utils1 as u1 import anseicca_utils2 as u2 import hans2013_serial as h13 stno, stid, stx, sty = u1.read_station_file(coordfile) smdo = u2.setup_modelling_domain(stno, stid, stx, sty, origx, origy, d_xy, glerr_thresh, map_plots) ############################################################### DATA AND/OR DATA CHARACTERISTICS ########################################################## #-------------------------------- Temporal signal characteristics ---------------------------------- sig_char = u1.SignalParameters() if not use_reald: # SYNTHETIC TEST CASE sig_char.dt = 0.2 # sampling interval sig_char.nsam = 250 # number of samples sig_char.cf = 0.3 # central frequency of noise sources sig_char.lf = None # lower bound frequency
if os.path.isdir(inarg1): filelist = [ os.path.join(inarg1, n) for n in os.listdir(inarg1) if n.endswith('.pckl') ] nrecs_files = np.zeros(len(filelist)) gamma_files = np.zeros(len(filelist)) misfit_files = np.zeros(len(filelist)) modnorm_files = np.zeros(len(filelist)) elif os.path.isfile(inarg1): filelist = [inarg1] #********************************* read coordinates file if provided ********************************* if orig_coord: rnum, rid, xloc, yloc = u1.read_station_file(coordfile) #********************************* Read the pickle file(s) ************************************************** for p, pfile in enumerate(filelist): jar = gzip.open(pfile) print "Reading ", pfile reald = pickle.load(jar) rc = pickle.load(jar) rc_xp = pickle.load(jar) rc_yp = pickle.load(jar) dc = pickle.load(jar) kcao_fhz = pickle.load(jar) kcao_pss = pickle.load(jar) kcao_dx = pickle.load(jar) kcao_gx = pickle.load(jar)