We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Transcribing the time issue into GH for tracking purposes.
Hi @bsmithyman Your code has a test for the number of samples in the source wavelet: ns == 2 * nom This is 1. incorrect and also 2. too restrictive. The error is you assume time = ns * dt, when it should be (ns-1)*dt. The restriction is as follows: We want df to equal the inverse of the total time window, ie df = 1 / (ns - 1)*dt. Given that, then (ns - 1) = 1 / dt*df To get this in terms of nom, note that nom = fmax / df (ns -1) = nom / dt*fmax (If we happen to choose fmax = fny = 1/ 2*dt then (ns -1) = nom*2*dt/dt = nom * 2 as in your test). This is too restrictive - we often use forward modelling where fmax != fny. Bottom line Can you change the test to: ns == 1 + nom / dt*fmax ? For example, @ShaunHadden and I are building a model with dt = .15625 ms, nt = 161, total time (ns -1)*dt = 25 ms, df = 1 / 0.025 = 40 Hz. With fmax=1600, nom=1600/40=40 So nom != 2 * ns and your test fails, but my test gives 1 + nom / dt*fmax = 1 + 40 / .0015625*1600 = 161 which is correct. Thanks, @gerhardpratt
Hi @bsmithyman
Your code has a test for the number of samples in the source wavelet: ns == 2 * nom
ns == 2 * nom
This is 1. incorrect and also 2. too restrictive.
time = ns * dt
(ns-1)*dt
We want df to equal the inverse of the total time window, ie df = 1 / (ns - 1)*dt.
df = 1 / (ns - 1)*dt
Given that, then
(ns - 1) = 1 / dt*df
To get this in terms of nom, note that nom = fmax / df
nom = fmax / df
(ns -1) = nom / dt*fmax
(If we happen to choose fmax = fny = 1/ 2*dt then (ns -1) = nom*2*dt/dt = nom * 2 as in your test).
fmax = fny = 1/ 2*dt
(ns -1) = nom*2*dt/dt = nom * 2
This is too restrictive - we often use forward modelling where fmax != fny.
fmax != fny
Bottom line Can you change the test to: ns == 1 + nom / dt*fmax ?
ns == 1 + nom / dt*fmax
For example, @ShaunHadden and I are building a model with dt = .15625 ms, nt = 161, total time (ns -1)*dt = 25 ms, df = 1 / 0.025 = 40 Hz.
dt = .15625 ms
nt = 161
(ns -1)*dt = 25 ms, df = 1 / 0.025 = 40 Hz
With fmax=1600, nom=1600/40=40
fmax=1600, nom=1600/40=40
So nom != 2 * ns and your test fails, but my test gives 1 + nom / dt*fmax = 1 + 40 / .0015625*1600 = 161 which is correct.
nom != 2 * ns
1 + nom / dt*fmax = 1 + 40 / .0015625*1600 = 161
Thanks, @gerhardpratt
The text was updated successfully, but these errors were encountered:
bsmithyman
No branches or pull requests
Transcribing the time issue into GH for tracking purposes.
The text was updated successfully, but these errors were encountered: