Пример #1
0
def getDataOpts():
	'Get SAC Data and Options'
	opts, ifiles = getOptions()
	pppara = PPConfig()
	qcpara = QCConfig()
	ccpara = CCConfig()
	mcpara = MCConfig()
	gsac = loadData(ifiles, opts, pppara)
	mcpara.delta = opts.delta
	opts.qheaders = qcpara.qheaders
	opts.qweights = qcpara.qweights
	opts.qfactors = qcpara.qfactors
	opts.hdrsel = qcpara.hdrsel
	opts.fstack = ccpara.fstack
	ccpara.qqhdrs = qcpara.qheaders
	ccpara.twcorr = opts.twcorr
	# find phase:
	if opts.phase is None:
		phase = findPhase(ifiles[0])
		print ('Found phase to be: ' + phase + '\n')
	else:
		phase = opts.phase
	mcpara.phase = phase
	opts.qcpara = qcpara
	opts.ccpara = ccpara
	opts.mcpara = mcpara
	opts.pppara = pppara
	# more options:
	opts.upylim_on = False
	opts.twin_on = True
	opts.sort_on = True
	opts.pick_on = True
	opts.zero_on = False
	opts.nlab_on = True
	opts.ynormtwin_on = True
	#checkCoverage(gsac, opts)
	initQual(gsac.saclist, opts.hdrsel, opts.qheaders)
	return gsac, opts
Пример #2
0
def main():
    opts, ifiles = getOptions()
    mcpara = MCConfig()
    gsac = loadData(ifiles, opts, mcpara)

    if opts.phase is None:
        phase = findPhase(ifiles[0])
        print('Found phase to be: ' + phase + '\n')
        mcpara.phase = phase

    opts.fstack = mcpara.fstack
    if opts.filemode == 'sac' and os.path.isfile(opts.fstack):
        print('Read array stack file: ' + opts.fstack)
        gsac.stkdh = SacDataHdrs(opts.fstack, opts.delta)

    getParams(gsac, mcpara, opts)
    if opts.allseis_on:
        solution = mccc(gsac, mcpara)
        gsac.selist, gsac.delist = gsac.saclist, []
    else:
        initQual(gsac.saclist, mcpara.hdrsel, [])
        gsac.selist, gsac.delist = seleSeis(gsac.saclist)
        solution = mccc(gsac, mcpara)
    saveData(gsac, opts)
Пример #3
0
def main():
	opts, ifiles = getOptions()
	mcpara = MCConfig()
	gsac = loadData(ifiles, opts, mcpara)

	if opts.phase is None:
		phase = findPhase(ifiles[0])
		print ('Found phase to be: ' + phase + '\n')
		mcpara.phase = phase

	opts.fstack = mcpara.fstack
	if opts.filemode == 'sac' and os.path.isfile(opts.fstack):
		print ('Read array stack file: ' + opts.fstack )
		gsac.stkdh = SacDataHdrs(opts.fstack, opts.delta)

	getParams(gsac, mcpara, opts)
	if opts.allseis_on:
		solution = mccc(gsac, mcpara)
		gsac.selist, gsac.delist = gsac.saclist, []
	else:
		initQual(gsac.saclist, mcpara.hdrsel, [])
		gsac.selist, gsac.delist = seleSeis(gsac.saclist)
		solution = mccc(gsac, mcpara)
	saveData(gsac, opts)
Пример #4
0
def getDataOpts():
    'Get SAC Data and Options'
    opts, ifiles = getOptions()
    pppara = PPConfig()
    qcpara = QCConfig()
    ccpara = CCConfig()
    mcpara = MCConfig()

    gsac = loadData(ifiles, opts, pppara)

    # set defaults
    filterParameters = {}
    filterParameters['apply'] = False
    filterParameters['advance'] = False
    filterParameters['band'] = 'bandpass'
    filterParameters['lowFreq'] = 0.05
    filterParameters['highFreq'] = 0.25
    filterParameters['order'] = 2
    filterParameters['reversepass'] = False
    opts.filterParameters = filterParameters

    # override defaults if already set in SAC files
    firstSacdh = gsac.saclist[0]
    if hasattr(firstSacdh, 'user0'):
        filterParameters['lowFreq'] = firstSacdh.user0
    if hasattr(firstSacdh, 'user1'):
        filterParameters['highFreq'] = firstSacdh.user1
    if hasattr(firstSacdh, 'kuser0'):
        filterParameters['band'] = firstSacdh.kuser0
    if hasattr(firstSacdh, 'kuser1'):
        filterParameters['order'] = int(firstSacdh.kuser1)

    mcpara.delta = opts.delta
    opts.qheaders = qcpara.qheaders
    opts.qweights = qcpara.qweights
    opts.qfactors = qcpara.qfactors
    opts.hdrsel = qcpara.hdrsel
    opts.fstack = ccpara.fstack
    ccpara.qqhdrs = qcpara.qheaders
    ccpara.twcorr = opts.twcorr
    # find phase:
    if opts.phase is None:
        phase = findPhase(ifiles[0])
        print('Found phase to be: ' + phase + '\n')
    else:
        phase = opts.phase
    mcpara.phase = phase
    opts.qcpara = qcpara
    opts.ccpara = ccpara
    opts.mcpara = mcpara
    opts.pppara = pppara
    # more options:
    opts.upylim_on = False
    opts.twin_on = True
    opts.sort_on = True
    opts.pick_on = True
    opts.zero_on = False
    opts.nlab_on = True
    opts.ynormtwin_on = True
    #checkCoverage(gsac, opts)
    initQual(gsac.saclist, opts.hdrsel, opts.qheaders)
    return gsac, opts
Пример #5
0
def getDataOpts():
	'Get SAC Data and Options'
	opts, ifiles = getOptions()
	pppara = PPConfig()
	qcpara = QCConfig()
	ccpara = CCConfig()
	mcpara = MCConfig()

	gsac = loadData(ifiles, opts, pppara)

	# set defaults
	filterParameters = {}
	filterParameters['apply'] = False
	filterParameters['advance'] = False
	filterParameters['band'] = 'bandpass'
	filterParameters['lowFreq'] = 0.05
	filterParameters['highFreq'] = 0.25
	filterParameters['order'] = 2
	filterParameters['reversepass'] = False
	opts.filterParameters = filterParameters

	# override defaults if already set in SAC files
	firstSacdh = gsac.saclist[0]
	if hasattr(firstSacdh, 'user0'):
		filterParameters['lowFreq'] = firstSacdh.user0
	if hasattr(firstSacdh, 'user1'):
		filterParameters['highFreq'] = firstSacdh.user1
	if hasattr(firstSacdh, 'kuser0'):
		filterParameters['band'] = firstSacdh.kuser0
	if hasattr(firstSacdh, 'kuser1'):
		filterParameters['order'] = int(firstSacdh.kuser1)

	mcpara.delta = opts.delta
	opts.qheaders = qcpara.qheaders
	opts.qweights = qcpara.qweights
	opts.qfactors = qcpara.qfactors
	opts.hdrsel = qcpara.hdrsel
	opts.fstack = ccpara.fstack
	ccpara.qqhdrs = qcpara.qheaders
	ccpara.twcorr = opts.twcorr
	# find phase:
	if opts.phase is None:
		phase = findPhase(ifiles[0])
		print ('Found phase to be: ' + phase + '\n')
	else:
		phase = opts.phase
	mcpara.phase = phase
	opts.qcpara = qcpara
	opts.ccpara = ccpara
	opts.mcpara = mcpara
	opts.pppara = pppara
	# more options:
	opts.upylim_on = False
	opts.twin_on = True
	opts.sort_on = True
	opts.pick_on = True
	opts.zero_on = False
	opts.nlab_on = True
	opts.ynormtwin_on = True
	#checkCoverage(gsac, opts)
	initQual(gsac.saclist, opts.hdrsel, opts.qheaders)
	return gsac, opts