@@ -675,11 +675,11 @@ def cluster(self, method, **kwargs):
675675 def detect (self , stream , threshold , threshold_type , trig_int , plot = False ,
676676 plotdir = None , parallel_process = True ,
677677 xcorr_func = None , concurrency = None , cores = None ,
678- concurrent_processing = False , ignore_length = False ,
679- ignore_bad_data = False , group_size = None , overlap = "calculate" ,
680- full_peaks = False , save_progress = False , process_cores = None ,
681- pre_processed = False , check_processing = True , make_events = True ,
682- min_stations = 0 , ** kwargs ):
678+ cc_squared = False , concurrent_processing = False ,
679+ ignore_length = False , ignore_bad_data = False , group_size = None ,
680+ overlap = "calculate" , full_peaks = False , save_progress = False ,
681+ process_cores = None , pre_processed = False , check_processing = True ,
682+ make_events = True , min_stations = 0 , ** kwargs ):
683683 """
684684 Detect using a Tribe of templates within a continuous stream.
685685
@@ -720,6 +720,10 @@ def detect(self, stream, threshold, threshold_type, trig_int, plot=False,
720720 :func:`eqcorrscan.utils.correlate.get_stream_xcorr`
721721 :type cores: int
722722 :param cores: Number of workers for processing and detection.
723+ :type cc_squared: bool
724+ :param cc_squared:
725+ Whether to detect using "cc_squared" (actually cc * abs(cc)) or
726+ just using cc.
723727 :type concurrent_processing: bool
724728 :param concurrent_processing:
725729 Whether to process steps in detection workflow concurrently or not.
@@ -895,8 +899,9 @@ def detect(self, stream, threshold, threshold_type, trig_int, plot=False,
895899 process_cores , ignore_length , overlap ,
896900 ignore_bad_data , group_size , groups , sampling_rate , threshold ,
897901 threshold_type , save_progress , xcorr_func , concurrency , cores ,
898- export_cccsums , parallel , peak_cores , trig_int , full_peaks ,
899- plot , plotdir , plot_format , make_events , min_stations ,)
902+ cc_squared , export_cccsums , parallel , peak_cores , trig_int ,
903+ full_peaks , plot , plotdir , plot_format , make_events ,
904+ min_stations ,)
900905
901906 if concurrent_processing :
902907 party = self ._detect_concurrent (* args , ** inner_kwargs )
@@ -922,9 +927,9 @@ def _detect_serial(
922927 self , stream , template_ids , pre_processed , parallel_process ,
923928 process_cores , ignore_length , overlap , ignore_bad_data ,
924929 group_size , groups , sampling_rate , threshold , threshold_type ,
925- save_progress , xcorr_func , concurrency , cores , export_cccsums ,
926- parallel , peak_cores , trig_int , full_peaks , plot , plotdir , plot_format ,
927- make_events , min_stations , ** kwargs
930+ save_progress , xcorr_func , concurrency , cores , cc_squared ,
931+ export_cccsums , parallel , peak_cores , trig_int , full_peaks , plot ,
932+ plotdir , plot_format , make_events , min_stations , ** kwargs
928933 ):
929934 """ Internal serial detect workflow. """
930935 from eqcorrscan .core .match_filter .helpers .tribe import (
@@ -977,7 +982,8 @@ def _detect_serial(
977982 threshold = threshold , threshold_type = threshold_type ,
978983 trig_int = trig_int , sampling_rate = sampling_rate ,
979984 full_peaks = full_peaks , plot = plot , plotdir = plotdir ,
980- plot_format = plot_format , prepped = False , ** kwargs )
985+ plot_format = plot_format , prepped = False ,
986+ cc_squared = cc_squared , ** kwargs )
981987 Logger .debug (chans )
982988
983989 detections = _detect (
@@ -1014,9 +1020,9 @@ def _detect_concurrent(
10141020 self , stream , template_ids , pre_processed , parallel_process ,
10151021 process_cores , ignore_length , overlap , ignore_bad_data ,
10161022 group_size , groups , sampling_rate , threshold , threshold_type ,
1017- save_progress , xcorr_func , concurrency , cores , export_cccsums ,
1018- parallel , peak_cores , trig_int , full_peaks , plot , plotdir , plot_format ,
1019- make_events , min_stations , ** kwargs
1023+ save_progress , xcorr_func , concurrency , cores , cc_squared ,
1024+ export_cccsums , parallel , peak_cores , trig_int , full_peaks , plot ,
1025+ plotdir , plot_format , make_events , min_stations , ** kwargs
10201026 ):
10211027 """ Internal concurrent detect workflow. """
10221028 from eqcorrscan .core .match_filter .helpers .processes import (
@@ -1180,7 +1186,8 @@ def _detect_concurrent(
11801186 threshold = threshold , threshold_type = threshold_type ,
11811187 trig_int = trig_int , sampling_rate = sampling_rate ,
11821188 full_peaks = full_peaks , plot = plot , plotdir = plotdir ,
1183- plot_format = plot_format , ** inner_kwargs
1189+ plot_format = plot_format , cc_squared = cc_squared ,
1190+ ** inner_kwargs
11841191 )
11851192 peaks_queue .put (
11861193 (starttime , all_peaks , thresholds , no_chans , chans ,
@@ -1251,9 +1258,9 @@ def client_detect(self, client, starttime, endtime, threshold,
12511258 threshold_type , trig_int , plot = False , plotdir = None ,
12521259 min_gap = None , parallel_process = True ,
12531260 xcorr_func = None , concurrency = None , cores = None ,
1254- concurrent_processing = False , ignore_length = False ,
1255- ignore_bad_data = False , group_size = None ,
1256- return_stream = False , full_peaks = False ,
1261+ cc_squared = False , concurrent_processing = False ,
1262+ ignore_length = False , ignore_bad_data = False ,
1263+ group_size = None , return_stream = False , full_peaks = False ,
12571264 save_progress = False , process_cores = None , retries = 3 ,
12581265 check_processing = True , make_events = True ,
12591266 min_stations = 0 , ** kwargs ):
@@ -1304,6 +1311,10 @@ def client_detect(self, client, starttime, endtime, threshold,
13041311 :func:`eqcorrscan.utils.correlate.get_stream_xcorr`
13051312 :type cores: int
13061313 :param cores: Number of workers for processing and detection.
1314+ :type cc_squared: bool
1315+ :param cc_squared:
1316+ Whether to detect using "cc_squared" (actually cc * abs(cc)) or
1317+ just using cc.
13071318 :type concurrent_processing: bool
13081319 :param concurrent_processing:
13091320 Whether to process steps in detection workflow concurrently or not.
@@ -1462,7 +1473,8 @@ def client_detect(self, client, starttime, endtime, threshold,
14621473 return_stream = return_stream , check_processing = False ,
14631474 poison_queue = poison_queue , shutdown = False ,
14641475 concurrent_processing = concurrent_processing , groups = groups ,
1465- make_events = make_events , min_stations = min_stations )
1476+ make_events = make_events , min_stations = min_stations ,
1477+ cc_squared = cc_squared )
14661478 detector_kwargs .update (kwargs )
14671479
14681480 if not concurrent_processing :
0 commit comments