general code clean-up

This commit is contained in:
Sebastian Wehling-Benatelli 2015-10-19 05:32:10 +02:00
parent b49206407a
commit 0fa701a878
30 changed files with 270 additions and 249 deletions

View File

@ -8,11 +8,11 @@ import glob
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from obspy.core import read from obspy.core import read
from pylot.core.util import _getVersionString
from pylot.core.read.data import Data from pylot.core.read.data import Data
from pylot.core.read.inputs import AutoPickParameter from pylot.core.read.inputs import AutoPickParameter
from pylot.core.util.structure import DATASTRUCTURE from pylot.core.util.structure import DATASTRUCTURE
from pylot.core.pick.autopick import autopickevent from pylot.core.pick.autopick import autopickevent
from pylot.core.util.version import get_git_version as _getVersionString
__version__ = _getVersionString() __version__ = _getVersionString()

View File

@ -1,10 +1,10 @@
<RCC> <RCC>
<qresource> <qresource>
<file>icons/pylot.ico</file> <file>icons/pylot.ico</file>
<file>icons/pylot.png</file> <file>icons/pylot.png</file>
<file>icons/printer.png</file> <file>icons/printer.png</file>
<file>icons/delete.png</file> <file>icons/delete.png</file>
<file>icons/key_E.png</file> <file>icons/key_E.png</file>
<file>icons/key_N.png</file> <file>icons/key_N.png</file>
<file>icons/key_P.png</file> <file>icons/key_P.png</file>
<file>icons/key_Q.png</file> <file>icons/key_Q.png</file>
@ -14,7 +14,7 @@
<file>icons/key_U.png</file> <file>icons/key_U.png</file>
<file>icons/key_V.png</file> <file>icons/key_V.png</file>
<file>icons/key_W.png</file> <file>icons/key_W.png</file>
<file>icons/key_Z.png</file> <file>icons/key_Z.png</file>
<file>icons/filter.png</file> <file>icons/filter.png</file>
<file>icons/sync.png</file> <file>icons/sync.png</file>
<file>icons/zoom_0.png</file> <file>icons/zoom_0.png</file>

View File

@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
__author__ = 'sebastianw' __author__ = 'sebastianw'

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
import numpy as np import numpy as np
from pylot.core.active import seismicshot from pylot.core.active import seismicshot
@ -144,8 +145,8 @@ class Survey(object):
def countAllTraces(self): def countAllTraces(self):
numtraces = 0 numtraces = 0
for line in self.getShotlist(): for shot in self.getShotlist():
for line in self.getReceiverlist(): for rec in self.getReceiverlist():
numtraces += 1 numtraces += 1
return numtraces return numtraces

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import numpy as np import numpy as np
def vgrids2VTK(inputfile = 'vgrids.in', outputfile = 'vgrids.vtk'): def vgrids2VTK(inputfile = 'vgrids.in', outputfile = 'vgrids.vtk'):

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
from obspy import read from obspy import read
from obspy import Stream from obspy import Stream

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
import numpy as np import numpy as np
from scipy.interpolate import griddata from scipy.interpolate import griddata

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
import numpy as np import numpy as np
from scipy.interpolate import griddata from scipy.interpolate import griddata

View File

@ -35,8 +35,7 @@ class SeismicShot(object):
self.snr = {} self.snr = {}
self.snrthreshold = {} self.snrthreshold = {}
self.timeArray = {} self.timeArray = {}
self.paras = {} self.paras = {'shotname': obsfile}
self.paras['shotname'] = obsfile
def removeEmptyTraces(self): def removeEmptyTraces(self):
traceIDs = [] traceIDs = []

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
plt.interactive(True) plt.interactive(True)

View File

@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@ -6,7 +6,7 @@ from obspy.signal.trigger import coincidenceTrigger
class CoincidenceTimes(): class CoincidenceTimes(object):
def __init__(self, st, comp='Z', coinum=4, sta=1., lta=10., on=5., off=1.): def __init__(self, st, comp='Z', coinum=4, sta=1., lta=10., on=5., off=1.):
_type = 'recstalta' _type = 'recstalta'

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Created August/September 2015. Created August/September 2015.
@ -142,7 +143,7 @@ class DCfc(Magnitude):
''' '''
def calcsourcespec(self): def calcsourcespec(self):
print ("Calculating source spectrum ....") print ("Calculating source spectrum ....")
self.w0 = None # DC-value self.w0 = None # DC-value
self.fc = None # corner frequency self.fc = None # corner frequency

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Created Oct/Nov 2014 Created Oct/Nov 2014
@ -315,7 +316,7 @@ class ARZcf(CharacteristicFunction):
cf = np.zeros(len(xnp)) cf = np.zeros(len(xnp))
loopstep = self.getARdetStep() loopstep = self.getARdetStep()
arcalci = ldet + self.getOrder() #AR-calculation index arcalci = ldet + self.getOrder() #AR-calculation index
for i in range(ldet + self.getOrder(), tend - lpred - 1): for i in range(ldet + self.getOrder(), tend - lpred - 1):
if i == arcalci: if i == arcalci:
#determination of AR coefficients #determination of AR coefficients
#to speed up calculation, AR-coefficients are calculated only every i+loopstep[1]! #to speed up calculation, AR-coefficients are calculated only every i+loopstep[1]!
@ -362,7 +363,7 @@ class ARZcf(CharacteristicFunction):
rhs = np.zeros(self.getOrder()) rhs = np.zeros(self.getOrder())
for k in range(0, self.getOrder()): for k in range(0, self.getOrder()):
for i in range(rind, ldet+1): for i in range(rind, ldet+1):
ki = k + 1 ki = k + 1
rhs[k] = rhs[k] + data[i] * data[i - ki] rhs[k] = rhs[k] + data[i] * data[i - ki]
#recursive calculation of data array (second sum at left part of eq. 6.5 in Kueperkoch et al. 2012) #recursive calculation of data array (second sum at left part of eq. 6.5 in Kueperkoch et al. 2012)

View File

@ -312,7 +312,7 @@ class PragPicker(AutoPicking):
else: else:
for i in range(1, len(self.cf)): for i in range(1, len(self.cf)):
if i > ismooth: if i > ismooth:
ii1 = i - ismooth; ii1 = i - ismooth
cfsmooth[i] = cfsmooth[i - 1] + (self.cf[i] - self.cf[ii1]) / ismooth cfsmooth[i] = cfsmooth[i - 1] + (self.cf[i] - self.cf[ii1]) / ismooth
else: else:
cfsmooth[i] = np.mean(self.cf[1 : i]) cfsmooth[i] = np.mean(self.cf[1 : i])

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
# #

View File

@ -317,29 +317,29 @@ def autopickstation(wfstream, pickparam):
data = Data() data = Data()
[corzdat, restflag] = data.restituteWFData(invdir, zdat) [corzdat, restflag] = data.restituteWFData(invdir, zdat)
if restflag == 1: if restflag == 1:
# integrate to displacement # integrate to displacement
corintzdat = integrate.cumtrapz(corzdat[0], None, corzdat[0].stats.delta) corintzdat = integrate.cumtrapz(corzdat[0], None, corzdat[0].stats.delta)
# class needs stream object => build it # class needs stream object => build it
z_copy = zdat.copy() z_copy = zdat.copy()
z_copy[0].data = corintzdat z_copy[0].data = corintzdat
# largest detectable period == window length # largest detectable period == window length
# after P pulse for calculating source spectrum # after P pulse for calculating source spectrum
winzc = (1 / bpz2[0]) * z_copy[0].stats.sampling_rate winzc = (1 / bpz2[0]) * z_copy[0].stats.sampling_rate
impickP = mpickP * z_copy[0].stats.sampling_rate impickP = mpickP * z_copy[0].stats.sampling_rate
wfzc = z_copy[0].data[impickP : impickP + winzc] wfzc = z_copy[0].data[impickP : impickP + winzc]
# calculate spectrum using only first cycles of # calculate spectrum using only first cycles of
# waveform after P onset! # waveform after P onset!
zc = crossings_nonzero_all(wfzc) zc = crossings_nonzero_all(wfzc)
if np.size(zc) == 0: if np.size(zc) == 0:
print ("Something is wrong with the waveform, " \ print ("Something is wrong with the waveform, " \
"no zero crossings derived!") "no zero crossings derived!")
print ("Cannot calculate source spectrum!") print ("Cannot calculate source spectrum!")
else: else:
calcwin = (zc[3] - zc[0]) * z_copy[0].stats.delta calcwin = (zc[3] - zc[0]) * z_copy[0].stats.delta
# calculate source spectrum and get w0 and fc # calculate source spectrum and get w0 and fc
specpara = DCfc(z_copy, mpickP, calcwin, iplot) specpara = DCfc(z_copy, mpickP, calcwin, iplot)
w0 = specpara.getw0() w0 = specpara.getw0()
fc = specpara.getfc() fc = specpara.getfc()
print ("autopickstation: P-weight: %d, SNR: %f, SNR[dB]: %f, " \ print ("autopickstation: P-weight: %d, SNR: %f, SNR[dB]: %f, " \
"Polarity: %s" % (Pweight, SNRP, SNRPdB, FM)) "Polarity: %s" % (Pweight, SNRP, SNRPdB, FM))

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
# #
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
@ -493,9 +494,9 @@ def wadaticheck(pickdic, dttolerance, iplot):
if len(SPtimes) >= 3: if len(SPtimes) >= 3:
# calculate slope # calculate slope
p1 = np.polyfit(Ppicks, SPtimes, 1) p1 = np.polyfit(Ppicks, SPtimes, 1)
wdfit = np.polyval(p1, Ppicks) wdfit = np.polyval(p1, Ppicks)
wfitflag = 0 wfitflag = 0
# calculate vp/vs ratio before check # calculate vp/vs ratio before check
@ -532,40 +533,40 @@ def wadaticheck(pickdic, dttolerance, iplot):
pickdic[key]['S']['marked'] = marker pickdic[key]['S']['marked'] = marker
if len(checkedPpicks) >= 3: if len(checkedPpicks) >= 3:
# calculate new slope # calculate new slope
p2 = np.polyfit(checkedPpicks, checkedSPtimes, 1) p2 = np.polyfit(checkedPpicks, checkedSPtimes, 1)
wdfit2 = np.polyval(p2, checkedPpicks) wdfit2 = np.polyval(p2, checkedPpicks)
# calculate vp/vs ratio after check # calculate vp/vs ratio after check
cvpvsr = p2[0] + 1 cvpvsr = p2[0] + 1
print ("wadaticheck: Average Vp/Vs ratio after check: %f" % cvpvsr) print ("wadaticheck: Average Vp/Vs ratio after check: %f" % cvpvsr)
print ("wadatacheck: Skipped %d S pick(s)" % ibad) print ("wadatacheck: Skipped %d S pick(s)" % ibad)
else: else:
print ("###############################################") print ("###############################################")
print ("wadatacheck: Not enough checked S-P times available!") print ("wadatacheck: Not enough checked S-P times available!")
print ("Skip Wadati check!") print ("Skip Wadati check!")
checkedonsets = pickdic checkedonsets = pickdic
else: else:
print ("wadaticheck: Not enough S-P times available for reliable regression!") print ("wadaticheck: Not enough S-P times available for reliable regression!")
print ("Skip wadati check!") print ("Skip wadati check!")
wfitflag = 1 wfitflag = 1
# plot results # plot results
if iplot > 1: if iplot > 1:
plt.figure(iplot) plt.figure(iplot)
f1, = plt.plot(Ppicks, SPtimes, 'ro') f1, = plt.plot(Ppicks, SPtimes, 'ro')
if wfitflag == 0: if wfitflag == 0:
f2, = plt.plot(Ppicks, wdfit, 'k') f2, = plt.plot(Ppicks, wdfit, 'k')
f3, = plt.plot(checkedPpicks, checkedSPtimes, 'ko') f3, = plt.plot(checkedPpicks, checkedSPtimes, 'ko')
f4, = plt.plot(checkedPpicks, wdfit2, 'g') f4, = plt.plot(checkedPpicks, wdfit2, 'g')
plt.title('Wadati-Diagram, %d S-P Times, Vp/Vs(raw)=%5.2f,' \ plt.title('Wadati-Diagram, %d S-P Times, Vp/Vs(raw)=%5.2f,' \
'Vp/Vs(checked)=%5.2f' % (len(SPtimes), vpvsr, cvpvsr)) 'Vp/Vs(checked)=%5.2f' % (len(SPtimes), vpvsr, cvpvsr))
plt.legend([f1, f2, f3, f4], ['Skipped S-Picks', 'Wadati 1', \ plt.legend([f1, f2, f3, f4], ['Skipped S-Picks', 'Wadati 1', \
'Reliable S-Picks', 'Wadati 2'], loc='best') 'Reliable S-Picks', 'Wadati 2'], loc='best')
else: else:
plt.title('Wadati-Diagram, %d S-P Times' % len(SPtimes)) plt.title('Wadati-Diagram, %d S-P Times' % len(SPtimes))
plt.ylabel('S-P Times [s]') plt.ylabel('S-P Times [s]')
plt.xlabel('P Times [s]') plt.xlabel('P Times [s]')
@ -612,7 +613,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot):
print ("Checking signal length ...") print ("Checking signal length ...")
if len(X) > 1: if len(X) > 1:
# all three components available # all three components available
# make sure, all components have equal lengths # make sure, all components have equal lengths
ilen = min([len(X[0].data), len(X[1].data), len(X[2].data)]) ilen = min([len(X[0].data), len(X[1].data), len(X[2].data)])
x1 = X[0][0:ilen] x1 = X[0][0:ilen]
@ -639,7 +640,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot):
numoverthr = len(np.where(rms[isignal] >= minsiglevel)[0]) numoverthr = len(np.where(rms[isignal] >= minsiglevel)[0])
if numoverthr >= minnum: if numoverthr >= minnum:
print ("checksignallength: Signal reached required length.") print ("checksignallength: Signal reached required length.")
returnflag = 1 returnflag = 1
else: else:
print ("checksignallength: Signal shorter than required minimum signal length!") print ("checksignallength: Signal shorter than required minimum signal length!")
@ -649,7 +650,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot):
if iplot == 2: if iplot == 2:
plt.figure(iplot) plt.figure(iplot)
p1, = plt.plot(t,rms, 'k') p1, = plt.plot(t,rms, 'k')
p2, = plt.plot(t[inoise], rms[inoise], 'c') p2, = plt.plot(t[inoise], rms[inoise], 'c')
p3, = plt.plot(t[isignal],rms[isignal], 'r') p3, = plt.plot(t[isignal],rms[isignal], 'r')
p4, = plt.plot([t[isignal[0]], t[isignal[len(isignal)-1]]], \ p4, = plt.plot([t[isignal[0]], t[isignal[len(isignal)-1]]], \
@ -729,27 +730,27 @@ def checkPonsets(pickdic, dttolerance, iplot):
badjkmarker = 'badjkcheck' badjkmarker = 'badjkcheck'
for i in range(0, len(goodstations)): for i in range(0, len(goodstations)):
# mark P onset as checked and keep P weight # mark P onset as checked and keep P weight
pickdic[goodstations[i]]['P']['marked'] = goodmarker pickdic[goodstations[i]]['P']['marked'] = goodmarker
for i in range(0, len(badstations)): for i in range(0, len(badstations)):
# mark P onset and downgrade P weight to 9 # mark P onset and downgrade P weight to 9
# (not used anymore) # (not used anymore)
pickdic[badstations[i]]['P']['marked'] = badmarker pickdic[badstations[i]]['P']['marked'] = badmarker
pickdic[badstations[i]]['P']['weight'] = 9 pickdic[badstations[i]]['P']['weight'] = 9
for i in range(0, len(badjkstations)): for i in range(0, len(badjkstations)):
# mark P onset and downgrade P weight to 9 # mark P onset and downgrade P weight to 9
# (not used anymore) # (not used anymore)
pickdic[badjkstations[i]]['P']['marked'] = badjkmarker pickdic[badjkstations[i]]['P']['marked'] = badjkmarker
pickdic[badjkstations[i]]['P']['weight'] = 9 pickdic[badjkstations[i]]['P']['weight'] = 9
checkedonsets = pickdic checkedonsets = pickdic
if iplot > 1: if iplot > 1:
p1, = plt.plot(np.arange(0, len(Ppicks)), Ppicks, 'r+', markersize=14) p1, = plt.plot(np.arange(0, len(Ppicks)), Ppicks, 'r+', markersize=14)
p2, = plt.plot(igood, np.array(Ppicks)[igood], 'g*', markersize=14) p2, = plt.plot(igood, np.array(Ppicks)[igood], 'g*', markersize=14)
p3, = plt.plot([0, len(Ppicks) - 1], [pmedian, pmedian], 'g', \ p3, = plt.plot([0, len(Ppicks) - 1], [pmedian, pmedian], 'g', \
linewidth=2) linewidth=2)
for i in range(0, len(Ppicks)): for i in range(0, len(Ppicks)):
plt.text(i, Ppicks[i] + 0.2, stations[i]) plt.text(i, Ppicks[i] + 0.2, stations[i])
plt.xlabel('Number of P Picks') plt.xlabel('Number of P Picks')
plt.ylabel('Onset Time [s] from 1.1.1970') plt.ylabel('Onset Time [s] from 1.1.1970')
@ -789,37 +790,37 @@ def jackknife(X, phi, h):
g = len(X) / h g = len(X) / h
if type(g) is not int: if type(g) is not int:
print ("jackknife: Cannot divide quantity X in equal sized subgroups!") print ("jackknife: Cannot divide quantity X in equal sized subgroups!")
print ("Choose another size for subgroups!") print ("Choose another size for subgroups!")
return PHI_jack, PHI_pseudo, PHI_sub return PHI_jack, PHI_pseudo, PHI_sub
else: else:
# estimator of undisturbed spot check # estimator of undisturbed spot check
if phi == 'MEA': if phi == 'MEA':
phi_sc = np.mean(X) phi_sc = np.mean(X)
elif phi == 'VAR': elif phi == 'VAR':
phi_sc = np.var(X) phi_sc = np.var(X)
elif phi == 'MED': elif phi == 'MED':
phi_sc = np.median(X) phi_sc = np.median(X)
# estimators of subgroups # estimators of subgroups
PHI_pseudo = [] PHI_pseudo = []
PHI_sub = [] PHI_sub = []
for i in range(0, g - 1): for i in range(0, g - 1):
# subgroup i, remove i-th sample # subgroup i, remove i-th sample
xx = X[:] xx = X[:]
del xx[i] del xx[i]
# calculate estimators of disturbed spot check # calculate estimators of disturbed spot check
if phi == 'MEA': if phi == 'MEA':
phi_sub = np.mean(xx) phi_sub = np.mean(xx)
elif phi == 'VAR': elif phi == 'VAR':
phi_sub = np.var(xx) phi_sub = np.var(xx)
elif phi == 'MED': elif phi == 'MED':
phi_sub = np.median(xx) phi_sub = np.median(xx)
PHI_sub.append(phi_sub) PHI_sub.append(phi_sub)
# pseudo values # pseudo values
phi_pseudo = g * phi_sc - ((g - 1) * phi_sub) phi_pseudo = g * phi_sc - ((g - 1) * phi_sub)
PHI_pseudo.append(phi_pseudo) PHI_pseudo.append(phi_pseudo)
# jackknife estimator # jackknife estimator
PHI_jack = np.mean(PHI_pseudo) PHI_jack = np.mean(PHI_pseudo)
@ -899,17 +900,17 @@ def checkZ4S(X, pick, zfac, checkwin, iplot):
# vertical P-coda level must exceed horizontal P-coda level # vertical P-coda level must exceed horizontal P-coda level
# zfac times encodalevel # zfac times encodalevel
if zcodalevel < minsiglevel: if zcodalevel < minsiglevel:
print ("checkZ4S: Maybe S onset? Skip this P pick!") print ("checkZ4S: Maybe S onset? Skip this P pick!")
else: else:
print ("checkZ4S: P onset passes checkZ4S test!") print ("checkZ4S: P onset passes checkZ4S test!")
returnflag = 1 returnflag = 1
if iplot > 1: if iplot > 1:
te = np.arange(0, edat[0].stats.npts / edat[0].stats.sampling_rate, te = np.arange(0, edat[0].stats.npts / edat[0].stats.sampling_rate,
edat[0].stats.delta) edat[0].stats.delta)
tn = np.arange(0, ndat[0].stats.npts / ndat[0].stats.sampling_rate, tn = np.arange(0, ndat[0].stats.npts / ndat[0].stats.sampling_rate,
ndat[0].stats.delta) ndat[0].stats.delta)
plt.plot(tz, z / max(z), 'k') plt.plot(tz, z / max(z), 'k')
plt.plot(tz[isignal], z[isignal] / max(z), 'r') plt.plot(tz[isignal], z[isignal] / max(z), 'r')
plt.plot(te, edat[0].data / max(edat[0].data) + 1, 'k') plt.plot(te, edat[0].data / max(edat[0].data) + 1, 'k')
plt.plot(te[isignal], edat[0].data[isignal] / max(edat[0].data) + 1, 'r') plt.plot(te[isignal], edat[0].data[isignal] / max(edat[0].data) + 1, 'r')

View File

@ -1 +1 @@
# -*- coding: utf-8 -*-

View File

@ -208,8 +208,7 @@ class FilterOptions(object):
def parseFilterOptions(self): def parseFilterOptions(self):
if self.getFilterType(): if self.getFilterType():
robject = {'type':self.getFilterType()} robject = {'type': self.getFilterType(), 'corners': self.getOrder()}
robject['corners'] = self.getOrder()
if len(self.getFreq()) > 1: if len(self.getFreq()) > 1:
robject['freqmin'] = self.getFreq()[0] robject['freqmin'] = self.getFreq()[0]
robject['freqmax'] = self.getFreq()[1] robject['freqmax'] = self.getFreq()[1]

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
from pylot.core.util.version import get_git_version as _getVersionString from pylot.core.util.version import get_git_version as _getVersionString

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
''' '''
Created on 10.11.2014 Created on 10.11.2014

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
''' '''
Created on 10.11.2014 Created on 10.11.2014

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
from PySide.QtCore import QThread, Signal from PySide.QtCore import QThread, Signal

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
# #
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time import sys, time
from PySide.QtGui import QApplication from PySide.QtGui import QApplication

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys import sys
import matplotlib import matplotlib

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time import sys, time
from PySide.QtGui import QApplication from PySide.QtGui import QApplication

View File

@ -1,4 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time import sys, time
from PySide.QtGui import QApplication from PySide.QtGui import QApplication
@ -9,7 +11,7 @@ dialogs = [FilterOptionsDialog, PropertiesDlg, HelpForm]
app = QApplication(sys.argv) app = QApplication(sys.argv)
for dlg in dialogs: for dlg in dialogs:
win = dlg() win = dlg()
win.show() win.show()
time.sleep(1) time.sleep(1)
win.destroy() win.destroy()