On Jul 17, 2008, at 1:41 AM, Jefferson Thomas wrote: > But the example uses complex fields. In my simulation I have to use > fields::use_real_fields() which causes the > method above generate wrong results (like negative q-factor from the > formula -0.5*freq_re[i]/freq_im[i] ). > What should I change to use this method for real fields ?
The same method should work for real fields. However, harminv's peak- finding is not really a bulletproof process, and in borderline cases it may get confused if you change the data a little. Try running with a narrower bandwidth source around the frequency of interest to you. If you have a large negative Q, it may just be that the losses are so small that it is having trouble determining then, and both loss and gain are within the error bars. If you have a small negative Q (< 10000) then you may have some instability, or it could be that what you're looking at is not a real mode; sometimes harminv finds spurious peaks. Steven _______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

