rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
userid = "obspyck" passwd = "obspyck" | userid = self.server['User'] passwd = self.server['Password'] | def uploadSeishub(self): """ Upload xml file to seishub """ |
msg = "User: %s" % self.username | msg = "Account: %s" % userid msg += "\nUser: %s" % self.username | def uploadSeishub(self): """ Upload xml file to seishub """ |
userid = "obspyck" passwd = "obspyck" | userid = self.server['User'] passwd = self.server['Password'] | def deleteEventInSeishub(self, resource_name): """ Delete xml file from seishub. (Move to seishubs trash folder if this option is activated) """ |
auth = base64.encodestring('%s:%s' % ("obspyck", "obspyck"))[:-1] | userid = self.server['User'] passwd = self.server['Password'] auth = base64.encodestring('%s:%s' % (userid, passwd))[:-1] | def getEventFromSeishub(self, resource_name): #document = xml.xpath(".//document_id") #document_id = document[self.seishubEventCurrent].text # Hack to show xml resource as document id resource_url = self.server['BaseUrl'] + "/xml/seismology/event/" + \ resource_name resource_req = urllib2.Request(resource_url) auth = b... |
msg = "Fetched event %i of %i (event_id: %s, user: %s)" % \ | msg = "Fetched event %i of %i (event_id: %s, account: %s, user: %s)"%\ | def getEventFromSeishub(self, resource_name): #document = xml.xpath(".//document_id") #document_id = document[self.seishubEventCurrent].text # Hack to show xml resource as document id resource_url = self.server['BaseUrl'] + "/xml/seismology/event/" + \ resource_name resource_req = urllib2.Request(resource_url) auth = b... |
resource_name, user) self.textviewStdOutImproved.write(msg) def updateEventListFromSeishub(self, starttime, endtime): | resource_name, account, user) self.textviewStdOutImproved.write(msg) def getEventListFromSeishub(self, starttime, endtime): | def getEventFromSeishub(self, resource_name): #document = xml.xpath(".//document_id") #document_id = document[self.seishubEventCurrent].text # Hack to show xml resource as document id resource_url = self.server['BaseUrl'] + "/xml/seismology/event/" + \ resource_name resource_req = urllib2.Request(resource_url) auth = b... |
Searches for events in the database and stores a list of resource names. All events with at least one pick set in between start- and | Searches for events in the database and returns a lxml ElementTree object. All events with at least one pick set in between start- and | def updateEventListFromSeishub(self, starttime, endtime): """ Searches for events in the database and stores a list of resource names. All events with at least one pick set in between start- and endtime are returned. |
auth = base64.encodestring('%s:%s' % ("obspyck", "obspyck"))[:-1] | userid = self.server['User'] passwd = self.server['Password'] auth = base64.encodestring('%s:%s' % (userid, passwd))[:-1] | def updateEventListFromSeishub(self, starttime, endtime): """ Searches for events in the database and stores a list of resource names. All events with at least one pick set in between start- and endtime are returned. |
self.dicts[self.stPt]['S']=int(round(event.xdata)) | self.dicts[self.stPt]['S'] = int(round(event.xdata)) self.dicts[self.stPt]['Saxind'] = self.axs.index(event.inaxes) | def pick(self, event): # Set new P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['setPick']: self.delPLine() self.delPLabel() self.delPsynthLine() self.dicts[self.stPt]['P']=int(round(event.xdata)) self.drawPLine() self.drawPLabel() self.drawPsynthLine() self.drawPsynthLabel() #check if the new P pick l... |
if self.flagPhase == 0 and event.key == self.dictKeybindings['setSOnsetImpulsive']: | if self.flagPhase == 1 and event.key == self.dictKeybindings['setSOnsetImpulsive']: | def pick(self, event): # Set new P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['setPick']: self.delPLine() self.delPLabel() self.delPsynthLine() self.dicts[self.stPt]['P']=int(round(event.xdata)) self.drawPLine() self.drawPLabel() self.drawPsynthLine() self.drawPsynthLabel() #check if the new P pick l... |
elif self.flagPhase == 0 and event.key == self.dictKeybindings['setSOnsetEmergent']: | elif self.flagPhase == 1 and event.key == self.dictKeybindings['setSOnsetEmergent']: | def pick(self, event): # Set new P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['setPick']: self.delPLine() self.delPLabel() self.delPsynthLine() self.dicts[self.stPt]['P']=int(round(event.xdata)) self.drawPLine() self.drawPLabel() self.drawPsynthLine() self.drawPsynthLabel() #check if the new P pick l... |
self.threeDlocEventZ = float(event[10]) * 1000 | self.threeDlocEventZ = float(event[10]) | def load3dlocData(self): #self.load3dlocSyntheticPhases() event = open(self.threeDlocOutfile).readline().split() self.threeDlocEventLon = float(event[8]) self.threeDlocEventLat = float(event[9]) self.threeDlocEventZ = float(event[10]) * 1000 self.threeDlocEventErrX = float(event[11]) self.threeDlocEventErrY = float(eve... |
self.threeDlocEventErrZ = float(event[13]) * 1000 | self.threeDlocEventErrZ = float(event[13]) self.threeDlocEventStdErr = float(event[14]) self.threeDlocEventAzimGap = float(event[15]) | def load3dlocData(self): #self.load3dlocSyntheticPhases() event = open(self.threeDlocOutfile).readline().split() self.threeDlocEventLon = float(event[8]) self.threeDlocEventLat = float(event[9]) self.threeDlocEventZ = float(event[10]) * 1000 self.threeDlocEventErrX = float(event[11]) self.threeDlocEventErrY = float(eve... |
count = 0 | self.staMagCount = 0 | def updateNetworkMag(self): count = 0 self.netMag = 0 for i in range(len(self.streams)): if self.dicts[i]['MagUse'] and self.dicts[i].has_key('Mag'): count += 1 self.netMag += self.dicts[i]['Mag'] if count == 0: self.netMag = np.NaN else: self.netMag /= count self.netMagLabel = '\n\n\n\n %.2f' % self.netMag try: self.... |
count += 1 | self.staMagCount += 1 | def updateNetworkMag(self): count = 0 self.netMag = 0 for i in range(len(self.streams)): if self.dicts[i]['MagUse'] and self.dicts[i].has_key('Mag'): count += 1 self.netMag += self.dicts[i]['Mag'] if count == 0: self.netMag = np.NaN else: self.netMag /= count self.netMagLabel = '\n\n\n\n %.2f' % self.netMag try: self.... |
if count == 0: | self.staMags.append(self.dicts[i]['Mag']) if self.staMagCount == 0: | def updateNetworkMag(self): count = 0 self.netMag = 0 for i in range(len(self.streams)): if self.dicts[i]['MagUse'] and self.dicts[i].has_key('Mag'): count += 1 self.netMag += self.dicts[i]['Mag'] if count == 0: self.netMag = np.NaN else: self.netMag /= count self.netMagLabel = '\n\n\n\n %.2f' % self.netMag try: self.... |
self.netMag /= count | self.netMag /= self.staMagCount self.netMagVar = np.var(self.staMags) | def updateNetworkMag(self): count = 0 self.netMag = 0 for i in range(len(self.streams)): if self.dicts[i]['MagUse'] and self.dicts[i].has_key('Mag'): count += 1 self.netMag += self.dicts[i]['Mag'] if count == 0: self.netMag = np.NaN else: self.netMag /= count self.netMagLabel = '\n\n\n\n %.2f' % self.netMag try: self.... |
self.scatterMag = self.ax3dloc.scatter(self.scatterMagLon, self.scatterMagLat, s = 150, | if len(self.scatterMagLon) > 0 : self.scatterMag = self.ax3dloc.scatter(self.scatterMagLon, self.scatterMagLat, s = 150, | def show3dlocEventMap(self): self.load3dlocData() self.calculateStationMagnitudes() self.updateNetworkMag() #print self.dicts[0] self.fig3dloc = plt.figure() self.ax3dloc = self.fig3dloc.add_subplot(111) self.ax3dloc.scatter([self.threeDlocEventLon], [self.threeDlocEventLat], 30, color = 'red', marker = 'o') errLon, er... |
self.scatterMag.set_facecolors(self.eventMapColors) | try: self.scatterMag.set_facecolors(self.eventMapColors) except: pass | def show3dlocEventMap(self): self.load3dlocData() self.calculateStationMagnitudes() self.updateNetworkMag() #print self.dicts[0] self.fig3dloc = plt.figure() self.ax3dloc = self.fig3dloc.add_subplot(111) self.ax3dloc.scatter([self.threeDlocEventLon], [self.threeDlocEventLat], 30, color = 'red', marker = 'o') errLon, er... |
temp = float(self.dicts[i].has_key('PErr2') - self.dicts[i].has_key('PErr1')) | temp = float(self.dicts[i]['PErr2'] - self.dicts[i]['PErr1']) | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
if self.dicts[i]['POnset'] == 'impulsive': Sub(pick, "onset").text = 'impulsive' elif self.dicts[i]['POnset'] == 'emergent': Sub(pick, "onset").text = 'emergent' | Sub(pick, "onset").text = self.dicts[i]['POnset'] | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(Sub(pick, "min_amp"), "value").text = "0.00000" Sub(pick, "phase_compu").text = "IPU0" Sub(Sub(pick, "phase_res"), "value").text = "0.17000" Sub(Sub(pick, "phase_weight"), "value").text = "1.00000" Sub(Sub(pick, "phase_delay"), "value").text = "0.00000" Sub(Sub(pick, "azimuth"), "value").text = "1.922043" Sub(Sub(p... | Sub(Sub(pick, "min_amp"), "value") if self.dicts[i].has_key('Psynth'): Sub(pick, "phase_compu").text = "IPU0" Sub(Sub(pick, "phase_res"), "value").text = '%s' % self.dicts[i]['Pres'] Sub(Sub(pick, "phase_weight"), "value") Sub(Sub(pick, "phase_delay"), "value") Sub(Sub(pick, "azimuth"), "value").text = '%s' % self.dic... | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(date, "value").text = "2010-02-09T19:19:13.550" | Sub(date, "value").text = self.threeDlocEventTime.isoformat() + '.%03i' % self.threeDlocEventTime.microsecond | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(lat, "value").text = "50.579498" Sub(lat, "uncertainty").text = "2.240000" | Sub(lat, "value").text = '%s' % self.threeDlocEventLat Sub(lat, "uncertainty").text = '%s' % self.threeDlocEventErrY | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(lon, "value").text = "12.243500" Sub(lon, "uncertainty").text = "2.240000" | Sub(lon, "value").text = '%s' % self.threeDlocEventLon Sub(lon, "uncertainty").text = '%s' % self.threeDlocEventErrX | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(depth, "value").text = "12.243500" Sub(depth, "uncertainty").text = "2.240000" | Sub(depth, "value").text = '%s' % self.threeDlocEventZ Sub(depth, "uncertainty").text = '%s' % self.threeDlocEventErrZ | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(origin, "earth_mod").text = "VOG" | Sub(origin, "earth_mod").text = "STAUFEN" | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(quality, "P_usedPhaseCount").text = "7" Sub(quality, "S_usedPhaseCount").text = "7" Sub(quality, "usedPhaseCount").text = "14" Sub(quality, "associatedPhaseCount").text = "14" Sub(quality, "associatedStationCount").text = "14" | Sub(quality, "P_usedPhaseCount").text = '%i' % self.threeDlocPCount Sub(quality, "S_usedPhaseCount").text = '%i' % self.threeDlocSCount Sub(quality, "usedPhaseCount").text = '%i' % (self.threeDlocPCount + self.threeDlocSCount) Sub(quality, "usedStationCount").text = '%i' % self.threeDlocUsedStationsCount Sub(quality, "... | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(quality, "standardError").text = "0.170000" Sub(quality, "secondaryAzimuthalGap").text = "343.00000" | Sub(quality, "standardError").text = '%s' % self.threeDlocEventStdErr Sub(quality, "secondaryAzimuthalGap").text = '%s' % self.threeDlocEventAzimGap | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(quality, "minimumDistance").text = "45.309029" Sub(quality, "maximumDistance").text = "90.594482" Sub(quality, "medianDistance").text = "64.749686" | Sub(quality, "minimumDistance").text = '%s' % min(epidists) Sub(quality, "maximumDistance").text = '%s' % max(epidists) Sub(quality, "medianDistance").text = '%s' % np.median(epidists) | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(mag, "value").text = "1.823500" Sub(mag, "uncertainty").text = "0.1000000" | Sub(mag, "value").text = '%s' % self.netMag Sub(mag, "uncertainty").text = '%s' % self.netMagVar | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
Sub(magnitude, "stationCount").text = "14" | Sub(magnitude, "stationCount").text = '%i' % self.staMagCount | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i ... |
if dO['Program'] == "hyp2000": | if self.dictOrigin['Program'] == "hyp2000": | def dicts2XML(self): """ Returns information of all dictionaries as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.dictEvent['xmlEventID'] event_type = Sub(xml, "event_type") Sub(event_type, "value").text = "manual" Sub(event_type, "user").text = self.username Sub(event_type, "publi... |
print "writing xml as %s... (for quick inspection only)" % tmpfile | print "writing xml as %s (for quick inspection only)" % tmpfile | def uploadSeishub(self): """ Upload xml file to seishub """ userid = "admin" passwd = "admin" |
self.on_qToolButton_previousStream_clicked(0) | self.on_qToolButton_previousStream_clicked() | def __mpl_keyPressEvent(self, ev): if self.widgets.qToolButton_showMap.isChecked(): return keys = self.keys phase_type = str(self.widgets.qComboBox_phaseType.currentText()) dict = self.dicts[self.stPt] st = self.streams[self.stPt] ####################################################################### # Start of key e... |
self.on_qToolButton_nextStream_clicked(0) | self.on_qToolButton_nextStream_clicked() | def __mpl_keyPressEvent(self, ev): if self.widgets.qToolButton_showMap.isChecked(): return keys = self.keys phase_type = str(self.widgets.qComboBox_phaseType.currentText()) dict = self.dicts[self.stPt] st = self.streams[self.stPt] ####################################################################### # Start of key e... |
PsynthLabelString = 'Psynth: %+.3f' % self.dicts[self.stPt]['Pres'] | PsynthLabelString = 'Psynth: %+.3fs' % self.dicts[self.stPt]['Pres'] | def drawPsynthLabel(self): if not self.dicts[self.stPt].has_key('Psynth'): return PsynthLabelString = 'Psynth: %+.3f' % self.dicts[self.stPt]['Pres'] self.PsynthLabel = self.axs[0].text(self.dicts[self.stPt]['Psynth'], 1 - 0.08 * len(self.axs), ' ' + PsynthLabelString, transform = self.trans[0], color=self.dictPhaseCo... |
SsynthLabelString = 'Ssynth: %+.3f' % self.dicts[self.stPt]['Sres'] | SsynthLabelString = 'Ssynth: %+.3fs' % self.dicts[self.stPt]['Sres'] | def drawSsynthLabel(self): if not self.dicts[self.stPt].has_key('Ssynth'): return SsynthLabelString = 'Ssynth: %+.3f' % self.dicts[self.stPt]['Sres'] self.SsynthLabel = self.axs[0].text(self.dicts[self.stPt]['Ssynth'], 1 - 0.08 * len(self.axs), '\n ' + SsynthLabelString, transform = self.trans[0], color=self.dictPhase... |
self.netMagLabel = '\n\n\n\n %.2f' % self.netMag | print "new network magnitude: %.2f (Variance: %.2f)" % (self.netMag, self.netMagVar) self.netMagLabel = '\n\n\n\n %.2f (Var: %.2f)' % (self.netMag, self.netMagVar) | def updateNetworkMag(self): self.staMagCount = 0 self.netMag = 0 self.staMags = [] for i in range(len(self.streams)): if self.dicts[i]['MagUse'] and self.dicts[i].has_key('Mag'): self.staMagCount += 1 self.netMag += self.dicts[i]['Mag'] self.staMags.append(self.dicts[i]['Mag']) if self.staMagCount == 0: self.netMag = n... |
self.threeDlocEventErrY, self.threeDlocEventZ, self.threeDlocEventErrZ), va = 'top', | self.threeDlocEventErrY, self.threeDlocEventZ * 1000, self.threeDlocEventErrZ * 1000), va = 'top', | def show3dlocEventMap(self): self.load3dlocData() self.calculateStationMagnitudes() self.updateNetworkMag() #print self.dicts[0] self.fig3dloc = plt.figure() self.ax3dloc = self.fig3dloc.add_subplot(111) self.ax3dloc.scatter([self.threeDlocEventLon], [self.threeDlocEventLat], 30, color = 'red', marker = 'o') errLon, er... |
Sub(date, "value").text = (picktime.isoformat() + '.%06i' % picktime.microsecond) | Sub(date, "value").text = picktime.isoformat() | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidis... |
Sub(date, "value").text = self.threeDlocEventTime.isoformat() + '.%03i' % self.threeDlocEventTime.microsecond | Sub(date, "value").text = self.threeDlocEventTime.isoformat() | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidis... |
lon = Sub(origin, "latitude") | lon = Sub(origin, "longitude") | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidis... |
model = line[17:22].strip() | def loadHyp2000Data(self): #self.load3dlocSyntheticPhases() lines = open(self.hyp2000Summary).readlines() if lines == []: print "Error: Did not find Hypo2000 output file" return # goto origin info line while True: try: line = lines.pop(0) except: break if line.startswith(" YEAR MO DA --ORIGIN--"): break try: line = li... | |
if self.dicts[i]['PPol'] == 'up' or self.dicts[i]['PPol'] == 'poorup': | if self.dicts[i]['PPol'] == 'up': | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
elif self.dicts[i]['PPol'] == 'down' or self.dicts[i]['PPol'] == 'poordown': | phase_compu += "U" elif self.dicts[i]['PPol'] == 'poorup': Sub(pick, "polarity").text = 'positive' phase_compu += "+" elif self.dicts[i]['PPol'] == 'down': | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
Sub(pick, "phase_compu").text | Sub(pick, "phase_compu").text = phase_compu | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
if self.dicts[i]['SPol'] == 'up' or self.dicts[i]['SPol'] == 'poorup': | if self.dicts[i]['SPol'] == 'up': | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
elif self.dicts[i]['SPol'] == 'down' or self.dicts[i]['SPol'] == 'poordown': | phase_compu += "U" elif self.dicts[i]['SPol'] == 'poorup': Sub(pick, "polarity").text = 'positive' phase_compu += "+" elif self.dicts[i]['SPol'] == 'down': | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
Sub(origin, "earth_mod").text = "STAUFEN" Sub(origin, "originUncertainty") | Sub(origin, "earth_mod").text = self.EventUsedModel uncertainty = Sub(origin, "originUncertainty") Sub(uncertainty, "preferredDescription").text = "uncertainty ellipse" Sub(uncertainty, "horizontalUncertainty") Sub(uncertainty, "minHorizontalUncertainty") Sub(uncertainty, "maxHorizontalUncertainty") Sub(uncertainty, "a... | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
Sub(quality, "secondaryAzimuthalGap").text = '%s' % self.EventAzimGap | Sub(quality, "azimuthalGap").text = '%s' % self.EventAzimGap Sub(quality, "secondaryAzimuthalGap") | def hyp20002XML(self): """ Returns output of hypo2000 as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidi... |
Sub(pick, "phase_compu").text = | Sub(pick, "phase_compu").text | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidis... |
if self.locationType = "3dloc": | if self.locationType == "3dloc": | def uploadSeishub(self): """ Upload xml file to seishub """ userid = "admin" passwd = "admin" |
elif self.locationType = "hyp2000": | print "creating xml with picks and 3dloc event data." elif self.locationType == "hyp2000": | def uploadSeishub(self): """ Upload xml file to seishub """ userid = "admin" passwd = "admin" |
print "creating xml with picks and hypo2000 event data." | def uploadSeishub(self): """ Upload xml file to seishub """ userid = "admin" passwd = "admin" | |
self.dicts[streamnum]['P'] | self.dicts[streamnum]['S'] | def loadHyp2000Data(self): #self.load3dlocSyntheticPhases() lines = open(self.hyp2000Summary).readlines() if lines == []: print "Error: Did not find Hypo2000 output file" return # goto origin info line while True: try: line = lines.pop(0) except: break if line.startswith(" YEAR MO DA --ORIGIN--"): break try: line = li... |
streams.append(read('20091227_105240_Z.RJOB')) streams[0].append(read('20091227_105240_N.RJOB')[0]) streams[0].append(read('20091227_105240_E.RJOB')[0]) streams.append(read('20091227_105240_Z.RMOA')) streams[1].append(read('20091227_105240_N.RMOA')[0]) streams[1].append(read('20091227_105240_E.RMOA')[0]) streams.append... | streams.append(read('/scratch/glade/test.gse')) | def main(): usage = "USAGE: %prog -t <datetime> -d <duration> -i <channelids>" parser = OptionParser(usage) parser.add_option("-t", "--time", dest="time", help="Starttime of seismogram to retrieve. It takes a " "string which UTCDateTime can convert. " "E.g. '2010-01-10T05:00:00'", default='2009-07-21T04:33:00') parser.... |
for st in streams: | for i in range(len(self.streams))[::-1]: st = self.streams[i] | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
print 'Error: All streams must have either one Z trace or a set of three ZNE traces' return | print 'Warning: All streams must have either one Z trace or a set of three ZNE traces. Stream discarded.' self.streams.pop(i) continue | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
print 'Error: All streams must have either one Z trace or a set of three ZNE traces' return | print 'Warning: All streams must have either one Z trace or a set of three ZNE traces. Stream discarded' self.streams.pop(i) continue | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
print 'Error: All streams must have either one Z trace or a set of ZNE traces (from the same station)' return | print 'Warning: All streams must have either one Z trace or a set of three ZNE traces. Stream discarded.' self.streams.pop(i) continue | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
for i in range(len(self.streams)): self.dicts.append({}) | for i in range(len(self.streams))[::-1]: | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
station = streams[i][0].stats.station.strip() self.dicts[i]['Station'] = station self.dictsMap[station] = self.dicts[i] | sta = self.streams[i][0].stats.station.strip() self.dicts[i]['Station'] = sta self.dictsMap[sta] = self.dicts[i] | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
net = streams[i][0].stats.network.strip() | net = self.streams[i][0].stats.network.strip() | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
print "got no network information, setting to default: BW" sta = self.dicts[i]['Station'] | print "Warning: Got no network information, setting to default: BW" print "=" * 70 | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
date = streams[i][0].stats.starttime.date print 'fetching station data from seishub...' lon, lat, ele = getCoord(net, sta) | print "-" * 70 date = self.streams[i][0].stats.starttime.date print 'fetching station metadata from seishub...' try: lon, lat, ele = getCoord(net, sta) except: print 'Error: could not load station metadata. Discarding stream.' self.streams.pop(i) self.dicts.pop(i) continue | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
self.dicts[i]['pazZ'] = client1.station.getPAZ(net, sta, date, channel_id = streams[i][0].stats.channel) self.dicts[i]['pazN'] = client1.station.getPAZ(net, sta, date, channel_id = streams[i][1].stats.channel) self.dicts[i]['pazE'] = client1.station.getPAZ(net, sta, date, channel_id = streams[i][2].stats.channel) self.... | self.dicts[i]['pazZ'] = client1.station.getPAZ(net, sta, date, channel_id = self.streams[i][0].stats.channel) self.dicts[i]['pazN'] = client1.station.getPAZ(net, sta, date, channel_id = self.streams[i][1].stats.channel) self.dicts[i]['pazE'] = client1.station.getPAZ(net, sta, date, channel_id = self.streams[i][2].stats... | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
self.stNum=len(streams) | self.stNum=len(self.streams) | def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpa... |
print "Event data from seishub loaded." | def on_select(item): print '--> ', item.labelstr if item.labelstr == 'quit': plt.close() elif item.labelstr == 'clearAll': self.delAllItems() self.clearDictionaries() self.locationType = None self.drawAllItems() self.redraw() elif item.labelstr == 'clearEvent': self.delAllItems() self.clearEventDictionaries() self.loca... | |
f.write(fmt % (self.stationlist[i], 'P', date, delta, | f.write(fmt % (self.dicts[i]['Station'], 'P', date, delta, | def do3dLoc(self): self.xmlEventID = '%i' % time.time() subprocess.call(self.threeDlocPreCall, shell = True) f = open(self.threeDlocInfile, 'w') network = "BW" fmt = "%04s %s %s %5.3f -999.0 0.000 -999. 0.000 T__DR_ %9.6f %9.6f %8.6f\n" self.coords = [] for i in range(len(self.streams)): #lon, lat, ele = getCoo... |
f.write(fmt % (self.stationlist[i], 'S', date, delta, | f.write(fmt % (self.dicts[i]['Station'], 'S', date, delta, | def do3dLoc(self): self.xmlEventID = '%i' % time.time() subprocess.call(self.threeDlocPreCall, shell = True) f = open(self.threeDlocInfile, 'w') network = "BW" fmt = "%04s %s %s %5.3f -999.0 0.000 -999. 0.000 T__DR_ %9.6f %9.6f %8.6f\n" self.coords = [] for i in range(len(self.streams)): #lon, lat, ele = getCoo... |
stationColor = 'lightgray' | stationColor = 'gray' | def showEventMap(self): #print self.dicts[0] self.figEventMap = plt.figure(2) self.axEventMap = self.figEventMap.add_subplot(111) self.axEventMap.scatter([self.EventLon], [self.EventLat], 30, color = 'red', marker = 'o') errLon, errLat = utlLonLat(self.EventLon, self.EventLat, self.EventErrX, self.EventErrY) errLon -= ... |
self.widgets.qToolButton_debug.setEnabled(False) | self.widgets.qToolButton_debug.setEnabled(True) | def __init__(self, client, streams, options, keys): """ Standard init. """ self.client = client self.streams = streams self.options = options self.keys = keys # init the GUI stuff QtGui.QMainWindow.__init__(self) # Init the widgets from the autogenerated file. # All GUI elements will be accessible via self.widgets.nam... |
def on_qToolButton_debug_clicked(self, dummy_int): | def on_qToolButton_debug_clicked(self): | def on_qToolButton_debug_clicked(self, dummy_int): self.debug() |
import ipdb ipdb.set_trace() except ImportError: import pdb pdb.set_trace() | import ipdb;ipdb.set_trace() except: import pdb;pdb.set_trace() QtCore.pyqtRestoreInputHook() | def debug(self): sys.stdout = self.stdout_backup sys.stderr = self.stderr_backup try: import ipdb ipdb.set_trace() except ImportError: import pdb pdb.set_trace() self.stdout_backup = sys.stdout self.stderr_backup = sys.stderr sys.stdout = self.widgets.qPlainTextEdit_stdout sys.stderr = self.widgets.qPlainTextEdit_stder... |
self.t.append(np.arange(starttime_local, starttime_local + (dt * npts), dt)) | sampletimes = np.arange(starttime_local, starttime_local + (dt * npts), dt) if len(sampletimes) == npts + 1: sampletimes = sampletimes[:-1] self.t.append(sampletimes) | def drawAxes(self): st = self.streams[self.stPt] #we start all our x-axes at 0 with the starttime of the first (Z) trace starttime_global = st[0].stats.starttime self.axs = [] self.plts = [] self.trans = [] self.t = [] trNum = len(st.traces) for i in range(trNum): npts = st[i].stats.npts smprt = st[i].stats.sampling_ra... |
print "Minimum for magnitude estimation set: %s at %s"%(self.dicts[self.stPt]['MagMin1'],self.dicts[self.stPt]['MagMin1T']) | print "Minimum for magnitude estimation set: %s at %s"%(self.dicts[self.stPt]['MagMin2'],self.dicts[self.stPt]['MagMin2T']) | def pick(self, event): # Set new P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['setPick']: self.delPLine() self.delPPolMarker() self.delPLabel() self.delPWeightLabel() self.dicts[self.stPt]['P']=int(round(event.xdata)) self.drawPLine() self.drawPPolMarker() self.drawPLabel() self.drawPWeightLabel() #c... |
print "Maximum for magnitude estimation set: %s at %s"%(self.dicts[self.stPt]['MagMax1'],self.dicts[self.stPt]['MagMax1T']) | print "Maximum for magnitude estimation set: %s at %s"%(self.dicts[self.stPt]['MagMax2'],self.dicts[self.stPt]['MagMax2T']) | def pick(self, event): # Set new P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['setPick']: self.delPLine() self.delPPolMarker() self.delPLabel() self.delPWeightLabel() self.dicts[self.stPt]['P']=int(round(event.xdata)) self.drawPLine() self.drawPPolMarker() self.drawPLabel() self.drawPWeightLabel() #c... |
self.labelStreamName, self.labelStreamNumber, | self.comboboxStreamName, self.labelStreamNumber, | def on_togglebuttonShowMap_clicked(self, event): buttons_deactivate = [self.buttonClearAll, self.buttonClearOrigMag, self.buttonClearFocMec, self.buttonDoHyp2000, self.buttonDo3dloc, self.buttonDoNLLoc, self.buttonCalcMag, self.comboboxNLLocModel, self.buttonDoFocmec, self.togglebuttonShowFocMec, self.buttonNextFocMec,... |
self.toolbar.pan(True) | self.toolbar.pan() self.toolbar.zoom() | def on_togglebuttonShowMap_clicked(self, event): buttons_deactivate = [self.buttonClearAll, self.buttonClearOrigMag, self.buttonClearFocMec, self.buttonDoHyp2000, self.buttonDo3dloc, self.buttonDoNLLoc, self.buttonCalcMag, self.comboboxNLLocModel, self.buttonDoFocmec, self.togglebuttonShowFocMec, self.buttonNextFocMec,... |
self.labelStreamName, self.labelStreamNumber, | self.comboboxStreamName, self.labelStreamNumber, | def on_togglebuttonShowFocMec_clicked(self, event): buttons_deactivate = [self.buttonClearAll, self.buttonClearOrigMag, self.buttonClearFocMec, self.buttonDoHyp2000, self.buttonDo3dloc, self.buttonDoNLLoc, self.buttonCalcMag, self.comboboxNLLocModel, self.buttonDoFocmec, self.togglebuttonShowMap, self.togglebuttonShowW... |
self.labelStreamName, self.labelStreamNumber, | self.comboboxStreamName, self.labelStreamNumber, | def on_togglebuttonShowWadati_clicked(self, event): buttons_deactivate = [self.buttonClearAll, self.buttonClearOrigMag, self.buttonClearFocMec, self.buttonDoHyp2000, self.buttonDo3dloc, self.buttonDoNLLoc, self.buttonCalcMag, self.comboboxNLLocModel, self.buttonDoFocmec, self.togglebuttonShowFocMec, self.buttonNextFocM... |
xmin, xmax = self.axs[0].get_xlim() self.delAxes() self.fig.clear() self.drawAxes() self.drawSavedPicks() self.multicursorReinit() self.axs[0].set_xlim(xmin, xmax) self.updatePlot() msg = "Going to previous stream" self.updateStreamLabels() self.textviewStdOutImproved.write(msg) def on_buttonNextStream_clicked(self, e... | self.comboboxStreamName.set_active(self.stPt) def on_comboboxStreamName_changed(self, event): self.stPt = self.comboboxStreamName.get_active() | def on_buttonPreviousStream_clicked(self, event): self.stPt = (self.stPt - 1) % self.stNum xmin, xmax = self.axs[0].get_xlim() self.delAxes() self.fig.clear() self.drawAxes() self.drawSavedPicks() self.multicursorReinit() self.axs[0].set_xlim(xmin, xmax) self.updatePlot() msg = "Going to previous stream" self.updateStr... |
msg = "Going to next stream" self.updateStreamLabels() self.textviewStdOutImproved.write(msg) | msg = "Going to stream: %s" % self.dicts[self.stPt]['Station'] self.updateStreamNumberLabel() self.textviewStdOutImproved.write(msg) def on_buttonNextStream_clicked(self, event): self.stPt = (self.stPt + 1) % self.stNum self.comboboxStreamName.set_active(self.stPt) | def on_buttonNextStream_clicked(self, event): self.stPt = (self.stPt + 1) % self.stNum xmin, xmax = self.axs[0].get_xlim() self.delAllItems() self.delAxes() self.fig.clear() self.drawAxes() self.drawSavedPicks() self.multicursorReinit() self.axs[0].set_xlim(xmin, xmax) self.updatePlot() msg = "Going to next stream" sel... |
self.labelStreamName = self.gla.get_widget("labelStreamName") | self.comboboxStreamName = self.gla.get_widget("comboboxStreamName") | def __init__(self, client = None, streams = None, options = None): self.client = client self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagWheelZoom = True #Switch use of mousewheel for zooming #this next flag indicates if we zoom on time or amplitude axis self.... |
def updateStreamLabels(self): | def updateStreamNumberLabel(self): | def updateStreamLabels(self): self.labelStreamNumber.set_markup("<tt>%02i/%02i</tt>" % \ (self.stPt + 1, self.stNum)) self.labelStreamName.set_markup("<tt><b>%s</b></tt>" % \ self.dicts[self.stPt]['Station']) |
self.labelStreamName.set_markup("<tt><b>%s</b></tt>" % \ self.dicts[self.stPt]['Station']) | def updateStreamNameCombobox(self): self.comboboxStreamName.set_active(self.stPt) def updateStreamLabels(self): self.updateStreamNumberLabel() self.updateStreamNameCombobox() | def updateStreamLabels(self): self.labelStreamNumber.set_markup("<tt>%02i/%02i</tt>" % \ (self.stPt + 1, self.stNum)) self.labelStreamName.set_markup("<tt><b>%s</b></tt>" % \ self.dicts[self.stPt]['Station']) |
resource_name = self.seishubEventList[self.seishubEventCurrent].text | def on_buttonDeleteEvent_clicked(self, event): event = self.seishubEventList[self.seishubEventCurrent] resource_name = event.xpath(u"resource_name")[0].text account = event.xpath(u"account") user = event.xpath(u"user") if account: account = account[0].text else: account = None if user: user = user[0].text else: user = ... | |
self.flagFiltZPH=True | self.flagFiltZPH=False | def __init__(self, streams = None): self.streams = streams #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpass':2, 'Highpass':3} self.flagFiltZPH=T... |
self.fig.canvas.toolbar.pan() | self.fig.canvas.toolbar.zoom() | def __init__(self, streams = None): self.streams = streams #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpass':2, 'Highpass':3} self.flagFiltZPH=T... |
PsynthLabelString = 'Psynth' | PsynthLabelString = 'Psynth: %+.3f' % self.dicts[self.stPt]['Pres'] | def drawPsynthLabel(self): if not self.dicts[self.stPt].has_key('Psynth'): return PsynthLabelString = 'Psynth' self.PsynthLabel = self.axs[0].text(self.dicts[self.stPt]['Psynth'], 1 - 0.08 * len(self.axs), ' ' + PsynthLabelString, transform = self.trans[0], color=self.dictPhaseColors['Psynth']) |
SsynthLabelString = 'Ssynth' | SsynthLabelString = 'Ssynth: %+.3f' % self.dicts[self.stPt]['Sres'] | def drawSsynthLabel(self): if not self.dicts[self.stPt].has_key('Ssynth'): return SsynthLabelString = 'Ssynth' self.SsynthLabel = self.axs[0].text(self.dicts[self.stPt]['Ssynth'], 1 - 0.08 * len(self.axs), '\n ' + SsynthLabelString, transform = self.trans[0], color=self.dictPhaseColors['Ssynth']) |
self.check = CheckButtons(self.axFilt, ('Filter','Zero-Phase'),(False,True)) | self.check = CheckButtons(self.axFilt, ('Filter','Zero-Phase'),(self.flagFilt,self.flagFiltZPH)) | def addFiltButtons(self): #add filter buttons self.axFilt = self.fig.add_axes([0.22, 0.02, 0.15, 0.15],frameon=False,axisbg='lightgrey') self.check = CheckButtons(self.axFilt, ('Filter','Zero-Phase'),(False,True)) self.check.on_clicked(self.funcFilt) self.axFiltTyp = self.fig.add_axes([0.40, 0.02, 0.15, 0.15],frameon=F... |
phSamps = int(phSamps * self.streams[i][0].stats.sampling_rate) | phSamps = int(round(phSamps * self.streams[i][0].stats.sampling_rate)) | def load3dlocSyntheticPhases(self): try: fhandle = open(self.threeDlocOutfile, 'r') phaseList = fhandle.readlines() fhandle.close() except: return self.delPsynth() self.delSsynth() self.delPsynthLine() self.delPsynthLabel() self.delSsynthLine() self.delSsynthLabel() for phase in phaseList[1:]: # example for a synthetic... |
180, color = 'black', marker = 'x') self.ax3dloc.scatter(self.threeDlocSLons, self.threeDlocSLats, 440, color = self.dictPhaseColors['S'], marker = 'v', edgecolor= 'black') self.ax3dloc.scatter(self.threeDlocPLons, self.threeDlocPLats, 180, color = self.dictPhaseColors['P'], marker = 'v', edgecolor= 'black') for i in r... | 30, color = 'red', marker = 'o') self.ax3dloc.text(self.threeDlocEventLon, self.threeDlocEventLat, '%2.3f\n%2.3f' % (self.threeDlocEventLon, self.threeDlocEventLat), va = 'top') errLon, errLat = utlLonLat(self.threeDlocEventLon, self.threeDlocEventLat, self.threeDlocEventErrX, self.threeDlocEventErrY) errLon -= self.th... | def show3dlocEventMap(self): self.fig3dloc = plt.figure() self.ax3dloc = self.fig3dloc.add_subplot(111) self.ax3dloc.scatter([self.threeDlocEventLon], [self.threeDlocEventLat], 180, color = 'black', marker = 'x') self.ax3dloc.scatter(self.threeDlocSLons, self.threeDlocSLats, 440, color = self.dictPhaseColors['S'], mark... |
date += ".%03d" % (t.microsecond / 1e3 + 0.5) | date += ".%03d" % millisec | def do3dLoc(self): prog_dict = PROGRAMS['3dloc'] files = prog_dict['files'] self.setXMLEventID() precall = prog_dict['PreCall'] precall(prog_dict) |
date = t.strftime("%y%m%d%H%M%S") date += ".%02d" % (t.microsecond / 1e4 + 0.5) | hundredth = t.microsecond / 1e4 + 0.5 if hundredth == 100: t += 1 hundredth = 0 date = t.strftime("%y%m%d%H%M%S") + ".%02d" % hundredth | def dicts2hypo71Phases(self): """ Returns the pick information in self.dicts in hypo71 phase file format as a string. This string can then be written to a file. |
date2 = str(abs_sec) date2 += ".%02d" % (t2.microsecond / 1e4 + 0.5) | hundredth = t2.microsecond / 1e4 + 0.5 if hundredth == 100: abs_sec += 1 hundredth = 0 date2 = "%s.%02d" % (abs_sec, hundredth) | def dicts2hypo71Phases(self): """ Returns the pick information in self.dicts in hypo71 phase file format as a string. This string can then be written to a file. |
lon, lat, ele = getCoord(self.client, net, sta) | lon, lat, ele = getCoord(self.client, net, sta) print lon, lat, ele | def __init__(self, client = None, streams = None, options = None): self.client = client self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagWheelZoom = True #Switch use of mousewheel for zooming #this next flag indicates if we zoom on time or amplitude axis self.... |
ele / 1e3)) | ele)) | def do3dLoc(self): self.setXMLEventID() #subprocess.call(self.threeDlocPreCall, shell=True) sub = subprocess.Popen(self.threeDlocPreCall, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) msg = "".join(sub.stdout.readlines()) err = "".join(sub.stderr.readlines()) self.textviewStdOutImproved.write(msg) self.te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.