Changeset 1210 for SHX


Ignore:
Timestamp:
23.12.2016 12:11:02 (3 years ago)
Author:
klaus
Message:

added more networks to magnitude estimation; bugfix in Fdsn2MetaDb

Location:
SHX/trunk/SeismicHandler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/cmdscripts/LOCAL_MAGNITUDE_PLOT.SHC

    r1203 r1210  
    88default 6 hp1hz4  filter 
    99default 7 magnplot.png plotfile 
     10default 8 ;;  save file 
    1011 
    1112sdef trcno 
     
    2122del all 
    2223phase clear_all 
    23 fdsnws |#2|,|#3|,|#4| * * hh? "rtime 360 
    24 fdsnws |#2|,|#3|,|#4| * * hh? "rtime 360 /addr=eth /excludenets=z3,s 
     24echo bench $SYSTIME req start #1 $dsptrcs 
     25fdsnws |#2|,|#3|,|#4| * * ?h? "rtime 360 
     26echo bench $SYSTIME after req bgr #1 $dsptrcs 
     27fdsnws |#2|,|#3|,|#4| * * ?h? "rtime 360 /addr=eth /excludenets=z3,s 
     28echo bench $SYSTIME after req eth #1 $dsptrcs 
     29fdsnws |#2|,|#3|,|#4| * * ?h? "rtime 360 /addr=lmu /excludenets=z3,s 
     30echo bench $SYSTIME after req lmu #1 $dsptrcs 
     31fdsnws |#2|,|#3|,|#4| * * ?h? "rtime 360 /addr=resif /excludenets=z3,s 
     32echo bench $SYSTIME after req resif #1 $dsptrcs 
     33fdsnws |#2|,|#3|,|#4| * * ?h? "rtime 360 /addr=orfeus /excludenets=z3,s 
     34echo bench $SYSTIME after req orfeus #1 $dsptrcs 
     35fdsnws |#2|,|#3|,|#4| * * ?h? "rtime 360 /addr=gfz /excludenets=z3,s 
     36echo bench $SYSTIME after req gfz #1 $dsptrcs 
     37chanselect hh,eh,bh ,00,10,11 
     38meta all complete /addr=gfz 
     39echo bench $SYSTIME after meta gfz #1 $dsptrcs 
     40meta all complete /addr=orfeus 
     41echo bench $SYSTIME after meta orfeus #1 
     42meta all complete /addr=resif 
     43echo bench $SYSTIME after meta resif #1 
     44meta all complete /addr=lmu 
     45echo bench $SYSTIME after meta lmu #1 
    2546meta all complete /addr=eth 
     47echo bench $SYSTIME after meta eth #1 
    2648meta all complete /del_incomplete 
     49echo bench $SYSTIME after meta bgr #1 $dsptrcs 
    2750sort_by_distance #2 #3 
     51if #8 eqs ;; goto saveok: 
     52    writeo #8 all mseed 
     53saveok: 
    2854@THEOPHASE LOCAL ALL Pg,Sg,Pn,Sn 
    2955calc i &trcno = $dsptrcs 
     
    3662    del |1-|"trcno| 
    3763filok: 
    38 sort_by_distance #2 #3 
    3964@MAGNITUDE DETERMINE ml ALL Pg,Sg,Pn,Sn #5 
    4065magnitude plot ml #7 
    4166zoom all 3 
    42 mplplot/tracelabelsize=5 |trc_|#7| sw blue,2*lightblue #1 
     67!mplplot/tracelabelsize=5 |trc_|#7| sw blue,2*lightblue #1 
    4368magnitude dumpfile ml |dump_|#7| 
    4469 
  • SHX/trunk/SeismicHandler/commands/fdsnws.py

    r1205 r1210  
    198198                lat, lon, radius = reqpars 
    199199                client = Client(fdsnadr) 
    200                 inv = client.get_stations( starttime=reqtime, 
    201                     endtime=(reqtime+reqlength), latitude=lat, 
    202                     longitude=lon, maxradius=radius ) 
     200                try: 
     201                    inv = client.get_stations( starttime=reqtime, 
     202                        endtime=(reqtime+reqlength), latitude=lat, 
     203                        longitude=lon, maxradius=radius ) 
     204                except: 
     205                    print "no data in given radius" 
     206                    return 
    203207                bulk = "" 
    204208                for sta in inv.get_contents()['stations']: 
     
    216220                if bulk == "": 
    217221                    return 
    218                 st = client.get_waveforms_bulk( StringIO.StringIO(bulk) ) 
     222                try: 
     223                    st = client.get_waveforms_bulk( StringIO.StringIO(bulk) ) 
     224                except: 
     225                    print "get_waveforms_bulk failed for", bulk 
     226                    return 
    219227            elif reqmode == 'bystationset': 
    220228                bulk = "" 
     
    233241                    return 
    234242                client = Client(fdsnadr) 
    235                 st = client.get_waveforms_bulk( StringIO.StringIO(bulk) ) 
     243                try: 
     244                    st = client.get_waveforms_bulk( StringIO.StringIO(bulk) ) 
     245                except: 
     246                    print "** get_waveforms_bulk failed for", bulk 
     247                    print "** at address", fdsnadr 
     248                    return 
    236249            else: 
    237250                raise ShxError( "unknown request mode '%'" % reqmode, 
  • SHX/trunk/SeismicHandler/tools/FdsnMeta2Db.py

    r1191 r1210  
    1818""" 
    1919 
     20import sys 
    2021import pickle 
    2122from obspy.clients.fdsn.client import Client 
     
    3233     
    3334    client = Client(server) 
    34     inv = client.get_stations( network=net, starttime=stime, endtime=etime, 
    35         level="response" ) 
     35    try: 
     36        inv = client.get_stations( network=net, starttime=stime, endtime=etime, 
     37            level="response" ) 
     38    except: 
     39        print "no data found for net '%s'" % net 
     40        return 
    3641    #fp = open( 'metasave.pickle' ) 
    3742    #inv = pickle.load(fp) 
     
    4651                print '    ', sta.code, chan.location_code, chan.code, chan.start_date, chan.end_date 
    4752                print '    ', chan.response.instrument_sensitivity.value 
    48                 paz = chan.response.get_paz() 
     53                try: 
     54                    paz = chan.response.get_paz() 
     55                except: 
     56                    print "no response for", sta.code, chan.location_code, chan.code 
     57                    continue 
    4958                #print '      ', paz.normalization_factor, 
    5059                #print '      ', paz.normalization_frequency 
Note: See TracChangeset for help on using the changeset viewer.