-
Notifications
You must be signed in to change notification settings - Fork 20
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
DiffractionObject can now be instantiated directly #193
Conversation
…cture is a 2D array with everything in it
xarray = np.empty(0) | ||
if yarray is None: | ||
yarray = np.empty(0) | ||
self.insert_scattering_quantity( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice re-use of insert_scattering_quantity
self.name = name | ||
self.wavelength = wavelength | ||
self.all_arrays = np.empty(shape=(len(yarray), 4)) | ||
self.all_arrays[:, 0] = yarray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much much easier to read now!
"scat_quantity": "x-ray", | ||
"wavelength": 0.71, | ||
"xtype": "q", | ||
"xarray": np.array([1.0, 2.0]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer tests..
@sbillinge Also passes locally now. Just checked out your branch. |
thank for the review @bobleesj . I will merge this now so the team can push on..... |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #193 +/- ##
==========================================
- Coverage 97.31% 96.53% -0.78%
==========================================
Files 8 8
Lines 261 289 +28
==========================================
+ Hits 254 279 +25
- Misses 7 10 +3
|
closes #185
closes #181
closes #177
and basic data structure is a 2D array with everything in it