On Jun 3, 2008, at 3:13 PM, Seong Kyu Kim wrote: > > In my posting of June 2, 2008, "Averaging E2 over time period ", > the ctl file had a strange dimension. But even after correcting it, > the code does not write the averaged h5 output correctly. Problem > seems to be (output-field function). Below I wrote a test ctl file, > the (output-field-function) part of the code is copied from > discussion archives of Jan 15 2007 (by Prof. Johnson). This run > produces ex-******.h5 and ey-******.h5 O.K. But its sum files esum- > ******.h5 have only zeros. I cannot figure out what is wrong. >
Note that the esum.h5 file will have esum.r and esum.i datasets for the real and imaginary parts. By default, however, Meep runs with only real fields (unless you use Bloch boundary conditions or set force-complex-fields), so your output data will be purely real and the imaginary part esum.i will be all zeros. When you run e.g. h5topng on a file containing multiple datasets, it uses the first dataset alphabetically, which by default will be esum.i and hence all zeros. You can specify another dataset using -d or by a colon after the filename (e.g. h5topng esum.h5:esum.r). I'm guessing that this is your problem. Steven _______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

