[Tutor] Fitting data to error function
Danny Yoo
dyoo at hashcollision.org
Mon Mar 16 23:19:27 CET 2015
On Mon, Mar 16, 2015 at 2:55 PM, Colin Ross <colin.ross.dal at gmail.com> wrote:
> What I am trying to do is calculate the non-colinear autocorrelation:
>
> G(t_d) = \int_{-\infty}^{+\infty} |E(t)|^2 * |E(t - t_d)|^2 dt
>
> So I need to loop through an array of t_d values (len = 376) and calculate
> G(t_d) for as many t values as possible to eliminate sampling issues.
Ok. But you're using the term "E(t)" and E(t-t_d)" in your
LaTeX-ified equation in such a way that it sounds like 'E' is context
sensitive.
Look at the Python definition of integrand() again:
100 def integrand(x,y):
--> 101 return abs(E_out(x))**2.*abs(E_(x - y))**2.
and note that there are *two* distinct functions here being used:
E_out
E_
In contrast, in your mathematics, it looks like these should be the
*same* E function, so the fact that this is *different* is worth
consideration. I have to assume that the mathematics has some context
sensitivity based on the argument type that you haven't quite
explained here.
Also, I need to ask: do you know what is meant by the term "unit
test"? Because this doesn't seem to have been addressed yet, so I
need to double check.
More information about the Tutor
mailing list