Skip to content

Commit 1aeee65

Browse files
committed
max_epicenter_dist 500; max pair dist 15;
1 parent dd25af1 commit 1aeee65

File tree

13 files changed

+28
-27
lines changed

13 files changed

+28
-27
lines changed

ADLoc

CCTorch

GaMMA

Submodule GaMMA updated from 1d74812 to bcfd3c4

examples/california/cut_templates_cc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def extract_template_numpy(
268268

269269

270270
# %%
271-
# def generate_pairs(picks, events, stations, max_pair_dist=10, max_neighbors=50, fname="pairs.txt"):
271+
# def generate_pairs(picks, events, stations, max_pair_dist=15, max_neighbors=50, fname="pairs.txt"):
272272
# ncpu = min(32, mp.cpu_count())
273273
# neigh = NearestNeighbors(radius=max_pair_dist, n_neighbors=max_neighbors, n_jobs=ncpu)
274274
# neigh.fit(events[["x_km", "y_km", "z_km"]].values)
@@ -350,7 +350,7 @@ def cut_templates(jdays, root_path, region, config, bucket, protocol, token):
350350
time_window = max((time_before_p + time_after_p), (time_before_s + time_after_s))
351351
nt = int(round(time_window * sampling_rate))
352352
max_epicenter_dist = 500.0
353-
max_pair_dist = 10
353+
max_pair_dist = 15
354354
max_neighbors = 50
355355
min_cc_score = 0.5
356356
min_obs = 8

examples/california/cut_templates_merge.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
# %%
21-
def generate_pairs(picks, events, stations, max_pair_dist=10, max_neighbors=50, fname="pairs.txt"):
21+
def generate_pairs(picks, events, stations, max_pair_dist=15, max_neighbors=50, fname="pairs.txt"):
2222
ncpu = min(32, mp.cpu_count())
2323
neigh = NearestNeighbors(radius=max_pair_dist, n_neighbors=max_neighbors, n_jobs=ncpu)
2424
neigh.fit(events[["x_km", "y_km", "z_km"]].values)
@@ -92,18 +92,19 @@ def generate_pairs(picks, events, stations, max_pair_dist=10, max_neighbors=50,
9292
# with open(args.config, "r") as fp:
9393
# config = json.load(fp)
9494
config.update(vars(args))
95-
print(json.dumps(config, indent=4, sort_keys=True))
9695

9796
# %% CCTorch
98-
# config["max_pair_dist_km"] = 10
99-
# config["max_neighbors"] = 50
100-
# config["max_obs"] = 100
101-
# config["min_obs"] = 8
97+
config["max_pair_dist_km"] = 15
98+
config["max_neighbors"] = 50
99+
config["max_obs"] = 100
100+
config["min_obs"] = 8
102101
# config["nt"] = 400
103102
# config["maxdepth"] = 60
104103
# config["mindepth"] = 0
105104
# config["max_epicenter_dist_km"] = 200.0
106105

106+
print(json.dumps(config, indent=4, sort_keys=True))
107+
107108
# %%
108109
def plot_templates(templates, events, picks):
109110
templates = templates - np.nanmean(templates, axis=(-1), keepdims=True)

examples/california/generate_pairs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def parse_args():
182182
# picks = pd.read_csv(f"{root_path}/{result_path}/picks.csv", parse_dates=["phase_time"])
183183

184184
# %%
185-
MAX_PAIR_DIST = 10 # km
185+
MAX_PAIR_DIST = 15 # km
186186
MAX_NEIGHBORS = 50
187187
MIN_NEIGHBORS = 8
188188
MIN_OBS = 8

examples/california/run_cctorch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def parse_args():
5555
## based on GPU memory
5656

5757
batch = 1_024
58-
block_size1 = 1000_000
59-
block_size2 = 1000_000
58+
block_size1 = 2_000_000
59+
block_size2 = 2_000_000
6060

6161
########## DEBUG by day ##############
6262
# base_cmd = (

examples/california/run_hypodd_cc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ cd $root_path/$region/hypodd
1818

1919
if [ ! -d "HypoDD" ]; then
2020
git clone https://github.com/zhuwq0/HypoDD.git
21-
export PATH=$PATH:$PWD/HypoDD
22-
make -C HypoDD/src/
2321
fi
22+
export PATH=$PATH:$PWD/HypoDD
23+
make -C HypoDD/src/
2424

2525
cat <<EOF > cc.inp
2626
* RELOC.INP:
@@ -54,7 +54,7 @@ hypodd.src
5454
* IPHA: 1= P; 2= S; 3= P&S
5555
* DIST:max dist [km] between cluster centroid and station
5656
* IDAT IPHA DIST
57-
1 3 120
57+
1 3 500
5858
*
5959
*--- event clustering:
6060
* OBSCC: min # of obs/pair for crosstime data (0= no clustering)

examples/japan/cut_templates_cc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def extract_template_numpy(
232232

233233

234234
# %%
235-
def generate_pairs(picks, events, stations, max_pair_dist=10, max_neighbors=50, fname="pairs.txt"):
235+
def generate_pairs(picks, events, stations, max_pair_dist=15, max_neighbors=50, fname="pairs.txt"):
236236
ncpu = min(32, mp.cpu_count())
237237
neigh = NearestNeighbors(radius=max_pair_dist, n_neighbors=max_neighbors, n_jobs=ncpu)
238238
neigh.fit(events[["x_km", "y_km", "z_km"]].values)
@@ -301,8 +301,8 @@ def cut_templates(root_path, region, config):
301301

302302
time_window = max((time_before_p + time_after_p), (time_before_s + time_after_s))
303303
nt = int(round(time_window * sampling_rate))
304-
max_epicenter_dist = 200.0
305-
max_pair_dist = 10
304+
max_epicenter_dist = 500.0
305+
max_pair_dist = 15
306306
max_neighbors = 50
307307
min_cc_score = 0.5
308308
min_obs = 8

scripts/cut_templates_cc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def extract_template_numpy(
237237

238238

239239
# %%
240-
def generate_pairs(picks, events, stations, max_pair_dist=10, max_neighbors=50, fname="pairs.txt"):
240+
def generate_pairs(picks, events, stations, max_pair_dist=15, max_neighbors=50, fname="pairs.txt"):
241241
ncpu = min(32, mp.cpu_count())
242242
neigh = NearestNeighbors(radius=max_pair_dist, n_neighbors=max_neighbors, n_jobs=ncpu)
243243
neigh.fit(events[["x_km", "y_km", "z_km"]].values)
@@ -311,7 +311,7 @@ def cut_templates(root_path, region, config):
311311
time_window = max((time_before_p + time_after_p), (time_before_s + time_after_s))
312312
nt = int(round(time_window * sampling_rate))
313313
max_epicenter_dist = 500.0
314-
max_pair_dist = 10
314+
max_pair_dist = 15
315315
max_neighbors = 50
316316
min_cc_score = 0.5
317317
min_obs = 8

0 commit comments

Comments
 (0)