Skip to content

Commit 2ab1007

Browse files
committed
Merge branch 'master' of https://github.com/wjlei1990/pypaw
2 parents af70cf4 + a0fc7f4 commit 2ab1007

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

scripts/window_weights/README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
### Introduction
1+
## Introduction
22

33
This directory contains example files for two different weighting strategies,
44
both of which are already implemented in pypaw.
55

6-
##### Weighting Strategy Version I
6+
---
7+
#### Weighting Strategy Version I
78

89
The weightings is determined in order of category, receiver and finally, source.
910
1. determine the category weightings ratio based on number of window counts in each category.
11+
1012
Attention here that we determined is the ratio between each category but not the absolute
1113
values. The absolut values will be determined on each event level(to satisfy the
1214
normalization equation).
15+
1316
2. determine the receiver weightings based on station geographic distribution(ratios) and window
1417
counts(normalization) of each receiver given one event.
18+
1519
Also, determine the absolute values of category weightings for each source.
1620
Once you reach this step, you can use the weights
1721
(category and receiver combined) to sum the adjoint source from each category for each event.
1822
And once you get summed adjoint source for each event, you can then launch the adjoint simulation
1923
to calculate the kernel for each source.
24+
2025
3. determine the source weightings based on source geographic distribution(ratio) and
21-
number of windows(normalization) of each source. The source weightings are applied on kernels
26+
number of windows(normalization) of each source.
27+
28+
The source weightings are applied on kernels
2229
when summing all the kernels together.
2330

2431
The benefit of version I is that you can freely combine kernels from different number of sources.
@@ -34,16 +41,22 @@ this weighting gives you more freedom when combining kernels.
3441
The draw back of that is it doesn't gurantee the weightins for different categories are
3542
evenly balanced(but will not be too deviated, based on my experiment).
3643

44+
---
3745

38-
###### Weighting Strategy Version II
46+
#### Weighting Strategy Version II
3947
The weightings are determined in order of receiver, source and finally category.
4048
1. determine the receiver weightings based on window counts and station distribution.
4149
(same as version I)
50+
4251
2. determine the source weightings based on source geographic distribution(ratio) and
4352
number of sources(the sum of source weights eqaul to number of sources)
53+
4454
3. determine the category weightings based on source weights(ws) number of windows in
4555
each category(Nsc) and number of categories(C).
46-
wc = 1 / (C * \sum_{s} ws * Nsc)
56+
57+
```
58+
W_{} = 1 / (C * \sum_{s} ws * N_{sc})
59+
```
4760
4. Finally, you combine the receiver, source and category weightings
4861
4962
The benefit of this weighting is you can guarantee that the sum of weightings from each

scripts/window_weights/version_I/01_category_weights/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Then, run the script to generate path file.
1010

1111
```
12-
python generate_count_windows.py -f cmtlist.txt
12+
python generate_count_windows.py
1313
```
1414

1515
2. Run the script:

0 commit comments

Comments
 (0)