Reversed changes made in previous commit, initialize ObsPy-event object including path.
This commit is contained in:
parent
ea7b609091
commit
24ded1cf2b
@ -201,6 +201,7 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
|||||||
filename = os.path.join(eventpath, 'PyLoT_' + evID + fext)
|
filename = os.path.join(eventpath, 'PyLoT_' + evID + fext)
|
||||||
try:
|
try:
|
||||||
data = Data(evtdata=filename)
|
data = Data(evtdata=filename)
|
||||||
|
data.get_evt_data().path = eventpath
|
||||||
print('Reading event data from filename {}...'.format(filename))
|
print('Reading event data from filename {}...'.format(filename))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('Could not read event from file {}: {}'.format(filename, e))
|
print('Could not read event from file {}: {}'.format(filename, e))
|
||||||
|
@ -228,8 +228,9 @@ class Data(object):
|
|||||||
else:
|
else:
|
||||||
evtdata_org = self.get_evt_data()
|
evtdata_org = self.get_evt_data()
|
||||||
picks = evtdata_org.picks
|
picks = evtdata_org.picks
|
||||||
|
eventpath = evtdata_org.path
|
||||||
picks_copy = copy.deepcopy(picks)
|
picks_copy = copy.deepcopy(picks)
|
||||||
evtdata_copy = Event(fnout)
|
evtdata_copy = Event(eventpath)
|
||||||
evtdata_copy.picks = picks_copy
|
evtdata_copy.picks = picks_copy
|
||||||
|
|
||||||
# check for stations picked automatically as well as manually
|
# check for stations picked automatically as well as manually
|
||||||
|
@ -291,7 +291,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
if algoP == 'HOS':
|
if algoP == 'HOS':
|
||||||
# calculate HOS-CF using subclass HOScf of class
|
# calculate HOS-CF using subclass HOScf of class
|
||||||
# CharacteristicFunction
|
# CharacteristicFunction
|
||||||
print(cuttimes)
|
|
||||||
cf1 = HOScf(z_copy, cuttimes, thosmw, hosorder) # instance of HOScf
|
cf1 = HOScf(z_copy, cuttimes, thosmw, hosorder) # instance of HOScf
|
||||||
elif algoP == 'ARZ':
|
elif algoP == 'ARZ':
|
||||||
# calculate ARZ-CF using subclass ARZcf of class
|
# calculate ARZ-CF using subclass ARZcf of class
|
||||||
|
Loading…
Reference in New Issue
Block a user