-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactoring of the main classes #10
Conversation
… and derotation angles
…processing - extraction of rotation angles
… treated differently
Config file
|
Thank you Joe, it seems that this issue might be related to a newer version of |
Otherwise was working okay on numpy 1.23.1, will try on 2.0 after the fix. I had a couple of warnings I will dump here in case they are relevant:
|
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.
Hey @lauraporta all looks good to me, its very clear and easy to follow. I made a couple of suggestions but they are not critical so feel free to ignore!
for i, (start, end) in enumerate( | ||
zip(rotation_start[1:], rotation_end[:-1]) | ||
): | ||
for start, end in zip(rotation_start[1:], rotation_end[:-1]): | ||
self.interpolated_angles[end:start] = 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.
Just checking this is end:start
and not start:end
, its like the end of the first rotation to the start of the second?
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.
Yes that's what it is 😅 do you find it confusing?
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.
I don't think its so confusing and makes sense in the context, but for a reader not particularly familiar with the procedure like myself it might be initially a little unexpected (i.e. just seeing an array indexed end:start
). Maybe just a brief clarifying comment above the line? or maybe the variables could be last_rotation_end
, next_rotation_start
if not too verbose.
Description
What is this PR
Why is this PR needed?
Refactor the main analysis code.
What does this PR do?
Legend:
❌: removes
💭: changes
➕: adds
np.nonzero
withnp.where
(just personal preference, they seem equivalent for my use-case);pandas
syntaxcheck_rotation_number_after_interpolation
in theIncrementalPipeline
classI can provide some datasets to test the pipeline locally.
Explanations
(1) : with "increments" I refer to the angle resolution of the motor, i.e. the smallest increment in angles that motor is able to report. 0.2 deg in our case.
How has this PR been tested?
Tested locally with tests that were made before.
Is this a breaking change?
No
Does this PR require an update to the documentation?
Not for now.
Checklist: