def get_ev_info(ev_info, iex): # Loop over multiple event if iex == 1: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters #events_file = "/home/ksmith/REPOSITORIES/manuscripts/kyle/papers/basinamp/data/basinamp_obspy.txt" events_file = "/home/crichards/LOCAL_SPLITTING/salmon_redoubt_obspy.txt" #output from rs_redoubt.m eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(7, 8): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # subset of stations -- use lon-lat subset region #ev_info_temp.min_dist = 0 #ev_info_temp.max_dist = 200 ev_info_temp.min_lat = 59.0 ev_info_temp.max_lat = 63.0 ev_info_temp.min_lon = -154.0 ev_info_temp.max_lon = -148.0 #ev_info_temp.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' ev_info_temp.network = 'AK,AT,AV,CN,II,IU,US,XM,TA,XE,XR,XZ,YV,XV,ZE,XG' ev_info_temp.channel = 'BH?,HH?' ev_info_temp.tbefore_sec = 20 ev_info_temp.tafter_sec = 120 #ev_info_temp.resample_freq = 40 #ev_info_temp.scale_factor = 100 ev_info_temp.resample_TF = False #ev_info_temp.rotateRTZ = True ev_info_temp.remove_response = False # For SALMON data ev_info_temp.user = None ev_info_temp.password = None # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== # NEHRP events if iex == 0: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # subset waveforms ev_info.min_dist = 0 ev_info.max_dist = 200 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 ev_info.resample_freq = 50 ev_info.scale_factor = 100 ev_info.network = 'AK,AT,AV,CN,II,IU,TA,US,XM,XV,XZ,YV,ZE' ev_info.channel = 'BH?,HH?,EH?' ev_info.user = None ev_info.password = None # Multiple events files events_file = "/home/vipul/REPOSITORIES/manuscripts/vipul/papers/2016nehrp/data/beluga_events_obspy.txt" #events_file = "/home/vipul/REPOSITORIES/manuscripts/vipul/papers/2016nehrp/data/susitna_events_obspy.txt" #events_file = "/home/vipul/REPOSITORIES/manuscripts/vipul/papers/2016nehrp/data/cook_inlet_events_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(len(eids)): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== # events in western and Northern Alaska if iex == 0: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # subset waveforms ev_info.min_dist = 0 ev_info.max_dist = 300 ev_info.tbefore_sec = 50 ev_info.tafter_sec = 300 ev_info.resample_freq = 50 ev_info.scale_factor = 100 ev_info.network = 'AK,AT,CN,II,IU,US,XM,TA,XE,XR,XZ,YV,XV,ZE,XG' ev_info.channel = 'BH?,HH?' # events frmo get_events_nak.m #events_file = "./test_data/nak_obspy.txt" #ievent = 6 # three recent events events_file = "./test_data/nak_supp_obspy.txt" ievent = 2 # 1:Manley, 2:Healy, 3:Canada eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(ievent - 1, ievent): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== # NEHRP events if iex == 0: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # subset waveforms ev_info.min_dist = 0 ev_info.max_dist = 200 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 ev_info.resample_freq = 50 ev_info.scale_factor = 100 ev_info.network = 'AZ,CI,LB,BK,TS,TA,NC,NN,SN' ev_info.channel = 'BH?,HH?,EH?' ev_info.user = None ev_info.password = None # Events files events_file = "/home/vipul/PROJECTS/scec/data/scec_sims_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(len(eids)): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== # python run_getwaveform.py event_input_scec 0 if iex == 0: ev_info.ifverbose = 1 ev_info.overwrite_ddir = 0 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # subset waveforms ev_info.min_dist = 0 ev_info.max_dist = 200 # 300 km: probably enough stations ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 # note: check IRIS gmap for additional networks # note: can we wildcard the network? # request 1: IRIS #ev_info.client_name = 'IRIS' #ev_info.network = 'AZ,CI,LB,TS,TA,NC,NN,SN,II,IU,US' # request 2: NCEDC #ev_info.client_name = 'NCEDC' #ev_info.network = 'BK' # note: this does not work ev_info.ifmass_downloader = True ev_info.network = '*' #ev_info.channel = 'BH?,HH?,EH?' ev_info.channel = 'BH?' ev_info.station = '*' ev_info.user = None ev_info.password = None # for CAP moment tensor code ev_info.resample_freq = 50 ev_info.scale_factor = 100 ievent = 16 #events_file = "/home/vipul/dlib/pysep_txtfiles/scec_sims_obspy.txt" events_file = "/home/carltape/PROJECTS/calif/MTs/scec_sims_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(ievent - 1, ievent): #for xx in range(len(eids)): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== # SilwalTape2016 example event (Anchorage) -- python run_getwaveform.py event_input 0 if iex == 0: ev_info.use_catalog = 0 # do not use event catalog for source parameters ev_info.otime = obspy.UTCDateTime("2009-04-07T20:12:55.351") ev_info.min_dist = 0 ev_info.max_dist = 300 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 # keep stations with missing components and fill the missing component with a null trace (MPEN) #ev_info.icreateNull = 1 # RAW and ENZ files can be used when checking if you are receiving all possible data (example station: SOLD) ev_info.isave_raw = False ev_info.isave_raw_processed = False ev_info.isave_ENZ = False #ev_info.min_lat = 59 #ev_info.max_lat = 62 #ev_info.min_lon = -152 #ev_info.max_lon = -147 # default list of Alaska networks # note 1: cannot use '*' because of IM # note 2: may want to exclude the mid-band AV network # note 3: these are temporary: # XE BEAAR 1999 # XR ARCTIC 2004 # XZ STEEP 2005 # YV MOOS 2006 # XV FLATS 2014 # ZE SALMON 2015 # XG WVF 2016 # [7C MMEP 2015] # TA #ev_info.network = 'AK,AT,AV,CN,II,IU,US,XM,XV,XZ,YV' #ev_info.network = 'AK' # for testing ev_info.network = 'AK,AT,AV,CN,II,IU,US,XM,TA,XE,XR,XZ,YV,XV,ZE,XG' ev_info.channel = 'BH?' ev_info.use_catalog = 0 ev_info.elat = 61.45420 ev_info.elon = -149.7428 ev_info.edep = 33033.60 # ev_info.rlat = 61.45420 # ev_info.rlon = -149.7428 # ev_info.rtime = obspy.UTCDateTime("2009-04-07T20:12:55.351") ev_info.emag = 4.6 # scaling and resampling needed for CAP ev_info.resample_TF = True ev_info.resample_freq = 50 ev_info.scale_factor = 100 #ev_info.phase_window = False #-------for specfem------------ #ev_info.tbefore_sec = 0 #ev_info.resample_TF = False #ev_info.scale_factor = 1 #ev_info.outformat = 'DISP' #------------------------------ # Iniskin earthquake if iex == 1: ev_info.use_catalog = 0 # do not use event catalog for source parameters # GCMT source parameters # the otime is the centroid time and accounts for tshift ev_info.otime = obspy.UTCDateTime("2016-01-24T10:30:37.400") ev_info.elat = 59.75 ev_info.elon = -153.27 ev_info.edep = 110700 ev_info.emag = 7.1 # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 800 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 600 ev_info.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' # IM will probably crash it ev_info.channel = 'BH?,HH?' #ev_info.resample_freq = 0 # no resampling #ev_info.resample_TF = False #ev_info.scale_factor = 1 # no scale factor # parameters for examining step response (causal low-pass filter on raw waveforms) # delete AUQ, SPCP, SPBG ev_info.rotateRTZ = False ev_info.ifFilter = True ev_info.filter_type = 'lowpass' ev_info.f1 = 1 / 4 ev_info.zerophase = False ev_info.remove_response = False ev_info.ipre_filt = 0 ev_info.demean = False ev_info.detrend = False # For SALMON data #ev_info.user = None #ev_info.password = None # MFFZ earthquakes for investigating the step response # copied from event_input_flats if iex == 2: ev_info.use_catalog = 0 # ------------------------------------------------- ev_info.otime = obspy.UTCDateTime("2014-08-31T03:06:57.111") ev_info.elat = 65.1526 ev_info.elon = -149.0398 ev_info.edep = 16614.7 ev_info.emag = 5.20 # ------------------------------------------------- ev_info.min_dist = 0 ev_info.max_dist = 300 ev_info.tbefore_sec = 200 ev_info.tafter_sec = 600 ev_info.network = 'AV,CN,AT,TA,AK,XV,II,IU,US' # ev_info.network = 'XV,AK' ev_info.channel = 'BH?,HH?' #ev_info.scale_factor = 1 #ev_info.resample_freq = 0 #ev_info.resample_TF = False # for CAP # ev_info.resample_TF = True # ev_info.scale_factor = 100 # ev_info.resample_freq = 50 # to investigate step response ev_info.rotateRTZ = True ev_info.rotateUVW = True ev_info.ifFilter = True ev_info.zerophase = False # causal # filter_type = 'lowpass' ev_info.filter_type = 'bandpass' ev_info.f1 = 1 / 100 # fmin ev_info.f2 = 1 / 10 # fmax ev_info.corners = 4 # ev_info.remove_response = False ev_info.remove_response = True ev_info.ipre_filt = 1 ev_info.demean = True ev_info.detrend = True ev_info.output_cap_weight_file = False # ev_info.outformat = 'DISP' ev_info.ifsave_sacpaz = True ev_info.taper = 0.2 # Loop over multiple event if iex == 3: ev_info.use_catalog = 0 # text file of source parameters ievent = 1 events_file = "/home/ksmith/REPOSITORIES/manuscripts/kyle/papers/nenanabasin/data/nenanabasin_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] #for xx in range(len(eids)): #for xx in range(1,3): for xx in range(ievent - 1, ievent): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # subset of stations ev_info_temp.min_dist = 0 ev_info_temp.max_dist = 200 ev_info_temp.tbefore_sec = 100 ev_info_temp.tafter_sec = 500 ev_info_temp.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' #ev_info_temp.network = 'AK,AT,AV,CN,II,IU,US,XM,TA,XE,XR,XZ,YV,XV,ZE,XG' ev_info_temp.channel = 'BH?,HH?' #ev_info_temp.resample_freq = 40 #ev_info_temp.scale_factor = 100 #ev_info_temp.resample_TF = False # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list # Alaska data from far away event if iex == 4: ev_info.use_catalog = 0 # Mariana Event observed by FLATS ev_info.otime = obspy.UTCDateTime("2016-07-29T21:18:26.000") ev_info.elat = 18.5439 ev_info.elon = 145.541 ev_info.edep = 207620.0 ev_info.emag = 7.7 ev_info.rtime = obspy.UTCDateTime("2016-07-29T21:28:19.000") # center at F3TN ev_info.rlat = 64.7716 ev_info.rlon = -149.1465 ev_info.min_dist = 0 ev_info.max_dist = 150 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 400 ev_info.network = 'AK,AT,II,IU,US,XM,XV,XZ,TA' # no CN,AV,YV,ZE ev_info.channel = 'BH?,HH?' # doublet event near Manley if iex == 5: ev_info.rlat = 64.7716 ev_info.rlon = -149.1465 ev_info.scale_factor = 1 ev_info.min_dist = 0 ev_info.max_dist = 150 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 200 ev_info.network = 'XV,TA' ev_info.channel = 'BH?,HH?' ev_info.use_catalog = 0 ev_info.station = 'I23K,F3TN' # AEC source parameters ev_info.otime = obspy.UTCDateTime("2015-11-06T01:20:12.712") ev_info.elat = 64.7552 ev_info.elon = -151.3103 ev_info.edep = 1502.1 ev_info.emag = 3.35 ev_info.rtime = ev_info.otime # Illinois main event if iex == 6: ev_info.use_catalog = 0 ev_info.otime = obspy.UTCDateTime("2008-04-18T09:36:59.110") ev_info.elon = -87.886 ev_info.elat = 38.452 ev_info.edep = 14.3 ev_info.emag = 5.2 ev_info.min_dist = 0 ev_info.max_dist = 500 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 ev_info.network = 'IU,NM' ev_info.station = '*' ev_info.channel = 'LH?,BH?' # Uturuncu main event, AlvizuriTape2016 if iex == 7: ev_info.use_catalog = 0 ev_info.otime = obspy.UTCDateTime("2010-05-16T06:34:54.464") ev_info.elon = -67.1856 ev_info.elat = -22.2600 ev_info.edep = -0.6 ev_info.emag = 2.8 ev_info.min_dist = 0 ev_info.max_dist = 500 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 ev_info.network = 'XP' ev_info.station = '*' ev_info.channel = 'HH?' # Manley earthquake (Kyle) if iex == 8: ev_info.use_catalog = 0 ev_info.otime = obspy.UTCDateTime("2016-05-18T03:25:48.320") ev_info.elat = 65.2466 ev_info.elon = -151.0651 ev_info.edep = 15156.2 ev_info.emag = 4.2 ev_info.rtime = ev_info.otime ev_info.max_dist = 400 ev_info.tbefore_sec = 50 ev_info.tafter_sec = 600 ev_info.network = 'AK,AT,AV,CN,II,IU,US,XM,TA,XE,XR,XZ,YV,XV,ZE,XG' ev_info.channel = 'BH?,HH?' # for CAP ev_info.resample_TF = True ev_info.resample_freq = 50 ev_info.scale_factor = 100 # same as iex=11 but for the IRIS database # GOAL: For LLNL events, we do NOT want to use the IRIS source parameters: # origin time, hypocenter, magnitude. # --> THIS EXAMPLE IS NOT CURRENTLY WORKING WITH sln01 # ERROR: FileNotFoundError: [Errno 2] No such file or directory: '19910914190000000/19910914190000000_ev_info.obj' if iex == 9: ev_info.overwrite_ddir = 0 # do NOT overwrite the existing directory ev_info.client_name = 'IRIS' #ev_info.client_name = 'NCEDC' ev_info.use_catalog = 1 #ev_info.idb = 1 # IRIS database # ev_info.resample_freq = 0 # no resampling # ev_info.otime = obspy.UTCDateTime("1991-09-14T19:00:00.000Z") # Hoya actual ev_info.otime = obspy.UTCDateTime( "1991-09-14T19:00:08.031Z") # Hoya target ev_info.min_dist = 0 ev_info.max_dist = 1200 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 600 # needs to be run TWICE to get BK stations and IRIS stations #ev_info.network = 'BK' # BK will go to NCEDC ev_info.network = '*' # * will get all at IRIS DMC ev_info.channel = 'BH?,LH?' ev_info.overwrite_ddir = 0 ev_info.ifsave_stationxml = False if iex == 10: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters sec_tol = 180 events_file = "/home/ksmith/REPOSITORIES/manuscripts/kyle/papers/nenanabasin/data/nenanabasin_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(0, 1): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # subset of stations ev_info_temp.min_dist = 0 #ev_info_temp.max_dist = 50 ev_info_temp.max_dist = 150 ev_info_temp.rlat = 64.7716 ev_info_temp.rlon = -149.1465 ev_info_temp.rtime = ev_info_temp.otime saftcase = False ev_info_temp.phases = ["P", "S"] ev_info_temp.write_sac_phase = True # put phase information in sac files ev_info_temp.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' ev_info_temp.channel = 'BH?,HH?' ev_info_temp.resample_TF = True # to be consistent with past past waveforms ev_info_temp.resample_freq = 50 ev_info_temp.scale_factor = 1 ev_info_temp.tbefore_sec = 150 ev_info_temp.tafter_sec = 1000 print("before sec = ", ev_info_temp.tbefore_sec) print("after sec = ", ev_info_temp.tafter_sec) # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== # MFFZ earthquakes for investigating the step response # python run_getwaveform.py event_input_flats 0 if iex == 0: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters ievent = 14 events_file = "/home/carltape/REPOSITORIES/manuscripts/carltape/papers/nennuc/clipping/data/MFFZ_step_response_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(ievent - 1, ievent): #for xx in range(len(eids)): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] ev_info_temp.min_dist = 0 ev_info_temp.max_dist = 300 ev_info_temp.tbefore_sec = 200 ev_info_temp.tafter_sec = 600 ev_info_temp.network = 'AV,CN,AT,TA,AK,XV,II,IU,US' # ev_info_temp.network = 'XV,AK' ev_info_temp.channel = 'BH?,HH?' #ev_info_temp.scale_factor = 1 ev_info_temp.resample_TF = False # for CAP # ev_info_temp.scale_factor = 10.0**2 # ev_info_temp.resample_freq = 50 # to investigate step response ev_info_temp.isave_raw = True ev_info_temp.isave_raw_processed = True ev_info_temp.rotateENZ = False ev_info_temp.rotateRTZ = False ev_info_temp.rotateUVW = True # filter options ev_info_temp.ifFilter = True ev_info_temp.zerophase = False # causal # filter_type = 'lowpass' ev_info_temp.filter_type = 'bandpass' ev_info_temp.f1 = 1 / 100 # fmin ev_info_temp.f2 = 1 / 10 # fmax ev_info_temp.corners = 4 # ev_info_temp.remove_response = False ev_info_temp.remove_response = True ev_info_temp.ipre_filt = 1 ev_info_temp.demean = True ev_info_temp.detrend = True ev_info_temp.output_cap_weight_file = False # ev_info_temp.outformat = 'DISP' ev_info_temp.ifsave_sacpaz = True ev_info_temp.taper = 0.2 # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list # NENNUC event (from Steve) if iex == 1: ev_info.idb = 1 ev_info.use_catalog = 0 # manually enter AEC catalog parameters ev_info.otime = obspy.UTCDateTime("2016-01-14T19:04:10.727") ev_info.elat = 64.6827 ev_info.elon = -149.2479 ev_info.edep = 22663.7 ev_info.emag = 3.8 # ------------------------------------------------- ev_info.otime = obspy.UTCDateTime("2015-09-12T03:25:12.711") ev_info.elat = 65.1207 ev_info.elon = -148.6646 ev_info.edep = 15556.8 ev_info.emag = 2.6 # ------------------------------------------------- ev_info.otime = obspy.UTCDateTime("2013-03-12T07:39:50.214") ev_info.elat = 64.7161 ev_info.elon = -148.9505 ev_info.edep = 20000 ev_info.emag = 2.1 # For CAP ev_info.min_dist = 0 ev_info.max_dist = 200 ev_info.tbefore_sec = 500 ev_info.tafter_sec = 2000 ev_info.taper = 0.1 ev_info.network = 'AV,CN,AT,TA,AK,XV,II,IU,US' # ev_info.network = 'AK,TA,II,IU,US' # ev_info.station = "-RAG" # RAG has choppy data; gives error: Exception: Can't merge traces with same ids but differing sampling rates! ev_info.channel = 'BH?,HH?' ev_info.pre_filt = (0.0025, 0.003, 10.0, 15.0) # BH default ev_info.ipre_filt = 1 # to investigate step response # ev_info.ev_info.tbefore_sec = 2000 # ev_info.tafter_sec = 2000 # ev_info.resample_freq = 0 # ev_info.scale_factor = 1 # ev_info.ifFilter = True # ev_info.zerophase = False # ev_info.filter_type = 'bandpass' # ev_info.f1 = 1/100 # ev_info.f2 = 1/20 # ev_info.remove_response = True # ev_info.ipre_filt = 0 # ev_info.demean = True # ev_info.detrend = True # Kyle Nenana basin earthquakes for basin amplification if iex == 2: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # AEC source parameters ev_info.otime = obspy.UTCDateTime("2015-11-20T10:53:48.168") ev_info.elat = 64.6210 ev_info.elon = -149.4024 ev_info.edep = 17113.4 ev_info.emag = 2.67 # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 200 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 400 ev_info.network = 'AK,AT,II,IU,US,XM,XV,XZ,TA' # no CN,AV,YV,ZE ev_info.channel = 'BH?,HH?' # ev_info.resample_freq = 0 # no resampling # ev_info.scale_factor = 1 # no scale factor # For CAP moment tensor ev_info.resample_freq = 50 # same as greens function ev_info.scale_factor = 100 # change from m/s to cm/s # ev_info.ipre_filt = 0 ev_info.remove_response = True # ev_info.demean = False # ev_info.detrend = False # gets waveforms from M 8.3 Chile event with stations centered in Minto if iex == 3: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 ev_info.otime = obspy.UTCDateTime("2015-09-16T22:54:33.000") ev_info.elat = -31.5695 ev_info.elon = -71.6543 ev_info.edep = 22400.0 ev_info.emag = 8.30 ev_info.rlat = 64.7716 ev_info.rlon = -149.1465 ev_info.rtime = obspy.UTCDateTime("2015-09-16T23:09:15.000") ev_info.tbefore_sec = 100 ev_info.tafter_sec = 200 ev_info.min_dist = 0 ev_info.max_dist = 100 ev_info.network = 'AK,AT,II,IU,US,XM,XV,XZ,TA' # no CN,AV,YV,ZE ev_info.channel = 'BH?,HH?' ev_info.resample_freq = 0 ev_info.scale_factor = 1 ev_info.remove_response = True # gets a ??? if iex == 4: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 ev_info.otime = obspy.UTCDateTime("2016-06-06T00:00:00.000") ev_info.elat = 64.6130 ev_info.elon = -149.0992 ev_info.edep = 0 ev_info.emag = 0.00 # ev_info.rlat = 64.7716 # ev_info.rlon = -149.1465 # ev_info.rtime = obspy.UTCDateTime("2015-09-16T23:09:15.000") ev_info.tbefore_sec = 0 ev_info.tafter_sec = 3600 ev_info.min_dist = 0 ev_info.max_dist = 100 ev_info.network = 'XV,AK,TA' # no CN,AV,YV,ZE ev_info.channel = 'HH?,BH?' ev_info.resample_freq = 0 ev_info.scale_factor = 1 ev_info.remove_response = True ev_info.rotateRTZ = False # ev_info.pre_filt=(f0*0.001, f1*0.001, f2*1000, f3*1000) # ev_info.ipre_filt = 2 ev_info.ipre_filt = 0 # Chatnika earthquake if iex == 5: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # GCMT source parameters # the otime is the centroid time and accounts for tshift ev_info.otime = obspy.UTCDateTime("2017-05-08T05:09:02.000") ev_info.elat = 65.2643 ev_info.elon = -146.922 ev_info.edep = 9000 ev_info.emag = 3.8 # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 500 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 500 ev_info.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' ev_info.channel = 'BH?,HH?' ev_info.resample_freq = 50 # no resampling ev_info.scale_factor = 100 # no scale factor # NE Nenana earthquake if iex == 6: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # GCMT source parameters # the otime is the centroid time and accounts for tshift ev_info.otime = obspy.UTCDateTime("2017-06-28T12:58:52") ev_info.elat = 64.7569 ev_info.elon = -148.8883 ev_info.edep = 18000 ev_info.emag = 3.5 # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 500 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 500 ev_info.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' ev_info.channel = 'BH?,HH?' ev_info.resample_freq = 50 ev_info.scale_factor = 100 # Loop over multiple event if iex == 7: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters events_file = "/home/ksmith/REPOSITORIES/manuscripts/kyle/papers/basinresp/data/basinamp_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] for xx in range(0, 3): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # subset of stations ev_info_temp.min_dist = 0 ev_info_temp.max_dist = 200 #500 ev_info_temp.tbefore_sec = 100 ev_info_temp.tafter_sec = 500 ev_info_temp.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' ev_info_temp.channel = 'BH?,HH?' ev_info_temp.resample_freq = 50 ev_info_temp.scale_factor = 100 # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list if iex == 8: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters events_file = "/home/ksmith/REPOSITORIES/manuscripts/kyle/misc/F2TN_events_near_out.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_temp.tafter_sec = 500 ev_info_temp.network = 'AK,XV' ev_info_temp.channel = 'BH?,HH?' ev_info_temp.resample_freq = 50 ev_info_temp.scale_factor = 100 # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list if iex == 9: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # GCMT source parameters # the otime is the centroid time and accounts for tshift ev_info.otime = obspy.UTCDateTime("2018-05-27T10:40:00") ev_info.elat = 64.613 ev_info.elon = -149.0992 ev_info.edep = 000 ev_info.emag = 0 ev_info.rotateRTZ = False # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 15 ev_info.tbefore_sec = 1800 ev_info.tafter_sec = 3600 ev_info.network = 'XV' ev_info.channel = 'HH?' ev_info.resample_freq = 50 ev_info.scale_factor = 100 if iex == 10: ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # GCMT source parameters # the otime is the centroid time and accounts for tshift # FNN1 outage #ev_info.otime = obspy.UTCDateTime("2018-07-15T19:30:00") #ev_info.elat = 64.5716 #ev_info.elon = -149.2179 # FTGH outage #ev_info.otime = obspy.UTCDateTime("2018-07-23T23:30:00") #ev_info.elat = 64.6917 #ev_info.elon = -148.8278 # FNN1 out again ev_info.otime = obspy.UTCDateTime("2018-07-18T10:00:00") ev_info.elat = 64.5716 ev_info.elon = -149.2179 ev_info.edep = 000 ev_info.emag = 0 ev_info.rotateRTZ = False # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 5 ev_info.tbefore_sec = 0 ev_info.tafter_sec = 3600 ev_info.network = 'XV' ev_info.channel = 'HH?' ev_info.resample_freq = 50 ev_info.scale_factor = 100 if iex == 11: # Manley event ev_info.idb = 1 ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.use_catalog = 0 # do not use event catalog for source parameters # FNN1 out again ev_info.otime = obspy.UTCDateTime("2018-08-28T15:18:44") ev_info.elat = 65.1778 ev_info.elon = -150.4964 ev_info.edep = 16000 ev_info.emag = 4.8 ev_info.rotateRTZ = True # subset of stations ev_info.min_dist = 0 ev_info.max_dist = 500 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 500 ev_info.network = 'AV,CN,ZE,AT,TA,AK,XV,II,IU,US' ev_info.channel = 'BH?,HH?' ev_info.resample_freq = 50 ev_info.scale_factor = 100 return (ev_info)
channel = 'BH?,HH?' resample_freq = 0 # =0 for no resampling scale_factor = 1 # no scale factor, for CAP use 10**2 (to convert m/s to cm/s) remove_response = True # username and password for accessing embargoed data from IRIS # Register here: http://ds.iris.edu/ds/nodes/dmc/forms/restricted-data-registration/ # Run example iex = 4 to check user = '' password = '' import read_event_obspy_file as reof events_file = "/home/ksmith/REPOSITORIES/manuscripts/kyle/papers/basinamp/data/basinamp_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) for iex in range(9, 10): # dummy values dummyval = -9999 rlat = dummyval rlon = dummyval rtime = dummyval rlat = 64.7716 rlon = -149.1465 print("my iex is %d" % (iex)) otime = obspy.UTCDateTime(otimes[iex]) elat = elats[iex] elon = elons[iex]
def get_ev_info(ev_info, iex): # =============================================================== # North Korea events in Alvizuri and Tape (2018 SRL) # python run_getwaveform.py event_input_nkfmtu 0 if iex == 0: ev_info.use_catalog = 0 # do not use event catalog for source parameters # subset waveforms ev_info.min_dist = 0 ev_info.max_dist = 3000 ev_info.tbefore_sec = 100 # should probably be >300, especially for closest stations ev_info.tafter_sec = 300 # 300 testing, 3000 final ev_info.resample_TF = True # for CAP ev_info.resample_freq = 20 # for CAP (might want 50 for body waves) ev_info.scale_factor = 100 # for CAP (cm/s) # NOTE network PN is disabled since a station with missing deconv info crashes the scripts (when doing a full-station search for available data) # To see this add "print(station)" as line 238 in /home/calvizur/UTILS/anaconda3/envs/seis/lib/python3.6/site-packages/obspy/io/stationxml/core.py #ev_info.channel = '*,-HH?,-BH?,-LH?' #ev_info.network = 'IU,-PN,-IM' # #ev_info.channel = 'HH?,BH?,LH?' #ev_info.network = '*,-PN' # 2017-12-20 ISSUES when requesting all channels ('*'): # No data available for request (nk06 event): IM JP KG SY # div/0 error: network XG # event 2017-11-15 station MG04.XL: Could not find a valid Response Stage Type # event 2017-11-15: Exception: Can't merge traces with same ids but differing sampling rates! -- station BUS2, channel BH (S. korea) # ev_info.network = 'XG' # ev_info.station = 'STZ' #ev_info.channel = '*' #ev_info.station = '*,-BUS2,-MG04' # event NK 2017-11-15 avoid BUS2. see exception above ev_info.channel = 'HH?,BH?,LH?' ev_info.network = '*,-PN,-XL' # 20191120 testing with python 3.7.4, obspy 1.1.0 # 20061009013528000 -- 132 three-component seismograms (processed and rotated) # 20090525005443124 -- 178 Z-component seismograms # rotation error: Station YM.38..BH* Rotating random orientation to NEZ. (also check YC.BEZH) # 20130212025751273 -- 72 three-component seismograms (processed and rotated) # 20160106013000964 -- 90 three-component seismograms (processed and rotated) # 20160909003001386 -- 108 three-component seismograms (processed and rotated) # 20170903033001760 -- 108 three-component seismograms (processed and rotated) # 20170903033831810 -- 105 three-component seismograms (processed and rotated) # 20160912113255770 -- 138 Z-component seismograms # rotation error: Station MI.ANSV..BH* Rotating random orientation to NEZ. (also check IU.ULN) # 20171115052932820 -- 122 Z-component seismograms # rotation error: Station MI.GOLF..BH* Rotating random orientation to NEZ. (also check RM.SLV) ievent = 6 # ievent = 6: 2017-09-03 nuke events_file = "./event_input/input/nkfmtu_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] # run subset of events #for xx in range(len(eids)): for xx in range(ievent - 1, ievent): #for xx in range(2,ievent): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)
def get_ev_info(ev_info, iex): # =============================================================== if iex == 0: #Cantwell local event ev_info.use_catalog = 0 # do not use event catalog for source parameters ev_info.ifverbose = True # debugging output # subset waveforms (Run 1) ev_info.min_dist = 0 ev_info.max_dist = 300 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 # for CAP ev_info.resample_TF = True ev_info.resample_freq = 50 ev_info.scale_factor = 100 # Run 1: non-nodal data ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.ifph5 = False ev_info.network = 'AK,AT,AV,CN,II,IU,TA,US,XM,XV,DE,ZE' ev_info.channel = 'BH?,HH?' # Run 2: denali nodal data #ev_info.overwrite_ddir = 0 #ev_info.ifph5 = True #ev_info.network = 'ZE' #ev_info.channel = '*' ##ev_info.station = '*' # CAUTION: Takes a LONG time! #ev_info.station = '1304' # note: PH5 does not understand -XXX station code ev_info.isave_raw = True ev_info.isave_raw_processed = True ev_info.rotateENZ = True ev_info.rotateRTZ = True ev_info.user = '******' ev_info.password = '******' #Cantwell local event ev_info.otime = obspy.UTCDateTime("2019-02-25T18:22:30.906") ev_info.elat = 62.8002 ev_info.elon = -149.6240 ev_info.edep = 73700 ev_info.emag = 3.10 #Cantwell local event #2 #ev_info.otime = obspy.UTCDateTime("2019-03-10T05:16:05.815") #ev_info.elat = 62.8800 #ev_info.elon = -150.526200000000 #ev_info.edep = 88700 #ev_info.emag = 3.10 if iex == 1: #Anchorage aftershock ev_info.use_catalog = 0 # do not use event catalog for source parameters ev_info.ifverbose = True # debugging output # subset waveforms (Run 1) ev_info.min_dist = 0 ev_info.max_dist = 300 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 # for CAP ev_info.resample_TF = True ev_info.resample_freq = 50 ev_info.scale_factor = 100 # Run 1: non-nodal data ev_info.overwrite_ddir = 1 # delete data dir if it exists ev_info.ifph5 = False ev_info.network = 'AK,AT,AV,CN,II,IU,TA,US,XM,XV,DE,ZE' ev_info.channel = 'BH?,HH?' # Run 2: denali nodal data #ev_info.overwrite_ddir = 0 #ev_info.ifph5 = True #ev_info.network = 'ZE' #ev_info.channel = '*' ##ev_info.station = '*' # CAUTION: Takes a LONG time! #ev_info.station = '1304' # note: PH5 does not understand -XXX station code ev_info.isave_raw = True ev_info.isave_raw_processed = True ev_info.rotateENZ = True ev_info.rotateRTZ = True ev_info.user = '******' ev_info.password = '******' #Anchorage aftershock ev_info.otime = obspy.UTCDateTime("2019-02-18 17:02:46.710") ev_info.elat = 61.4682 ev_info.elon = -149.9607 ev_info.edep = 37600 ev_info.emag = 4.40 if iex == 2: #teleseismic event #for testing/comparing absolute amplitudes of nodal stations vs permanent stations ev_info.overwrite_ddir = 0 # 0 = do not delete data dir if it exists (must be 0 on the second run) ev_info.use_catalog = 0 # do not use event catalog for source parameters ev_info.ifverbose = True # debugging output ev_info.tbefore_sec = 100 ev_info.tafter_sec = 3600 #hour of data for this teleseismic event ev_info.resample_TF = False #note: permanent stations and nodes have different sample rates #ev_info.resample_freq = 50 #ev_info.scale_factor = 100 # Run 1: non-nodal data ev_info.overwrite_ddir = 0 # delete data dir if it exists ev_info.ifph5 = False ev_info.network = 'AK,AT,AV,CN,II,IU,TA,US,XM,XV,DE,ZE' ev_info.channel = 'BH?,HH?' ev_info.network = 'AK,AT,AV,CN,II,IU,TA,US,XM,XV,DE' #for permanent stations ev_info.station = 'CUT,FAPT,UAF01,BWN,MCK,RND' #permanent stations nearest the nodes listed below # Run 2: denali nodal data #ev_info.ifph5 = True #ev_info.network = 'ZE' #ev_info.channel = '*' ##ev_info.station = '*' # CAUTION: Takes a LONG time! #ev_info.station = '1304' # note: PH5 does not understand -XXX station code #'1304'#colocated with FAPT and UAF01 #ev_info.station = '1304,1305,154,1253,1199,1196,1197,1195,1156,1157,1158,1011,1010,1012' # Rotate # ERROR (R==> DP1 90.0 0.0 DP2 90.0 0.0 DPZ 90.0 0.0) # ValueError: The given directions are not linearly independent, # at least within numerical precision. Determinant of the base change matrix: 0 ev_info.isave_raw = True ev_info.isave_raw_processed = True ev_info.rotateENZ = True ev_info.rotateRTZ = True #ev_info.ifph5 = True #must be true for nodes and false (commented out) for permanent stations ev_info.user = '******' ev_info.password = '******' #ev_info.phase_window = True #WARNING this will cut your waveforms near your chosen phase #ev_info.phases = ["P","S"] # Choosing time period with respect to P & S #ev_info.write_sac_phase = True #note: cap reads in picks from header (if set to true, be sure you want this) #Set the water level high to have the nodal data waveforms match that of the permanent stations at longer periods (10-20s) ev_info.water_level = 6000 #default is 60 #largest event during nodal deployment ev_info.otime = obspy.UTCDateTime("2019-02-22T10:17:28.000") ev_info.elat = -2.26 ev_info.elon = -77.09 ev_info.edep = 121100 ev_info.emag = 7.49 if iex == 3: #local events from list ev_info.use_catalog = 0 # do not use event catalog for source parameters ev_info.ifverbose = True # debugging output # subset waveforms (Run 1) ev_info.min_dist = 0 ev_info.max_dist = 300 #ev_info.min_lat = 60 #ev_info.max_lat = 65 #ev_info.min_lon = -151 #ev_info.max_lon = -148 ev_info.tbefore_sec = 100 ev_info.tafter_sec = 300 # for CAP ev_info.resample_TF = True ev_info.resample_freq = 50 ev_info.scale_factor = 100 # Run 1: non-nodal data ev_info.overwrite_ddir = 0 # delete data dir if it exists ev_info.ifph5 = False ev_info.network = 'AK,AT,AV,CN,II,IU,TA,US,XM,XV,DE,ZE' ev_info.channel = 'BH?,HH?' # Run 2: denali nodal data #ev_info.ifph5 = True #ev_info.network = 'ZE' #ev_info.channel = '*' ##ev_info.station = '*' # CAUTION: Takes a LONG time! #ev_info.station = '5900' # note: PH5 does not understand -XXX station code ev_info.isave_raw = True ev_info.isave_raw_processed = True ev_info.rotateENZ = True ev_info.rotateRTZ = True ev_info.user = '******' ev_info.password = '******' # see paper_nodal_parks.m ievent = 1 events_file = "/home/carltape/REPOSITORIES/GEOTOOLS/python_util/pysep_dev/input/denali_parks_obspy.txt" eids, otimes, elons, elats, edeps, emags = reof.read_events_obspy_file( events_file) ev_info_list = [] #for xx in range(len(eids)): for xx in range(ievent - 1, ievent): ev_info_temp = ev_info.copy() ev_info_temp.otime = obspy.UTCDateTime(otimes[xx]) ev_info_temp.elat = elats[xx] ev_info_temp.elon = elons[xx] ev_info_temp.edep = edeps[xx] ev_info_temp.emag = emags[xx] ev_info_temp.eid = eids[xx] # append getwaveform objects ev_info_list.append(ev_info_temp) # always return ev_info ev_info = ev_info_list return (ev_info)