openPMD / openPMD-validator

:ballot_box_with_check: Validator and Example Scripts
ISC License
4 stars 8 forks source link

meshesPath & particlesPath: optional #32

Closed ax3l closed 6 years ago

ax3l commented 6 years ago

Implements that meshesPath and particlesPath are optional in openPMD 1.1.0+.

But if they are set, the directories those attributes point to must exist.

See: https://github.com/openPMD/openPMD-standard/pull/171

RemiLehe commented 6 years ago

I checked with the thetaMode dataset in openPMD examples, and it seems to give the correct result:

openPMD_check_h5 -i data00000400.h5 
Warning: Attribute author (recommended) does NOT exist in `/`!
Found 1 iteration(s)
Iteration 400 : found 4 meshes
Error: `basePath`+`particlesPath` are set but path 'b'/data/400/particles/'' does not exist in file!
Result: 1 Errors and 1 Warnings.
ax3l commented 6 years ago

Cool! And if you remove the particlesPath attribute from / - does this silence the validator and report "found 0 particles"? :)

RemiLehe commented 6 years ago

Nope. It raises an error (see inline comments...)

ax3l commented 6 years ago

Thanks, pushed the fix!

RemiLehe commented 6 years ago

Thanks! This now works fine with the missing particlePath

openPMD_check_h5 -i example-thetaMode/hdf5/data00000400.h5 
Warning: Attribute author (recommended) does NOT exist in `/`!
Found 1 iteration(s)
Iteration 400 : found 4 meshes
Iteration 400 : found 0 particle species
Result: 0 Errors and 1 Warnings.
ax3l commented 6 years ago

@RemiLehe thx for the review, I applied your suggested changes and explained the open question