-
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
write new tests for (init functionality) #188
Comments
@sbillinge just for clarification In order to to use one of the methods ( class DiffractionObject:
def __init__(
self, name=None, ..., xarray=None, yarray=None, xtype=None
): to class DiffractionObject:
def __init__(
self, name=None, ..., xarray=None, yarray=None, angles_list=None
):
....
if angles_list:
self._set_angles_from_list(angles_list) in order to optionally use the def _set_angles_from_list(self, angles_list):
self.angles = angles_list
self.n_steps = len(angles_list) - 1.0
self.begin_angle = self.angles[0]
self.end_angle = self.angles[-1] |
I think the angles here is on_tth(). See discussions in #191 |
@yucongalicechen please keep me posted. I will work on this issue once that PR is resolved. |
yes, @bobleesj , the UC is
I am not sure how this will be used tbh because there needs to be a yarray and this needs a matching xarray, so maybe we don't need this. But if there is already a yarray and the person wants everything on a different grid, a UC would be
Again, I wonder actually how useful this would be. Maybe it is better to put it into an issue and leave it in case someone asks for it. The same would go for other ways to generate arrays. |
@sbillinge Re-visiting this again, is it a common practice for cr to modify/interpolate xarrays/yarrays? If so, maybe the I could work on other issues if we decide not to have this for 3.6.0 release. |
@sbillinge I've created an issue above. Could we close this issue since you've provided init tests? |
@bobleesj Something new to add in insert_scattering_quantity: (1) check xarray empty or not, if not check that yarray is the same length as xarray and xtype is valid (one of XQUANTITIES), (2) set attribute so that we don't allow setting an invalid xtype. |
When you say add sth new, are we referring to adding new tests or a new feature within the method? If it is a new feature within the method, i think its better to have a separate issue for this? |
add new features, sorry, and yes I will make a new issue for this (added now in #200) |
closed as completed in #193 |
Problem
Proposed solution
The text was updated successfully, but these errors were encountered: