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

docs: add examples for operations #297

Merged
merged 3 commits into from
Dec 31, 2024
Merged

Conversation

yucongalicechen
Copy link
Contributor

closes #248
@sbillinge ready for review

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (88d8d73) to head (cfb7362).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #297   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          500       500           
=========================================
  Hits           500       500           

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great! Just one comment.


4) get the value of the DiffractionObject at a given point in one of the xarrays
You can also do binary operations between two diffraction objects, as long as their yarrays have the same length.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the condition "same length xarray" or "on the same q/tth/d-array"? I think it should be the latter or we are adding things incorrectly. Please can you check the code. If the code is doing it right, change the doc. If hte doc is right, we probably should revisit hte tests and code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think the code only checks for the length of yarrays. I can edit the test on this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I wanna talk to @bobleesj first before making any changes. His test cases seem to be carefully chosen.. Made this into a new issue #298. @sbillinge I changed the docs and it's ready for review

@sbillinge sbillinge merged commit 9ce1769 into diffpy:main Dec 31, 2024
5 checks passed
@sbillinge
Copy link
Contributor

Thanks @yucongalicechen LGTM

@yucongalicechen yucongalicechen deleted the docs-do branch December 31, 2024 15:22
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

Successfully merging this pull request may close these issues.

docs for operations on diffraction objects
2 participants