Skip to content

Commit bda8c90

Browse files
committed
Added flag to change merging of the HF timeseries into final BBP seismograms
1 parent 4526c69 commit bda8c90

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

bbp/comps/match.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
BSD 3-Clause License
44
5-
Copyright (c) 2024, University of Southern California
5+
Copyright (c) 2025, University of Southern California
66
All rights reserved.
77
88
Redistribution and use in source and binary forms, with or without
@@ -60,6 +60,7 @@ def __init__(self, i_r_stations, i_vmodel_name, sim_id=0, acc=True):
6060
self.phase = None
6161
self.hf_fhi = None
6262
self.lf_flo = None
63+
self.hf_merge_flag = None
6364

6465
def run(self):
6566
"""
@@ -100,11 +101,14 @@ def run(self):
100101
self.phase = config.PHASE
101102
self.hf_fhi = config.HF_FHI
102103
self.lf_flo = config.LF_FLO
104+
self.hf_merge_flag = config.HF_MERGE_FLAG
103105

104106
# Check if we have a different merging frequency
105107
if 'MATCH_MERGING_FREQUENCY' in vmodel_params:
106108
self.hf_fhi = float(vmodel_params['MATCH_MERGING_FREQUENCY'])
107109
self.lf_flo = float(vmodel_params['MATCH_MERGING_FREQUENCY'])
110+
if 'HF_MERGE_FLAG' in vmodel_params:
111+
self.hf_merge_flag = float(vmodel_params['HF_MERGE_FLAG'])
108112

109113
# Set match method
110114
if config.MATCH_METHOD == 1:
@@ -579,8 +583,8 @@ def run(self):
579583
(os.path.join(install.A_GP_BIN_DIR, "wcc_add")) +
580584
"f1=1.00 t1=%f inbin1=0 infile1=%s " %
581585
(config.LF_TSTART, infile1) +
582-
"f2=1.00 t2=%f inbin2=0 infile2=%s " %
583-
(config.HF_TSTART, infile2) +
586+
"f2=%f t2=%f inbin2=0 infile2=%s " %
587+
(self.hf_merge_flag, config.HF_TSTART, infile2) +
584588
"outbin=0 outfile=%s >> %s 2>&1" %
585589
(outfile, self.log))
586590
bband_utils.runprog(progstring, abort_on_error=True,

bbp/comps/match_cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
BSD 3-Clause License
44
5-
Copyright (c) 2024, University of Southern California
5+
Copyright (c) 2025, University of Southern California
66
All rights reserved.
77
88
Redistribution and use in source and binary forms, with or without
@@ -52,6 +52,7 @@ def __init__(self):
5252
self.HF_FLO = "1.0e+15"
5353
self.HF_ORD = 4
5454
self.HF_TSTART = 0.0
55+
self.HF_MERGE_FLAG = 1.0
5556

5657
self.LF_FHI = 0.0
5758
self.LF_FLO = self.DEFAULT_MERGING_FREQUENCY

0 commit comments

Comments
 (0)