-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
h5math apparent error #13
Comments
You want |
YES! The irony is that I started with that syntax about 137 attempts ago and convinced myself that it should be d1 in BOTH files because dn refers to the number n of the data set in EACH file. So I was sure that d1 - d2, while superficially plausible, could not possibly be correct! Suppose you had one data set in f1.h5 and two data sets in f2.h5 AND you wanted to take the difference between the data set in f1.h5 and the second data set in f2.h5. Would the expression be 'd1 - d3'? |
Wouldn't it be better to use dmn where m Is the sequential (left to right) numbering of the h5 file and n is the numbering of the data set within the mth h5 file? If such were the case, then multiple h5 files and multilple data sets within those files could be used in math expressions without confusion. |
If you have multiple datasets per file, you specify the files as |
I am using pymeep installed with conda from the conda-forge channel less than a month ago, running on MacOS 10.15.4 (Catalina). The pymeep script runs a meep simulation that produces two h5 files, using the built-in field output functions and at_append for time slices. There is one data set (1000 x 1000 x80) in each h5 file. Assume the names of the files are f1.h5, f2.h5. The utility h5ls appears to work correctly for each file, and h5topng works correctly for each file. But I find a problem with h5math. I have libmatheval installed and the command
h5math -ve 'd1 +d1' out.h5 f1.h5 f2.h5
produces a correct out.h5 file (1000 x 1000 x 80) that can be converted to png files with h5topng. BUT the subtracting expression 'd1 - d2' produces an out.h5 (1000 x 1000 x 80) filled with zeros. The datasets in f1.h5 and f2.h5 are not equal. The command that I use is,
h5math -ve 'd1 - d1' out.h5 f1.h5 f2.h5
I would appreciate some helpful comments or hints as to what might be problem.
John Weiner
The text was updated successfully, but these errors were encountered: