← Back to team overview

python-meep team mailing list archive

discrepancy between the C++ "gaussian_src_time" and the Scheme "gaussian_src_time"

 

Shavkat,

I would like to point out a discrepancy between the C++
"gaussian_src_time" and the Scheme "gaussian_src_time".

Both take the same parameters (f, fwidth, s), but define the source with
different cutoff time.

In fact: let's take as parameters: 
fcen = 0.15
fwidth = 0.10
s = 5.0 (the default)

* In Scheme, using the definition from "meep.scm.in", this is translated
in a call to the C++ function gaussian_src_time(f,t,st,et) as follows:
gaussian_src_time(0.15, 1/0.1, 0, 2*(1/0.1) * 5.0)
=  gaussian_src_time(0.15, 10, 0, 100)
which defines the attributes of the source as follows:
freq = 0.15
width = 10
peak_time = 50
cutoff = 50

* In C++, the function gaussian_src_time(f,fwidth,s) called with values
0.15,0.10 and 5.0 defines the attributes of the source as follows:
freq = 0.15 (identical)
width = 1.0 / 0.10 = 10 (identical)
peak_time = 50 (identical)
cutoff = 10 * 5.0 * 2 = 100 

Therefore I will add to "meep-common.py" a redefinition of
"gaussian_src_time" that will make the function call consistent with
Scheme.

Is this OK for you?

PS: I'm currently also working on a Harminv helper function, which will
be ready very soon.

wbr,
Emmanuel





Follow ups