@@ -43,8 +43,8 @@ def process(data_source1, data_source2, output_path,
4343 fmin = None , fmax = None , netsta_list1 = '*' , netsta_list2 = '*' , pairs_to_compute = None ,
4444 start_time = '1970-01-01T00:00:00' , end_time = '2100-01-01T00:00:00' ,
4545 instrument_response_inventory = None , instrument_response_output = 'vel' , water_level = 50 ,
46- clip_to_2std = False , whitening = False , whitening_window_frequency = 0 ,
47- one_bit_normalize = False , location_preferences = None , ds1_zchan = None , ds1_nchan = None ,
46+ time_domain_norm = 'zero_mean_one_std' , whitening = False , whitening_window_frequency = 0 ,
47+ location_preferences = None , ds1_zchan = None , ds1_nchan = None ,
4848 ds1_echan = None , ds2_zchan = None , ds2_nchan = None , ds2_echan = None , corr_chan = None ,
4949 envelope_normalize = False , ensemble_stack = False , subset_stacker = None , apply_simple_stacking = True ,
5050 restart = False , dry_run = False , no_tracking_tag = False , scratch_folder = None ):
@@ -113,8 +113,7 @@ def outputConfigParameters():
113113 f .write ('%35s\t \t \t : %s\n ' % ('--instrument-response-output' , instrument_response_output ))
114114 f .write ('%35s\t \t \t : %s\n ' % ('--corr-chan' , corr_chan ))
115115 f .write ('%35s\t \t \t : %s\n ' % ('--water-level' , water_level ))
116- f .write ('%35s\t \t \t : %s\n ' % ('--clip-to-2std' , clip_to_2std ))
117- f .write ('%35s\t \t \t : %s\n ' % ('--one-bit-normalize' , one_bit_normalize ))
116+ f .write ('%35s\t \t \t : %s\n ' % ('--time-domain-norm' , time_domain_norm ))
118117 f .write ('%35s\t \t \t : %s\n ' % ('--envelope-normalize' , envelope_normalize ))
119118 f .write ('%35s\t \t \t : %s\n ' % ('--whitening' , whitening ))
120119 if (whitening ):
@@ -309,8 +308,8 @@ def get_loccha(cha1, cha2):
309308 baz_netsta1 , baz_netsta2 ,
310309 resample_rate , taper_length , read_ahead_window_seconds ,
311310 interval_seconds , window_seconds , window_overlap ,
312- window_buffer_length , fmin , fmax , clip_to_2std , whitening ,
313- whitening_window_frequency , one_bit_normalize , envelope_normalize ,
311+ window_buffer_length , fmin , fmax , time_domain_norm , whitening ,
312+ whitening_window_frequency , envelope_normalize ,
314313 ensemble_stack , subset_stacker , apply_simple_stacking , output_path , 2 ,
315314 time_tag , scratch_folder , git_hash )
316315 # end for
@@ -389,19 +388,21 @@ def get_loccha(cha1, cha2):
389388 help = "Water-level in dB to limit amplification during instrument response correction "
390389 "to a certain cut-off value. Note, this parameter has no effect if instrument "
391390 "response correction is not performed." )
392- @click .option ('--clip-to-2std' , is_flag = True ,
393- help = "Clip data in each window to +/- 2 standard deviations. Note that the default time-domain normalization "
394- "is N(0,1), i.e. 0-mean and unit variance" )
391+ @click .option ('--time-domain-norm' , type = click .Choice (['zero_mean_one_std' , 'clip_to_two_std' ,
392+ 'one_bit_norm' , 'none' ]),
393+ default = 'zero_mean_one_std' ,
394+ help = "Time domain normalization: "
395+ "zero_mean_one_std: the default time-domain normalization, N(0,1), i.e. 0-mean and unit variance"
396+ "clip_to_two_std: clips data in each window to +/- 2 standard deviations. "
397+ "one_bit_norm: apply one-bit normalization to data in each window"
398+ "none: no time domain normalization" )
395399@click .option ('--whitening' , is_flag = True ,
396400 help = "Apply spectral whitening" )
397401@click .option ('--whitening-window-frequency' , type = float , default = 0 ,
398402 help = "Window frequency (Hz) determines the half-window length (of averaging window) used for smoothing weights "
399403 "that scale the spectral amplitudes of the waveform being spectrally whitened. The default value of 0 "
400404 "implies no smoothing of weights. Note that this parameter has no effect unless whitening is activated with "
401405 "'--whitening'" )
402- @click .option ('--one-bit-normalize' , is_flag = True ,
403- help = "Apply one-bit normalization to data in each window. Note that the default time-domain normalization "
404- "is N(0,1), i.e. 0-mean and unit variance" )
405406@click .option ('--location-preferences' , default = None ,
406407 type = click .Path (exists = True ),
407408 help = "A comma-separated two-columned text file containing location code preferences for "
@@ -465,7 +466,7 @@ def main(data_source1, data_source2, output_path, window_seconds, window_overlap
465466 stacking_interval_seconds , window_buffer_length , resample_rate , taper_length , nearest_neighbours ,
466467 pair_min_dist , pair_max_dist , fmin , fmax , station_names1 , station_names2 , pairs_to_compute ,
467468 start_time , end_time , instrument_response_inventory , instrument_response_output , water_level ,
468- clip_to_2std , whitening , whitening_window_frequency , one_bit_normalize , location_preferences ,
469+ time_domain_norm , whitening , whitening_window_frequency , location_preferences ,
469470 ds1_zchan , ds1_nchan , ds1_echan , ds2_zchan , ds2_nchan , ds2_echan , corr_chan , envelope_normalize ,
470471 ensemble_stack , subset_stack , restart , dry_run , no_tracking_tag , scratch_folder ):
471472 """
@@ -538,7 +539,7 @@ def main(data_source1, data_source2, output_path, window_seconds, window_overlap
538539 window_buffer_length , read_ahead_window_seconds , resample_rate , taper_length , nearest_neighbours ,
539540 pair_min_dist , pair_max_dist , fmin , fmax , station_names1 , station_names2 , pairs_to_compute ,
540541 start_time , end_time , instrument_response_inventory , instrument_response_output , water_level ,
541- clip_to_2std , whitening , whitening_window_frequency , one_bit_normalize , location_preferences ,
542+ time_domain_norm , whitening , whitening_window_frequency , location_preferences ,
542543 ds1_zchan , ds1_nchan , ds1_echan , ds2_zchan , ds2_nchan , ds2_echan , corr_chan , envelope_normalize ,
543544 ensemble_stack , subset_stacker , apply_simple_stacking , restart , dry_run , no_tracking_tag ,
544545 scratch_folder )
0 commit comments