Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: DiffractionObject.load() method #313

Open
sbillinge opened this issue Jan 1, 2025 · 0 comments
Open

feat: DiffractionObject.load() method #313

sbillinge opened this issue Jan 1, 2025 · 0 comments
Milestone

Comments

@sbillinge
Copy link
Contributor

Problem

We can dump easily but we can't yet load

Proposed solution

define a DiffractionObject.load() method that uses loadData but just loads it into a diffraction object with all the header info in metadata

my_do = DiffractionObject().load('path/to/file.chi')

gives a valid DO. It could look for wavelength and xtype in hte header, but if can't find it it needs to throw an error or a warning and ask to rerun specifying, for example

my_do = DiffractionObject(wavelength=1.54,xtype=q).load('path/to/file.chi')
@sbillinge sbillinge added this to the 3.7.0 release milestone Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant