openPMD-standard icon indicating copy to clipboard operation
openPMD-standard copied to clipboard

Proposal: `particlePushParameters` Attribute

Open steindev opened this issue 4 years ago • 9 comments

Similar to the fieldSolverParameters attribute, which is mandatory if fieldSolver = other, a particlePushParameters attribute could be added. This should be mandatory if the particlePush attribute is other such that additional descriptions are possible.

steindev avatar Sep 24 '20 08:09 steindev

Thanks for the suggestion.

Another more compact solution we use in other places is to use the same field, but only defined the prefix other:. For example: particlePush value other:somethingThatIsUnspecifiedButCanBeAnythingUntilTheNextVersionGivesItAName - why not also spaces? Everything is possible and easy to parse that way.

Would that also work for you? :)

ax3l avatar Sep 29 '20 07:09 ax3l

Would that also work for you? :)

Sure! Just stumbled across it and it felt like it was forgotten. With your solution, I like that it is specified and compliant with the standard already!

I would be fine with closing the issue.

steindev avatar Sep 29 '20 07:09 steindev

@ax3l I think it's a nice convention. However, is it documented somewhere in the standard files? From looking here does not seem compliant, as it says only other is a valid option, not other:[text]

sbastrakov avatar Sep 29 '20 08:09 sbastrakov

@ax3l Would giving a non-standard string like other: Higuera-Cary break any open-PMD analysis tools etc. that run specific checks?

PrometheusPi avatar Oct 02 '20 09:10 PrometheusPi

Not that I am aware of, that's the idea with the prefix.

ax3l avatar Oct 02 '20 09:10 ax3l

Okay

PrometheusPi avatar Oct 02 '20 09:10 PrometheusPi

I suggest to use json after ":" instead of an arbitrary string behind.

other: JSON

And openPMD should define useful basic tags you can optimally use e.g. description, dio, name

other : {"name": "MyOwnPusher", "description": "Is more stable.", doi: "123-122" }

But maybe the word other should be fully removed and the string should become always a valid json string.

psychocoderHPC avatar Oct 02 '20 09:10 psychocoderHPC

That's also a good idea. The point with other prefix is, that you can literally write anything behind it in a non-Standard Format until a new revision of the standard is out. So you could use json.

It's probably just not worth it to standardize those other formats further, since we can add new keywords in patch level releases.

ax3l avatar Oct 02 '20 09:10 ax3l

@ax3l Okay - so the strings defined by the standard should be interpreted as prefixes and can be extended by any string - is this idea somewhere mentioned in the standard? (I could not find it.)

PrometheusPi avatar Oct 02 '20 13:10 PrometheusPi