Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window merge algorithm generate random results #9

Open
wjlei1990 opened this issue Feb 16, 2016 · 4 comments
Open

window merge algorithm generate random results #9

wjlei1990 opened this issue Feb 16, 2016 · 4 comments

Comments

@wjlei1990
Copy link

Hi Lion,
+++++++++++++++++++++++++++
Wait...Let me fix my problem first. Leave it alone first.
+++++++++++++++++++++++++++

I found the window merge algorithm performs differently on different machines(Maybe it is a bad example, because you can see inside those windows the observed and synthetic are identical).

Before you go further investigation, let me do a little more research first...

I will first show you the first example:
iu kbl bhz

And pyflex output:

[2016-02-16 15:00:33,628] - pyflex - INFO: Rejection based on data fit criteria retained 43 windows.
[2016-02-16 15:00:33,628] - pyflex - DEBUG: Remaining windows: 43
[2016-02-16 15:00:33,628] - pyflex - DEBUG: idx:    left(s)  center(s)   right(s)
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   1:     871.50     943.50    1016.00
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   2:     891.50     953.50    1016.00
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   3:    1103.00    1147.50    1192.00
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   4:    1103.00    1238.00    1373.00
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   5:    1103.00    1202.50    1302.50
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   6:    1147.50    1225.00    1302.50
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   7:    1147.50    1260.00    1373.00
[2016-02-16 15:00:33,628] - pyflex - DEBUG:   8:    1192.00    1247.00    1302.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:   9:    1192.00    1282.50    1373.00
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  10:    1302.50    1337.50    1373.00
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  11:    1688.00    1783.00    1878.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  12:    1688.00    1720.00    1752.00
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  13:    1688.00    1742.50    1797.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  14:    1752.00    1815.00    1878.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  15:    1797.50    1838.00    1878.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  16:    1878.50    1952.00    2026.00
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  17:    1878.50    1908.50    1939.00
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  18:    1939.00    1982.50    2026.00
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  19:    2058.00    2088.50    2119.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  20:    2143.00    2189.00    2235.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  21:    2143.00    2219.50    2296.50
[2016-02-16 15:00:33,629] - pyflex - DEBUG:  22:    2188.00    2242.00    2296.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  23:    2235.50    2266.00    2296.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  24:    2296.50    2374.00    2451.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  25:    2491.50    2594.50    2697.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  26:    2548.50    2623.00    2697.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  27:    2580.50    2639.00    2697.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  28:    2773.50    2809.50    2845.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  29:    2773.50    2839.00    2904.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  30:    2845.50    2875.00    2904.50
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  31:    2904.50    2948.50    2993.00
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  32:    2996.50    3079.00    3162.00
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  33:    3219.00    3278.00    3337.00
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  34:    3337.00    3379.00    3421.00
[2016-02-16 15:00:33,630] - pyflex - DEBUG:  35:    3421.00    3496.50    3572.00
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  36:    3572.00    3636.00    3700.50
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  37:    3572.00    3668.00    3764.00
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  38:    3628.50    3696.00    3764.00
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  39:    3628.50    3664.50    3700.50
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  40:    3700.50    3732.00    3764.00
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  41:    3764.00    3812.00    3860.00
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  42:    3764.00    3854.50    3945.00
[2016-02-16 15:00:33,631] - pyflex - DEBUG:  43:    4095.00    4184.50    4274.50
[2016-02-16 15:00:33,633] - pyflex - INFO: Weighted interval schedule optimzation retained 19 windows.
[2016-02-16 15:00:33,633] - pyflex - DEBUG: Remaining windows: 19
[2016-02-16 15:00:33,633] - pyflex - DEBUG: idx:    left(s)  center(s)   right(s)
[2016-02-16 15:00:33,633] - pyflex - DEBUG:   1:     891.50     953.50    1016.00
[2016-02-16 15:00:33,633] - pyflex - DEBUG:   2:    1103.00    1238.00    1373.00
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   3:    1688.00    1783.00    1878.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   4:    1878.50    1952.00    2026.00
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   5:    2058.00    2088.50    2119.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   6:    2143.00    2219.50    2296.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   7:    2296.50    2374.00    2451.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   8:    2491.50    2594.50    2697.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:   9:    2773.50    2809.50    2845.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:  10:    2845.50    2875.00    2904.50
[2016-02-16 15:00:33,634] - pyflex - DEBUG:  11:    2904.50    2948.50    2993.00
[2016-02-16 15:00:33,634] - pyflex - DEBUG:  12:    2996.50    3079.00    3162.00
[2016-02-16 15:00:33,634] - pyflex - DEBUG:  13:    3219.00    3278.00    3337.00
[2016-02-16 15:00:33,634] - pyflex - DEBUG:  14:    3337.00    3379.00    3421.00
[2016-02-16 15:00:33,634] - pyflex - DEBUG:  15:    3421.00    3496.50    3572.00
[2016-02-16 15:00:33,635] - pyflex - DEBUG:  16:    3572.00    3636.00    3700.50
[2016-02-16 15:00:33,635] - pyflex - DEBUG:  17:    3700.50    3732.00    3764.00
[2016-02-16 15:00:33,635] - pyflex - DEBUG:  18:    3764.00    3854.50    3945.00
[2016-02-16 15:00:33,635] - pyflex - DEBUG:  19:    4095.00    4184.50    4274.50
@wjlei1990
Copy link
Author

Another output:
iu kbl bhz

Pyflex output:

[2016-02-16 15:07:06,137] - pyflex - INFO: Rejection based on data fit criteria retained 43 windows.
[2016-02-16 15:07:06,137] - pyflex - DEBUG: Remaining windows: 43
[2016-02-16 15:07:06,137] - pyflex - DEBUG: idx:    left(s)  center(s)   right(s)
[2016-02-16 15:07:06,137] - pyflex - DEBUG:   1:     871.50     943.50    1016.00
[2016-02-16 15:07:06,137] - pyflex - DEBUG:   2:     891.50     953.50    1016.00
[2016-02-16 15:07:06,137] - pyflex - DEBUG:   3:    1103.00    1147.50    1192.00
[2016-02-16 15:07:06,137] - pyflex - DEBUG:   4:    1103.00    1238.00    1373.00
[2016-02-16 15:07:06,137] - pyflex - DEBUG:   5:    1103.00    1202.50    1302.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:   6:    1147.50    1225.00    1302.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:   7:    1147.50    1260.00    1373.00
[2016-02-16 15:07:06,138] - pyflex - DEBUG:   8:    1192.00    1247.00    1302.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:   9:    1192.00    1282.50    1373.00
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  10:    1302.50    1337.50    1373.00
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  11:    1688.00    1783.00    1878.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  12:    1688.00    1720.00    1752.00
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  13:    1688.00    1742.50    1797.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  14:    1752.00    1815.00    1878.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  15:    1797.50    1838.00    1878.50
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  16:    1878.50    1952.00    2026.00
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  17:    1878.50    1908.50    1939.00
[2016-02-16 15:07:06,138] - pyflex - DEBUG:  18:    1939.00    1982.50    2026.00
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  19:    2058.00    2088.50    2119.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  20:    2143.00    2189.00    2235.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  21:    2143.00    2219.50    2296.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  22:    2188.00    2242.00    2296.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  23:    2235.50    2266.00    2296.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  24:    2296.50    2374.00    2451.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  25:    2491.50    2594.50    2697.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  26:    2548.50    2623.00    2697.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  27:    2580.50    2639.00    2697.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  28:    2773.50    2809.50    2845.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  29:    2773.50    2839.00    2904.50
[2016-02-16 15:07:06,139] - pyflex - DEBUG:  30:    2845.50    2875.00    2904.50
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  31:    2904.50    2948.50    2993.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  32:    2996.50    3079.00    3162.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  33:    3219.00    3278.00    3337.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  34:    3337.00    3379.00    3421.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  35:    3421.00    3496.50    3572.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  36:    3572.00    3636.00    3700.50
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  37:    3572.00    3668.00    3764.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  38:    3628.50    3696.00    3764.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  39:    3628.50    3664.50    3700.50
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  40:    3700.50    3732.00    3764.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  41:    3764.00    3812.00    3860.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  42:    3764.00    3854.50    3945.00
[2016-02-16 15:07:06,140] - pyflex - DEBUG:  43:    4095.00    4184.50    4274.50
[2016-02-16 15:07:06,143] - pyflex - INFO: Weighted interval schedule optimzation retained 20 windows.
[2016-02-16 15:07:06,143] - pyflex - DEBUG: Remaining windows: 20
[2016-02-16 15:07:06,143] - pyflex - DEBUG: idx:    left(s)  center(s)   right(s)
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   1:     891.50     953.50    1016.00
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   2:    1103.00    1147.50    1192.00
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   3:    1192.00    1247.00    1302.50
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   4:    1302.50    1337.50    1373.00
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   5:    1688.00    1783.00    1878.50
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   6:    1878.50    1908.50    1939.00
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   7:    1939.00    1982.50    2026.00
[2016-02-16 15:07:06,143] - pyflex - DEBUG:   8:    2058.00    2088.50    2119.50
[2016-02-16 15:07:06,144] - pyflex - DEBUG:   9:    2143.00    2219.50    2296.50
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  10:    2296.50    2374.00    2451.50
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  11:    2491.50    2594.50    2697.50
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  12:    2773.50    2839.00    2904.50
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  13:    2904.50    2948.50    2993.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  14:    2996.50    3079.00    3162.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  15:    3219.00    3278.00    3337.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  16:    3337.00    3379.00    3421.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  17:    3421.00    3496.50    3572.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  18:    3572.00    3668.00    3764.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  19:    3764.00    3854.50    3945.00
[2016-02-16 15:07:06,144] - pyflex - DEBUG:  20:    4095.00    4184.50    4274.50

@wjlei1990
Copy link
Author

For the two examples above, before merging, the windows are the same. But after merging, they choose different boundaries.

For example, for the second window from left hand side, the second example divided them into 3 different windows while the first one keeps it as one.

I am using the same window merging strategy here...

Since for this case, the observed and synthetic are quite similar, so is it possible that the merging algorithm will randomly selected windows?

@krischer
Copy link
Collaborator

Hi Wenjie,

this is interesting. If the windows are identical the interval scheduling should result in the same windows being selected. Otherwise I would consider it a bug.

The interval scheduling also accounts for the weights of all windows, e.g. win.weight. Can you please print that for each window? I suspect they are slightly different on the different computers which might well be due to #8.

If that is the case I suggest we just clip the CC and also round it too like three significant digits so it is always the same on all computers.

@wjlei1990
Copy link
Author

I figure out, for this case, I set the synthetic same as observed, so they are identical. So This is a extreme case that two seismograms are identical to each other. Still, pyflex should provide the same results.

I will do as you suggested. I am thinking about the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants