diff --git a/seismic/ASDFdatabase/waveform_analytics.py b/seismic/ASDFdatabase/waveform_analytics.py index 3d7b9541..e6c18ca1 100644 --- a/seismic/ASDFdatabase/waveform_analytics.py +++ b/seismic/ASDFdatabase/waveform_analytics.py @@ -16,6 +16,8 @@ import os, sys is_windows = sys.platform.startswith('win') +is_osx = sys.platform.startswith('darwin') + if(is_windows): # suppress warnings on windows import warnings warnings.filterwarnings('ignore', \ @@ -46,6 +48,7 @@ import psutil from pathos.multiprocessing import ProcessingPool as Pool +import multiprocess from multiprocess import Manager, freeze_support matplotlib.use('TKAgg') @@ -810,6 +813,7 @@ def get_time_range_func(net, sta, loc, cha): if __name__ == "__main__": # add support for process-based multiprocessing for a Windows .exe if(is_windows): freeze_support() - + if(is_osx): multiprocess.set_start_method('spawn') + groups() # end func