Closed JunCEEE closed 2 years ago
I'm thinking about which class should be responsible for the output in openPMD format and it is not yet clear to me. In openPMD there are several things that need to be written:
To me, it makes more sense to have a separate library taking care of the I/O taking in input the different information and the DataClass and taking care of putting in openPMD the things in the right place. If then there is a change in the openPMD standard things have to be touched in a single place and not in a multitude of classes
In my mind, the DataClass takes care of the native output and input of the backengine and write/read them in openPMD (or other) format with an openPMD API. I guess the openPMD API is what you mean by the "separate library"? @shervin86
I was thinking that it would be better to have the API to take the data class and write them. The data class should know nothing about the output format. I would make a package, that depends on the openPMD API and the libpyvinyl and performs the I/O. If I understood correctly you are suggesting to add the openPMD API as a dependency to the libpyvinyl. I don't think this is good idea.
So I would do:
Oh, I'm sorry that I might not be clear enough. The openPMD API I mentioned was just a general idea for "An API to write in openPMD format" instead of the exact "openPMD API". It is exactly what you mean that "a package, that depends on the openPMD API and the libpyvinyl and performs the I/O".
The example I made here:
In this way, we just need to implement your raytracing I/O package in an "openPMDFormat" class and it will be wrapped by an "raytacing data class".
Great, then I totally misunderstood the meaning of the classes. I will look into it more carefully tomorrow.
Todos after the first pseudo-code review.
base_path
, input
and output_suffix
through __init__()
https://github.com/PaNOSC-ViNYL/libpyvinyl/pull/32#discussion_r764703423
It's added here.
BaseData: https://github.com/PaNOSC-ViNYL/libpyvinyl/blob/dataAPI/libpyvinyl/BaseData.py
DiffractionData example: https://github.com/PaNOSC-ViNYL/libpyvinyl/blob/dataAPI/libpyvinyl/DiffractionData/DiffractionData.py Usage: https://github.com/PaNOSC-ViNYL/libpyvinyl/blob/dataAPI/libpyvinyl/DiffractionData/testDiffractionData.py
Todos after the first pseudo-code review.
base_path
,input
andoutput_suffix
through__init__()
https://github.com/PaNOSC-ViNYL/libpyvinyl/pull/32#discussion_r764703423Todos after the schematic discussion.