[Bugfix] Wrong commit of observation-file directory.
This commit is contained in:
parent
9f955f4f5f
commit
eb66c381cd
@ -2076,20 +2076,19 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
outfile = settings.value("{0}/outputFile".format(loctool),
|
outfile = settings.value("{0}/outputFile".format(loctool),
|
||||||
os.path.split(os.tempnam())[-1])
|
os.path.split(os.tempnam())[-1])
|
||||||
obsdir = os.path.join(locroot, 'obs')
|
|
||||||
self.saveData(event=self.get_current_event(), directory=obsdir, outformats='.obs')
|
|
||||||
eventname = self.get_current_event_name()
|
eventname = self.get_current_event_name()
|
||||||
|
obsdir = os.path.join(self._inputs['rootpath'], self._inputs['datapath'], self._inputs['database'], eventname)
|
||||||
|
self.saveData(event=self.get_current_event(), directory=obsdir, outformats='.obs')
|
||||||
filename = 'PyLoT_' + eventname
|
filename = 'PyLoT_' + eventname
|
||||||
locpath = os.path.join(locroot, 'loc', filename)
|
locpath = os.path.join(locroot, 'loc', filename)
|
||||||
phasefile = os.path.join(obsdir, filename + '.obs')
|
phasefile = os.path.join(obsdir, filename + '.obs')
|
||||||
phasepath = os.path.join(locroot, 'obs', phasefile)
|
|
||||||
lt.modify_inputs(infile, locroot, filename, phasefile, ttt)
|
lt.modify_inputs(infile, locroot, filename, phasefile, ttt)
|
||||||
try:
|
try:
|
||||||
lt.locate(infile)
|
lt.locate(infile)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
print(e.message)
|
print(e.message)
|
||||||
finally:
|
#finally:
|
||||||
os.remove(phasepath)
|
# os.remove(phasefile)
|
||||||
|
|
||||||
self.get_data().applyEVTData(lt.read_location(locpath), typ='event')
|
self.get_data().applyEVTData(lt.read_location(locpath), typ='event')
|
||||||
# self.get_data().applyEVTData(self.calc_magnitude(), typ='event')
|
# self.get_data().applyEVTData(self.calc_magnitude(), typ='event')
|
||||||
|
Loading…
Reference in New Issue
Block a user