You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
write a DiffractionObject serializer/deserializer #195
I think we probably want code that will dump to different file formats and read from different formats. These are dumpers and loaders. If we serialize and deserialize things I think of it as a kind of (safe) round trip. the unsafe things is just to pickle and then unpickle but we need to be more careful now. But sinnce we want people using diffraction objects, the serializers that most interesting to me would be ones that serialize and deserialize complete diffraction objects.
We definitely want the dumpers and loaders and a pure serializer. We can put it off to 3.7 though to keep momentum. The serializer will change the API though because I would like to give as an option a file path, or probably better a stream so we can have different backends, and have it load the DO from there. So the serializer would be nice now I guess?
Dumpers and loaders to group standards file formats as we have are a bit specific, but probably worth having since the large community is using these file formats
We could re-visit this once we have 3.6.0 milestone delivered?
Recording today's in-person discussion with @sbillinge
Serialization takes a DiffractionObject (DO) and outputs it to a file (.txt, .json, etc.), which can be imported into databases and shared via email with colleagues. There is no loss of information.
Deserialization uses the the serialized file to instantiate a DO object.
How is this different from using a loader/dumper?
We want serialized DOs to be usable by other existing software, e.g., GSAS.
A loader/dumper saves a file in a format that the existing software can read.
There is some information loss, but it's a much better solution than not being able to import a DO into these packages or waiting for these packages to support our format, which may not happen soon.
Activity
bobleesj commentedon Dec 15, 2024
Good comments by @sbillinge from #222
We could re-visit this once we have
3.6.0milestone delivered?bobleesj commentedon Dec 17, 2024
Recording today's in-person discussion with @sbillinge
How is this different from using a loader/dumper?
bobleesj commentedon Dec 27, 2024
Note to myself: two UC provided by @sbillinge in using DiffractionObject with empty arrays for xarray and yarray: #195