[change] get comparison working with alparray/py3
This commit is contained in:
parent
8e6237a08d
commit
879282657a
@ -8,6 +8,7 @@ import os
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from obspy import read_events
|
from obspy import read_events
|
||||||
|
from obspy.core import AttribDict
|
||||||
from pylot.core.io.phases import picksdict_from_picks
|
from pylot.core.io.phases import picksdict_from_picks
|
||||||
from pylot.core.util.pdf import ProbabilityDensityFunction
|
from pylot.core.util.pdf import ProbabilityDensityFunction
|
||||||
from pylot.core.util.utils import find_in_list
|
from pylot.core.util.utils import find_in_list
|
||||||
@ -31,7 +32,7 @@ class Comparison(object):
|
|||||||
for name, fn in kwargs.items():
|
for name, fn in kwargs.items():
|
||||||
if isinstance(fn, PDFDictionary):
|
if isinstance(fn, PDFDictionary):
|
||||||
self._pdfs[name] = fn
|
self._pdfs[name] = fn
|
||||||
elif isinstance(fn, dict):
|
elif isinstance(fn, dict) or isinstance(fn, AttribDict):
|
||||||
self._pdfs[name] = PDFDictionary(fn)
|
self._pdfs[name] = PDFDictionary(fn)
|
||||||
else:
|
else:
|
||||||
self._pdfs[name] = PDFDictionary.from_quakeml(fn)
|
self._pdfs[name] = PDFDictionary.from_quakeml(fn)
|
||||||
|
@ -248,7 +248,7 @@ class ProbabilityDensityFunction(object):
|
|||||||
self._x = np.array(x)
|
self._x = np.array(x)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_pick(self, lbound, barycentre, rbound, incr=0.001, decfact=0.01,
|
def from_pick(self, lbound, barycentre, rbound, incr=0.1, decfact=0.01,
|
||||||
type='exp'):
|
type='exp'):
|
||||||
'''
|
'''
|
||||||
Initialize a new ProbabilityDensityFunction object.
|
Initialize a new ProbabilityDensityFunction object.
|
||||||
|
@ -127,7 +127,7 @@ class ComparisonDialog(QDialog):
|
|||||||
phasesComboBox=None,
|
phasesComboBox=None,
|
||||||
histCheckBox=None)
|
histCheckBox=None)
|
||||||
self._phases = 'PS'
|
self._phases = 'PS'
|
||||||
self._plotprops = dict(station=self.stations[0], phase=self.phases[0])
|
self._plotprops = dict(station=list(self.stations)[0], phase=list(self.phases)[0])
|
||||||
super(ComparisonDialog, self).__init__(parent)
|
super(ComparisonDialog, self).__init__(parent)
|
||||||
self.setupUI()
|
self.setupUI()
|
||||||
self.plotcomparison()
|
self.plotcomparison()
|
||||||
|
Loading…
Reference in New Issue
Block a user