Yes, you can do this.  Meep has a subclass of sources called 
"custom-src", (see the meep reference).


(define start 0)
(define end 300)
(define mysource (lambda (t) (sin (* 10 t))))

(define cs (list (make source
                   (src (make custom-src
                          (src-func mysource) (start-time start) (end-time 
end)))
                   (component Ez) (center 0 0) (size 0 0))))

(set! sources cs)


You will need to write a function in scheme that to replace "mysource", 
which when passed a time argument, will return the value of source 
amplitude you desire.  I guess you want that function to interpolate 
between sampled data points, which you could store in a list or import 
from a data file.





On Thu, 11 Sep 2008, Christoph Statz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear Mr. Johnson and meep-Users,
>
> is it possible to use numerical (externally generated or measured)
> data as a source in meep?
> Can it be done with the libctl interface or do i need to use the c++
> interface?
> Thanks in advance.
>
> Sincerly,
>
> Christoph Statz
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (Darwin)
>
> iEUEARECAAYFAkjIyaEACgkQD7q7fQCeR0MOfQCY13eajRpdupJj1rrARfALTGoQ
> xwCeL7fVrSzHZVlzozeSMLdX1PJa88M=
> =xpPB
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to