Hi, > 1) How can I get the maximum value of E-field of CW source
I guess the easiest way is to output efield-X to an hdf5 file and then import it into Matlab (using h5read) or Python (using the 'tables' and 'scipy' modules for example) and do max(array) (in Matlab) where array is the name you gave the data on import. Alternatively, make a definition to call on each time step in Scheme which does the same thing during your simulation (see http://ab-initio.mit.edu/wiki/index.php/Meep_Reference#Writing_your_own_step_functions) . This might be simpler in the long run. Check out the Meep reference though as there might be something that already does this that I have missed. > > 2) When I run the time step to 2000, I only want to get the output of > 1800-2000. How to deal with it? This is actually covered in the Meep tutorial in the Modes of a Ring Resonator example (http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial#Modes_of_a_ring_resonator ). You just need two run-until loops, e.g: (run-until time1) (run-until time2 (at-every blah blah blah...output-efield-X)) where time1 and time2 are 1800 and 200 iterations in your time units which is determined by your resolution and characteristic lengthscale (if your resolution is 20 say 1 iteration is 0.025 time units, so time1 would be 45). Another option is to enclose your step function in the "(after- time ... )" enclosure (documented here: http://ab-initio.mit.edu/wiki/index.php/Meep_Reference#Controlling_when_a_step_function_executes) . Both methods will give you the same thing I believe. Regards, Ian > > Thanks! > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20081029/40a17c01/attachment-0001.htm > > ------------------------------ > > _______________________________________________ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > > End of meep-discuss Digest, Vol 32, Issue 19 > ******************************************** --------------------------- Research PhD Student Photonics Group Dept. of Electrical & Electrical Engineering University of Bristol Rm 2.11, Queen's Building University Walk Bristol BS8 1TR email: [EMAIL PROTECTED] _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss