CI: systematically check the values of the fields in the openPMD file
Opened this issue · 3 comments
RemiLehe commented
(related to #34)
Our current CI test only dumps the field to an openPMD file and makes sure that this is not crashing.
However, it would be good to check the actual values.
Maybe we could build a template test file that would work for any profile, and then simply loop through our existing profiles and:
- Initialize the
lasy
profile - Dump it to openPMD file (in the 2 supported geometries)
- Read the openPMD file and check the fields.
MaxThevenet commented
Also related to #23.
KPeterBlum commented
- Read the openPMD file and check the fields.
What kind of checks to you imagine? In general I can think of something like:
- check that you can get a three-dimensional object at the first iteration
- check that the number of timesteps matches the expectation
- check that the dimensions of the box match up
- check the some values in the openPMDfile (e.g. some central coordinates at
iteration=0
) with a seperate call of the profile function - For a Gaussian Laser or so, one could check also physical quanitites like waist size and pulse duration, but this would be difficult to implement for all profiles.
MaxThevenet commented
Yes, these kind of tests would be very useful. No need to test all profiles, so just metadata + some rough physical quantities for a Gaussian profile (mostly checking that e.g. the array does not contain NaNs) would be enough.