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
introduce keep_dims flag to preserve the cell dimension for the selec… #288
introduce keep_dims flag to preserve the cell dimension for the selec… #288
Conversation
Adding some context here: I believe the original branch for Hence, this flag allows at least to express the intent to preserve dimensions. |
hmm, I dont understand the reason for the failed codecov/project |
I wouldn't worry too much about codecov - my experience is that it often says coverage has decreased when it hasn't actually, so I'm used to ignoring it. Numpy has a similar-ish parameter on e.g. |
I could not easily find an instance in |
So as you can see from the commits I was a bit uncertain what I prefer. But it looked weird having EDIT: And now I see that @philsmt already said the same thing 3 hours ago. |
Looks good, thanks! |
MID requested correcting one cellId for AGIPD in the offline calibration.
As mentioned in this MR: https://git.xfel.eu/detectors/pycalibration/-/merge_requests/640
There was an error in correcting one cellId. This was a result of wrong expected dimensions.
When the CORR data is read for one train using
train_from_id
to plot AGIPD images, all arrays were returned without preserving the1
for the cell dimensions.Based on @philsmt 's advice. I added
keep_dims
flags fortrains()
,train_from_id
,train_from_index
for data collections and key data to have the option in preserving the cell dimension and slice the required data even thoughcount == 1
I have added some tests as well for having
keep_dims = True
, I tried to only use already available tests and add test functions based on it.