Commit 8900e046 authored by doetschj's avatar doetschj
Browse files

bug fixes on windows

parent 7286b611
......@@ -479,15 +479,15 @@ class Event(ObsPyEvent):
if self.classification != 'noise':
if save_fig:
fig.savefig(fparam['plot_folder_'+self.classification] + "/event-" + "{:03d}".format(self.event_id) + '_' + t_start_plotn + ".png",
dpi=100)
fig.savefig(fparam['plot_folder_'+self.classification] + "/event-" + "{:03d}".format(self.event_id) +
'_' + t_start_plotn.replace(':', '_') + ".png", dpi=100)
self.logger.info('Event ' + str(self.event_id) + ': Plotted, Figure saved.')
else:
self.logger.info('Event ' + str(self.event_id) + ': Plotted, Figure not saved.')
else:
if save_fig:
fig.savefig(fparam['noise_vis_folder'] + "/noise_vis-" + t_start_plotn + ".png", dpi=100)
fig.savefig(fparam['noise_vis_folder'] + "/noise_vis-" + t_start_plotn.replace(':', '_') + ".png", dpi=100)
self.logger.info('Noise Visualisation: Plotted, Figure saved.')
else:
......
......@@ -29,7 +29,7 @@ def event_processing(param, load_file, trig_time, event_id, classification, log
# event.prparam['Picking']['algorithm'] = 'sta_lta'
event.pick()
event.locate()
event.est_magnitude()
#event.est_magnitude()
event.event_plot(save_fig=True)
#event.prparam['Locate']['algorithm'] = 'hom_aniso'
#event.locate()
......
......@@ -14,6 +14,7 @@ Version 0.0, 23.10.2018, Joseph Doetsch (doetschj)
import logging
from obspy import Stream
import os
import sys
import time
import pyasdf
from dug_seis.processing.dug_trigger import dug_trigger
......@@ -28,8 +29,12 @@ def processing(param):
tparam = param['Trigger']
if param['Processing']['parallel_processing']:
from dug_seis.processing.celery_tasks import event_processing_celery
os.system('redis-server > redis.log &')
os.system('celery -A dug_seis worker --loglevel=debug --concurrency=%i &> celery.log &' %param['Processing']['number_workers'])
if sys.platform == 'win32':
os.system('start redis-server > redis.log')
os.system('start celery -A dug_seis worker --loglevel=debug --concurrency=%i > celery.log' % param['Processing']['number_workers'])
else:
os.system('redis-server > redis.log &')
os.system('celery -A dug_seis worker --loglevel=debug --concurrency=%i &> celery.log &' %param['Processing']['number_workers'])
# create folders for processing
if not os.path.exists(param['Processing']['Folders']['quakeml_folder']):
......@@ -107,7 +112,7 @@ def processing(param):
trig_time=[i for i in trigger_out['Time'][trigger_out['Time'] <t_end-overlap]] #do not store times in overlap
for l in trig_time: #load 2 snippets if event in overlap
if l< sta_copy.traces[0].stats["starttime"]+param['Trigger']['starttime']:
if l < sta_copy.traces[0].stats["starttime"]+param['Trigger']['starttime']:
load_file = [processed_files[-1], current_file]
else:
load_file = [current_file]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment