Hi,
I don't know if this would help you, but the following script will give you a
broad pulse between f_1 and f_2:
-------------------------- new source function -------------------------------
(define ((flat_src f1 f2 on_time) t1)
(begin ;(print t1 "\n")
(let ((t (- t1 (/ on_time 2))) (w1 (* 2 pi f1)) (w2 (* 2 pi f2)) )
(if (and (<= t1 on_time) (>= t1 0))
(* (+ 0.42 (* -0.5 (cos (* 2 t1 pi (/ 1 on_time)))) (* 0.08 (cos
(* 4 t1 pi
(/ 1 on_time))))) ; blackman window
(if (= t 0) (* 0+0.5i (- w1 w2))
(/ (- (exp (*
0+1i w1 t)) (exp (* 0+1i w2 t))) (* 2 t))
))
(+ 0 0))
)
)
)
-------------------------------------------------------------------------
-------- example how to setup new source --------------------------------
(set! sources (list
(make source
(src (make custom-src (end-time 200)
(src-func (flat_src f_bottom
f_top 200) )))
(component Ey)
(center 0 0 lzborder)
(size xsize ysize 0)
)))
-----------------------------------------------------------------------
kindly regards
Andreas
Am Freitag, 17. November 2006 11:51 schrieb Loïc Le Guyader:
> Hi,
>
> I understand the idea of sending a short time pulse to get a broad
> spectrum.
>
> If I look at example given, like this one
> http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial we use the same fcen
> and df for the source and the computation of the spectum.
>
> But if I plot the spectrum of the source, like show in attachement, I
> wonder how result for the frequency with low power can be accurate.
>
> I would preferably use a broader source than the spectra I want to resolve.
>
> Am I right ?
>
> Cheers.
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss